5

Both gcc and clang have option -gcolumn-info, which is described this way:

Emit location column information into DWARF debugging information, rather than just file and line.

I have compiled my binary with this option. Now I have address of some instruction and want to translate it back to source file, line number and column. Is there a way to do it in gdb? Is there some other tool that can extract this information?

I know that I can use info line *0xabcd1234 in gdb to get the source file and line corresponding to that address, but it does not show the column.

1 Answer 1

1

Answering my guestion, I found one way to get the information using lldb and image lookup command:

(lldb) image lookup --address 0x134adc
      Address: libaaa.so[0x0000000000134adc] (libaaa.so.PT_LOAD[0]..text + 1030908)
      Summary: libaaa.so`test() + 272 at test.cpp:1842:124
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.