[LLVMdev] How do I generate a Dwarf file?

Reid Kleckner rnk at mit.edu
Wed Jul 15 14:27:41 PDT 2009

> Does anyone know how to generate a Dwarf file for a Windows target?  I
> discovered the DwarfWriter class, but I'm not sure how to add it to
> the pass manager.

What do you mean by a "Dwarf file"?  Right now Dwarf writing is
tightly coupled with the AsmWriter, and they can only really be used
together.  You would have to output a .s file, and then assemble it
with 'as' or something similar, and then the Dwarf would be in the
appropriate sections.  There's a GSOC project in progress right now to
get LLVM to be able to write object files directly.


More information about the llvm-dev mailing list