[Lldb-commits] [PATCH] D17363: Add SymbolFilePDB with basic support for line tables.

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Wed Feb 17 18:23:47 PST 2016


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

This is a first attempt at getting `SymbolFilePDB` working with line table support.  A few notes:

* This won't compile until a corresponding patch goes in on the LLVM side.  The patch is done on my side, but not committed yet.
* Right now only line tables and compilation units are supported.  In particular, this means that "target modules dump line-table <file>" works, and displays output like this:
* I checked in some unittests with 2 precompiled binaries and a PDB file for testing purposes.  I opted for unittests and checked-in binaries here for a number of reasons.
  1. The SB API does not provide a way to test something this low level.
  2. Obviously not every platform has the ability to create PDB files.
  3. With the help of some magic compiler switches, the binaries are very small.
  4. At some point or another this will be unavoidable, as we will want to test "PDB file generated by MSVC on Windows can be read on Linux"
  5. I don't feel comfortable checking in something with no tests.

    (lldb) file d:\src\llvmbuild\ninja\tools\lldb\unittests\SymbolFile\PDB\Inputs\test-pdb.exe
    Current executable set to 'd:\src\llvmbuild\ninja\tools\lldb\unittests\SymbolFile\PDB\Inputs\test-pdb.exe' (i686).
    (lldb) target modules dump line-table test-pdb.cpp
    Line table for test-pdb.cpp in `test-pdb.exe
    0x00401020: :4
    0x00401030: :6
    0x00401033: :8
    0x00401035: :9



http://reviews.llvm.org/D17363

Files:
  cmake/LLDBDependencies.cmake
  cmake/modules/AddLLDB.cmake
  source/API/SystemInitializerFull.cpp
  source/Initialization/SystemInitializerCommon.cpp
  source/Plugins/SymbolFile/CMakeLists.txt
  source/Plugins/SymbolFile/PDB/CMakeLists.txt
  source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
  source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
  unittests/CMakeLists.txt
  unittests/SymbolFile/CMakeLists.txt
  unittests/SymbolFile/PDB/CMakeLists.txt
  unittests/SymbolFile/PDB/Inputs/test-dwarf.cpp
  unittests/SymbolFile/PDB/Inputs/test-dwarf.exe
  unittests/SymbolFile/PDB/Inputs/test-pdb.cpp
  unittests/SymbolFile/PDB/Inputs/test-pdb.exe
  unittests/SymbolFile/PDB/Inputs/test-pdb.pdb
  unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17363.48268.patch
Type: text/x-patch
Size: 33369 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160218/92da23b8/attachment-0001.bin>


More information about the lldb-commits mailing list