[LLVMdev] Adding PDB support to lib\DebugInfo

Adrian Prantl aprantl at apple.com
Thu Jan 29 10:51:52 PST 2015


> On Jan 29, 2015, at 10:24 AM, Eric Christopher <echristo at gmail.com> wrote:
> 
> 
> 
> On Thu Jan 29 2015 at 10:22:17 AM Zachary Turner <zturner at google.com <mailto:zturner at google.com>> wrote:
> I've been working on adding pdb reading support to llvm.  This started as a tool for dumping info from a pdb (similar to llvm-dwarfdump), which has been checked in and currently has limited support for dumping pdb.
> 
> There's still more to be done on the pdb dumping tool, but at this point -- to reduce duplicated effort -- I think it makes the most sense to start moving some of this logic into a library in llvm, and then change llvm-pdbdump to use the library.  Later, once the library is more comprehensive, I plan to then use it in LLDB for reading PDBs while debugging on Windows.
> 
> I think the best way to do this is to move all of the code in lib/DebugInfo to lib/DebugInfo/dwarf, and then make another folder called lib/DebugInfo/pdb.   These would then be compiled into two separate libraries.
> 
> Another approach is to just put the PDB code in the same folder as the dwarf code, but I don't like this approach for a number of reasons:
> 
> 1) Not every consumer of DebugInfo wants both types of DebugInfo.
> 2) The pdb reading code relies very heavily on Windows APIs, and will not compile on other platforms.  This is solvable with some CMake machinery, but it's ugly and unwarranted in my opinion.
> 
> So as a first step in this direction I'd like to propose moving the code in lib/DebugInfo to lib/DebugInfo/dwarf, and then updating the rest of llvm accordingly.
> 
> Thoughts?  Comments?  Suggestions?
> 
> Sounds good. Naming bikeshed:
> 
Sounds generally good. Not knowing much about PDB; are there any plans to have some kind of unified interface between dwarf and pdb (don’t know if that makes sense), or will they be kept separate?

> DWARF/Dwarf and PDB as directory names.

The official spelling is DWARF but it’s visually heavy and doesn’t play well with camelcase identifiers. DWARF when it’s used alone and Dwarf when it’s part of a longer word?

-- adrian

> 
> Might want to ask Frederic about any pending patches he wants to get in before you move things around under him. git _should_ deal with it, but...
> 
> -eric
>  
> Zach
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu <mailto:LLVMdev at cs.uiuc.edu>         http://llvm.cs.uiuc.edu <http://llvm.cs.uiuc.edu/>
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev <http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150129/cec8d0db/attachment.html>


More information about the llvm-dev mailing list