This is the mail archive of the mailing list for the binutils 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]

pulling DWARF info from GDB


I'm working on a research project involving inquiring a binary about
its DWARF info in order to get a better idea of whats on the stack at
runtime when a function is being executed.
The end goal is to re-write the current stack frame on the different
computer and continue execution, and when the function finishes, to
then return and populate the next stack frame (the parent function)
onto the target systems stack and again resume execution.

Doing (readelf -wia) on the compiled binary (with the -g and -rdynamic
option when compiling) can reveal the information definitely relevant
to me especially
sections. This gives the compile_unit (I actually dont know what this
means or its significance) the DW_TAG_subprogram (functions in the
program), DW_TAG_formal_parameters (function params of a given func),
and DW_TAG_variable (a function's local vars)

The source base of gdb is pretty big, I've narrowed it down to the
dwarf2____.c files in binutils/gdb
and also took a look at binutils/gold/ for help.

Could someone explain what objects/containers/things hold this info
and what functions populate these structures with the DWARF info? This
would save me a lot of trouble of writing my own parser,


C Jelesnianski
Graduate Student @ Virginia Tech.

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