<div dir="ltr">Hi all,<div><br></div><div>I'm cross-posting from the llvm-dev list so I apologize in advance if that's a faux pas, I just wanted to be sure and snag the appropriate audiences.</div><div><br></div><div><br></div><div>I work on a novel language that uses LLVM for machine-code generation. My primary experience (and interest) is on Windows. One thing I really have been wanting for my project is a good debugging experience. On Windows, this means some combination of Visual Studio and WinDbg.</div><div><br></div><div>Of course I'm familiar with the lldb/VS integration efforts and I know clang can emit .obj files that link to debuggable images via LINK.EXE. However, for my own personal goals, relying on LINK to generate debug data is a non-starter.</div><div><br></div><div>Thus I set out to build a PDB emitter that enables debugging of binaries compiled with my toolchain. As of this weekend I've successfully generated PDBs for a few test programs. My criteria for success are:</div><div><br></div><div> - Functions are locatable by address in VS and WinDbg alike</div><div> - Callstacks include accurate names of functions</div><div> - Source indexing works to some extent (my front-end is a bit crippled in this regard right now so I'm faking it, but the fakery looks pretty good!)</div><div><br></div><div><br></div><div>I lifted a technique from the open-source CV2PDB project which originated with the D language community: I'm interfacing with MSPDB140.DLL to write the actual MSF file to disk. This is purely a bootstrapping technique though and I plan to fabricate "whole cloth" PDBs next.</div><div><br></div><div><br></div><div>A tiny bit of documentation on this can be found at [0].</div><div><br></div><div><br></div><div>My question (which again I also posed to the LLVM-dev list) - is there any interest from the Clang community in this work? Is PDB emission a valuable goal for anyone else? If so, how best can I contribute what I've assembled to the greater effort?</div><div><br></div><div><br></div><div><br></div><div>Thanks!</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">https://github.com/apoch/epoch-language/wiki/Knowledge-Dump---Debugging-Epoch-Programs</a></div><div><br></div><div><br></div><div><br></div><div><br></div></div>