Add support for reading line tables from PDB files.
authorZachary Turner <zturner@google.com>
Wed, 2 Mar 2016 22:05:52 +0000 (22:05 +0000)
committerZachary Turner <zturner@google.com>
Wed, 2 Mar 2016 22:05:52 +0000 (22:05 +0000)
commit74e08ca05cc9bcd67660ec60ae883de99c984afe
tree9880a0d30277c877ecac0506c8350cb419f3f29d
parent6470f7615cf67423f4f719610ea128e886ce6195
Add support for reading line tables from PDB files.

PDB is Microsoft's debug information format, and although we
cannot yet generate it, we still must be able to consume it.
Reason for this is that debug information for system libraries
(e.g. kernel32, C Runtime Library, etc) only have debug info
in PDB format, so in order to be able to support debugging
of system code, we must support it.

Currently this code should compile on every platform, but on
non-Windows platforms the PDB plugin will return 0 capabilities,
meaning that for now PDB is only supported on Windows.  This
may change in the future, but the API is designed in such a way
that this will require few (if any) changes on the LLDB side.
In the future we can just flip a switch and everything will
work.

This patch only adds support for line tables.  It does not return
information about functions, types, global variables, or anything
else.  This functionality will be added in a followup patch.

Differential Revision: http://reviews.llvm.org/D17363
Reviewed by: Greg Clayton

llvm-svn: 262528
24 files changed:
lldb/cmake/LLDBDependencies.cmake
lldb/cmake/modules/AddLLDB.cmake
lldb/include/lldb/Host/FileSpec.h
lldb/include/lldb/Host/windows/HostInfoWindows.h
lldb/source/API/SystemInitializerFull.cpp
lldb/source/Host/common/FileSpec.cpp
lldb/source/Host/windows/HostInfoWindows.cpp
lldb/source/Initialization/SystemInitializerCommon.cpp
lldb/source/Plugins/SymbolFile/CMakeLists.txt
lldb/source/Plugins/SymbolFile/PDB/CMakeLists.txt [new file with mode: 0644]
lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp [new file with mode: 0644]
lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h [new file with mode: 0644]
lldb/unittests/CMakeLists.txt
lldb/unittests/SymbolFile/CMakeLists.txt [new file with mode: 0644]
lldb/unittests/SymbolFile/PDB/CMakeLists.txt [new file with mode: 0644]
lldb/unittests/SymbolFile/PDB/Inputs/test-dwarf.cpp [new file with mode: 0644]
lldb/unittests/SymbolFile/PDB/Inputs/test-dwarf.exe [new file with mode: 0644]
lldb/unittests/SymbolFile/PDB/Inputs/test-pdb-alt.cpp [new file with mode: 0644]
lldb/unittests/SymbolFile/PDB/Inputs/test-pdb-nested.h [new file with mode: 0644]
lldb/unittests/SymbolFile/PDB/Inputs/test-pdb.cpp [new file with mode: 0644]
lldb/unittests/SymbolFile/PDB/Inputs/test-pdb.exe [new file with mode: 0644]
lldb/unittests/SymbolFile/PDB/Inputs/test-pdb.h [new file with mode: 0644]
lldb/unittests/SymbolFile/PDB/Inputs/test-pdb.pdb [new file with mode: 0644]
lldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp [new file with mode: 0644]