This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Extracting disassembled code for selected source lines from debug info


Hi,

I'm thinking of writing a Vim plugin for rapid inspection of compiled
code. It would let you select lines of source code and view the
corresponding disassembled code from the object file.

To implement the plugin, source files could be mapped to object files
e.g. by searching for foo.o when the source file is foo.c in the
simplest case. The tricky part is getting the disassembled code for
the selected lines from the object file. objdump with --line-numbers
would be doable, but would require a bit of parsing, and would not be
robust if the output format of objdump might change.

Any suggestions for other libraries or tools that I could use?

(I realize there's caveats related to inlining and the like. You would
have to keep that in mind when using the plugin.)

Thanks,
Ulf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]