Commit Graph

25 Commits

Author SHA1 Message Date
Zachary Turner
ff6f472575 Fix compilation of PDBApiTest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236345 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-01 20:51:49 +00:00
Zachary Turner
9d74bda3e3 [PDB] Support executables and source/line info.
Previously DebugInfoPDB could only load data for a PDB given a
path to the PDB.  It could not open an EXE and find the matching
PDB and verify it matched, etc.  This patch adds support for that
so that we can simply load debug information for a PDB directly.

Additionally, this patch extends DebugInfoPDB to support getting
source and line information for symbols.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235237 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-17 22:40:36 +00:00
Benjamin Kramer
df93f4bb0b Purge unused includes throughout libSupport.
NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232976 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-23 18:07:13 +00:00
Frederic Riss
2699722064 Fix -Woverflow warning in unittest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231368 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-05 14:43:15 +00:00
Frederic Riss
17b5682094 DWARFFormValue: Add getAsSignedConstant method.
The implementation accepts explicitely signed forms (DW_FORM_sdata),
but also unsigned forms as long as they fit in an int64_t.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231299 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-04 22:07:41 +00:00
Zachary Turner
4ad658d8f1 [llvm-pdbdump] Very minor code cleanup.
This just removes some dead enums as well as some debug flushes
of stdout.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230204 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-23 05:59:14 +00:00
Zachary Turner
f594c2a210 Fix the build, I forgot to check that UnitTests still built.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229021 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-13 01:39:22 +00:00
Zachary Turner
a1a22af397 Fix warning due to unused private member variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228774 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 00:33:00 +00:00
Zachary Turner
ab884fa603 Convert std::make_unique<> to llvm::make_unique<>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228768 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-10 23:46:48 +00:00
Zachary Turner
88972080a3 Add missing function and header include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228758 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-10 22:56:21 +00:00
Zachary Turner
1e70854148 Rewrite llvm-pdbdump in terms of LLVMDebugInfoPDB.
This makes llvm-pdbdump available on all platforms, although it
will currently fail to create a dumper if there is no PDB reader
implementation for the current platform.

It implements dumping of compilands and children, which is less
information than was previously available, but it has to be
rewritten from scratch using the new set of interfaces, so the
rest of the functionality will be added back in subsequent commits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228755 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-10 22:43:25 +00:00
Zachary Turner
19332b06c3 Fix build due to mismatched function signatures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228752 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-10 21:40:29 +00:00
Zachary Turner
926749af90 DebugInfoPDB: Make the symbol base case hold an IPDBSession ref.
Dumping a symbol often requires access to data that isn't inside
the symbol hierarchy, but which is only accessible through the
top-level session.  This patch is a pure interface change to give
symbols a reference to the session.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228542 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-08 20:58:09 +00:00
Zachary Turner
e642985be9 Some cleanup for libpdb.
This patch implements a few of the optional suggestions from the
initial patch comitting libpdb.  In particular, it implements a
virtual function out of line for each of the concrete classes.

A few other minor cleanups exist as well, such as using override
instead of virtual, etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228516 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-08 00:29:29 +00:00
Chandler Carruth
7e940c4725 Consistently use override rather than virtual.
This fixes -Winconsistent-missing-override warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228489 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-07 08:12:22 +00:00
Zachary Turner
6a03769d1c Change RHS-style decltype to LHS-style decltype<declval()>.
Seems some compilers don't like the RHS-style decltype specifier.

This should fix the buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228484 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-07 02:02:23 +00:00
Zachary Turner
d0898f1565 Resubmit unittests for DebugInfoPDB.
These were originally submitted as part of r228428, but this part
caused a build breakage in LLVMConfig.  The library portion was
resubmitted independently since it was not causing breakage.

There were two reasons this was causing the build to fail.  The
first is that there were no Makefiles added for the PDB tests.  And
the second is that the DebugInfoPDB library was only being built by
CMake behind an "if (MSVC)" check.  This is wrong since this the
library hides platform specific details, and it was causing
LLVM-Config to not find the library when trying to build unittests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228482 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-07 01:47:14 +00:00
Zachary Turner
9c505a5d38 Revert "Create lib/DebugInfo/PDB."
This reverts commit 21028, as it is causing failures in LLVMConfig.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228431 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-06 20:00:18 +00:00
Zachary Turner
1a05c567d6 Create lib/DebugInfo/PDB.
This patch creates a platform-independent interface to a PDB reader.
There is currently no implementation of this interface, which will
be provided in future patches.  This defines the basic object model
which any implementation must conform to.

Reviewed by: David Blaikie
Differential Revision: http://reviews.llvm.org/D7356

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228428 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-06 19:44:09 +00:00
Zachary Turner
50418a0ac4 Move DebugInfo to DebugInfo/DWARF.
In preparation for adding PDB support to LLVM, this moves the
DWARF parsing code to its own subdirectory under DebugInfo, and
renames LLVMDebugInfo to LLVMDebugInfoDWARF.

This is purely a mechanical / build system change.

Differential Revision: http://reviews.llvm.org/D7269
Reviewed by: Eric Christopher

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227586 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-30 18:07:45 +00:00
NAKAMURA Takumi
3aabdebde2 [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196908 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-10 11:13:32 +00:00
Alexey Samsonov
636a5cb8de DWARF parser: propery handle DW_FORM_ref_sig8 and fix Windows build.
Based on D2050 by Timur Iskhodzhanov.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193619 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-29 16:32:19 +00:00
Alexey Samsonov
6faff4886a DWARF parser: Use ArrayRef to represent form sizes and simplify DWARFDIE::extractFast() interface. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193560 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 23:41:49 +00:00
Alexey Samsonov
c5253237f8 DebugInfo: Introduce the notion of "form classes"
Summary:
Use DWARF4 table of form classes to fetch attributes from DIE
in a more consistent way. This shouldn't change the functionality and
serves as a refactoring for upcoming change: DW_AT_high_pc has different
semantics depending on its form class.

Reviewers: dblaikie, echristo

Reviewed By: echristo

CC: echristo, llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1961

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193553 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 23:01:48 +00:00
Alexey Samsonov
cd61455798 Create a stub for DWARF parser unittests
Moves one DWARF-specific header to include/llvm/DebugInfo from lib/.
Add a short unittest for r179095.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179678 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-17 08:29:02 +00:00