<div dir="ltr">We've been pursuing the direction of writing PDBs from scratch in llvm/lib/DebugInfo/PDB/Raw and related directories. It might be interesting to have code that talks to MSPDB140.dll in LLVM, but we really want LLD to be able to produce its output on any platform.</div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jul 24, 2016 at 9:18 PM, Michael Lewis via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>I've recently been doing some work on a novel language that uses LLVM for optimization and machine codegen. The language is self-hosted, I'm building my third iteration of its garbage collector, and also writing a thin IDE to stretch the language a bit. Needless to say, debugging is a major concern for me.</div><div><br></div><div>My primary experience (and primary development focus) is Windows-centric, so my go-to debuggers are Visual Studio and WinDbg. I know of the lldb/VS integration efforts, and of course with appropriate setup I could also leverage gdb (IIRC). But these aren't quite what I was looking for, personally.</div><div><br></div><div>Long story short I set out to build a PDB emitter that could generate debug information for my language based on the existing CodeView emission support as of LLVM 3.8. I'm happy to report success as of this afternoon. More details about the effort and its status can be found at [0].</div><div><br></div><div><br></div><div>The high-level overview of my strategy is to crack the CodeView blob from LLVM (.data$S COFF section) and reassemble it, plus some augmentation, then feed that to the API exposed by MSPDB140.dll (Visual Studio 2015's version). This works and I can debug programs in both VS and WinDbg assuming the front-end supplies sane metadata to the LLVM layer.</div><div><br></div><div><br></div><div>My question to the list - is this work valuable for anyone else? Would there be general interest in documentation or even example code that assembles what I've learned throughout this effort?</div><div><br></div><div><br></div><div>Thanks,</div><div><br></div><div><br></div><div><br></div><div> - Mike</div><div><br></div><div><br></div><div>[0] - <a href="https://github.com/apoch/epoch-language/wiki/Knowledge-Dump---Debugging-Epoch-Programs" target="_blank">https://github.com/apoch/epoch-language/wiki/Knowledge-Dump---Debugging-Epoch-Programs</a></div><div><br></div></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>