[LLVMdev] Adding PDB support to lib\DebugInfo
Zachary Turner
zturner at google.com
Thu Jan 29 11:08:31 PST 2015
See my earlier response to Adrian. But I'll rehash the point here, which
is that basically in the short term, I think it makes the most sense to
keep them separate. In the future, if / when we decide to provide a
unified interface (e.g libDebugInfo as you suggest), there will be
additional machinery required to wrap the two interfaces, so we could move
the DIContext class at that time.
Does this make sense?
On Thu Jan 29 2015 at 10:54:37 AM Frédéric Riss <friss at apple.com> wrote:
> On Jan 29, 2015, at 10:20 AM, Zachary Turner <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.
>
>
> so you would have libDebugInfoDWARF and libDebugInfoPDB. Would you still
> have libDebugInfo at all?
>
> I ask because there is the DIContext abstraction that’s not tied to a
> particular debug format (It’s used by llvm-symbolizer, and I guess you have
> some interest in having that working on windows PDB files). But
> DIContext.cpp as one method, thus having a library for just that might be
> really overkill.
>
> 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?
> Zach
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150129/81e39099/attachment.html>
More information about the llvm-dev
mailing list