[LLVMdev] Feeding DWARF debug information for an LLVM module

Eric Christopher echristo at gmail.com
Mon Apr 28 15:12:50 PDT 2014


The way to add information to a module is going to be via DIBuilder,
however, this doesn't match what you're attempting to do if you have
fully fledged sections. You could try to write out type information as
you've parsed it etc, but it's going to be a buyer beware sort of
thing. The way clang does this is to emit type/variable/line
information as it's generating code.

I'd need more information about your actual setup to give any more of
an answer though.

-eric


On Mon, Apr 28, 2014 at 2:42 PM, Marco Alesiani <marco.diiga at gmail.com> wrote:
> I'm trying to insert some DWARF debugging information into a LLVM IR module
> by manually parsing the DWARF debug DIEs. I'm doing it that way since I
> wrote my custom front-end for my language and the DWARF debugging
> information are provided me as a byte stream for the various DWARF sections.
>
> I took a look at the documentation and DwarfDebug class (
> http://llvm.org/docs/doxygen/html/classllvm_1_1DwarfDebug.html
> <http://llvm.org/docs/doxygen/html/classllvm_1_1DwarfDebug.html>  ) but it
> doesn't seem to be a quick way to directly "feed the DWARF sections" to the
> IR directly generated from my code.
>
> Anyway I'd like to know if what I'm doing (i.e. manually parsing the DWARF
> sections, expression trees and everything else to get the variables /
> structures I'm interested in) is a useless effort or it is the only way to
> insert proper debugging information into the IR code I'm describing.
>
>
>
> --
> View this message in context: http://llvm.1065342.n5.nabble.com/Feeding-DWARF-debug-information-for-an-LLVM-module-tp68167.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