Going back and forth with a debugger, I can very easily determine the file address of a memory location by doing

(lldb) image lookup -a 0x102802574
      Address: Program[0x0000000000002574] (Program.__TEXT.__text + 36)
      Summary: Program`some_func + 4

in where 0x0000000000002574 is the file address of the program that I can also follow through my disassembler.

How about the other way around? I have a file address and want to get the address of the currently running process with lldb.

Can lldb figure this out in a reliable way?

I can set breakpoints with -a 0x0000000000002574 -s Program which sets the breakpoint correctly, but how about just looking up the address?

Your Answer

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

Browse other questions tagged or ask your own question.