[Lldb-commits] [PATCH] D18848: Add PDBASTParser and parse type information from PDB

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 6 16:45:28 PDT 2016


zturner created this revision.
zturner added a reviewer: clayborg.
zturner added a subscriber: lldb-commits.

This code is still untested aside from that it compiles.  I mostly want to put an early work-in-progress up here to make sure I'm on the right path and am not doing anything fundamentally wrong.  Not all types are supported, and I don't intend to support all types with this initial commit.  Things like const / volatile are not important for a first pass, and I'm only looking at getting the most common basic types of types working.

One oddity of PDB is that the debug info does not maintain enough information to accurately reconstruct the DeclContext hierarchy.  If you have this:
```
namespace Foo
{
    class Bar
    {
        class Baz
        {
        };
    };
}
```

then that will appear in the PDB as a type with the name `Foo::Bar::Baz`, and there's no information about whether `Foo` and `Bar` are namespaces or classes.  It is possible to give a best effort attempt, but it's going to be outside the scope of this patch.  So, for now, I intend to put every single type under the master translation unit decl with fully scoped names.  This isn't perfect, but we can iterate on it in the future.

Again, this is a work in progress, mostly just want to make sure this looks like the right approach.

http://reviews.llvm.org/D18848

Files:
  include/lldb/Symbol/ClangASTContext.h
  source/Plugins/SymbolFile/PDB/CMakeLists.txt
  source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
  source/Plugins/SymbolFile/PDB/PDBASTParser.h
  source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
  source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
  source/Symbol/ClangASTContext.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18848.52870.patch
Type: text/x-patch
Size: 21528 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160406/7c2e0a4c/attachment-0001.bin>


More information about the lldb-commits mailing list