Howdy,

I'm a contributor to the Parrot project which is a virtual machine for
dynamic languages including Perl 6. One of the problems we've been
facing is that the bytecode does not contain a debug segment for
preserving high-level information about the original source code.
Therefore, I've begun work on a watered-down version of DWARF to help
fill this gap. Designing the format itself has been fairly easy but
now I must consider the actual implementation.

That is why I've come to you guys. Considering that GCC supports
several debug formats (including DWARF), I figured that the GCC
Project would be the best place to inquiry about a few design issues.

I'd like to know at what stage during compilation is debug data
collected and subsequently stored in the object file? Is it a
multi-stage process? Perhaps the parser collects some high-level
information which passes it to the code generator for further analysis
which passes it again to the linker/loader for even further low-level
analysis? Or is there a single stage dedicated to collecting debug
data; perhaps after linking? I envisioned it as a multi-stage process
but I don't want to make any assumptions.

I've tried to gain some knowledge by digging through the GCC source
but haven't come up with much other than the values of the DW_*
constants which isn't that important. Are there any files in
particular I should be looking at?

If any of you are DWARF experts, I would really appreciate your advice.

Thanks for the help!

--
- Kevin Polulak (soh_cah_toa)

Reply via email to