How do I generate a Dwarf file?

Hello,

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. Also, what x86 subtarget should I use? From what I
can tell, there are five choices: isELF, isDarwin, isCygwin, isMingw,
and isWindows. isCygwin and isMingw appear to generate a COFF file in
X86TargetMachine.cpp, but that seems unlikely because I don't see a
COFF writer in the source code. The fifth choice, isWindows, appears
to be the default Windows option that generates no debugging
information.

Any help would be greatly appreciated.

Best Regards,
Jon

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.

Reid