1

When an executable that has been stripped is opened in lldb, lldb doesn't know the names of any functions and breakpoints have to be set manually on hex addresses, which is very annoying.

However, for Objective C executables, at least, it should be possible to reconstruct the addresses of functions from the Objective C runtime information in the object file: __DATA,__objc_classlist , __TEXT,__objc_methname , and so on.

Is there a way to do this in lldb currently? Or is it just ignoring that information?

3

I solved this problem for gdb a few years ago, see Import class-dump info into GDB on Stack Overflow.

I’m not sure if lldb has an add-symbol-file equivalent command. Loading symbols from location in memory from the lldb-dev mailing list suggests that you may have to create your own .dSYM file instead of a .stabs file.

| improve this answer | |
1

Since the Objc data (selectors) has to be available to the Objc code in order for it to run.

LLDB can set breakpoints according to selectors using the breakpoint set -n "[SomeClass someFunction:]" command. You can also check the LLDB tutorial.

| improve this answer | |
  • 1
    This doesn't work if the executable doesn't have symbols -- that's my point. – Brennan Vincent Dec 1 '15 at 18:59
  • 1
    Sounds odd, as it did work for me in the past. I'll try looking into it when I have some time. – tmr232 Dec 2 '15 at 11:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.