[LLVMdev] Feeding DWARF debug information for an LLVM module

Eric Christopher echristo at gmail.com
Tue Apr 29 12:31:34 PDT 2014


I really suggest you take a look at how clang is emitting the
information. It's quite a bit different than what you're looking at -
also trying to figure out why you're trying to take someone else's
dwarf and rewrite your own. That's going to be more complicated than
using ASTs or what have you to generate code.

-eric

On Tue, Apr 29, 2014 at 8:50 AM, Marco Alesiani <marco.diiga at gmail.com> wrote:
> Thanks Eric. Using DIBuilder to manually insert debugging information is what
> I had in mind and I believe at the end of the day it will be the only way.
>
> Regarding my setup I'm using a parser which reads code generated by a
> front-end comprehensive of all DWARF (v2 IIRC) infos. Unfortunately I
> believe the parser I'm using was just designed to set up the IR routines
> with a basic debugging support since it doesn't provide (as far as I could
> see) any way to "browse" or "explore" the DWARF data, i.e. it just provides
> me a number of DWARF sections (debug_abbrev, debug_info, etc..) via byte
> streams. I searched through its code but I'm almost sure interpreting that
> data will be up to me.
>
> Thus what I had in mind was exactly to write code to parse the debug
> information and directly feed them via DIBuilder routines to LLVM. Line
> infos are available throughout all my IR representation but in order to at
> least enable variable/arrays watches I suppose I'll have to go through DWARF
> expressions and such. I will probably not need all the data contained in the
> DWARF sections (I'm not looking for a thoroughly debugging description of my
> code) but I'll have to do some more tests in order to determine if what I
> have in mind can somewhat be accomplished. I'm still pretty new to debugging
> formats.
>
>
>
> --
> View this message in context: http://llvm.1065342.n5.nabble.com/Feeding-DWARF-debug-information-for-an-LLVM-module-tp68167p68186.html
> Sent from the LLVM - Dev mailing list archive at Nabble.com.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev



More information about the llvm-dev mailing list