summaryrefslogtreecommitdiff
path: root/llvm/lib/DebugInfo/PDB/PDB.cpp
AgeCommit message (Collapse)Author
2022-02-23Cleanup llvm/DebugInfo/PDB headersserge-sans-paille
accumulated preprocessed size: before: 1065515095 after: 1065629059 Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D120195
2020-06-15[NativeSession] Implement findLineNumbersByAddress in NativeSession,Amy Huang
which takes an address and a length and returns all lines within that address range.
2020-04-21Reland "Implement some functions in NativeSession." with fixes so thatAmy Huang
the tests pass on Linux. Summary: This change implements readFromExe, and calculating VA and RVA, which are some of the functionalities that will be used for native PDB reading for llvm symbolizer. bug: https://bugs.llvm.org/show_bug.cgi?id=41795
2020-04-21Revert "Implement some NativeSession functions" along with someAmy Huang
followup fixes. This reverts commits a6d8a055e92eb4853805d1ad1be0b1a6523524ef 4927ae085807731eb4052e0a682443fe9399b512 1e1f5eb7c978da3b062daaf3c32c459704e65a55
2020-04-21Implement some functions in NativeSession.Amy Huang
Summary: This change implements readFromExe, and calculating VA and RVA, which are some of the functionalities that will be used for native PDB reading for llvm symbolizer. bug: https://bugs.llvm.org/show_bug.cgi?id=41795 Reviewers: hans, amccarth, rnk Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D78128
2019-01-19Update the file headers across all of the LLVM projects in the monorepoChandler Carruth
to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
2018-08-31[DebugInfo] Common behavior for error typesAlexandre Ganea
Following D50807, and heading towards D50664, this intermediary change does the following: 1. Upgrade all custom Error types in llvm/trunk/lib/DebugInfo/ to use the new StringError behavior (D50807). 2. Implement std::is_error_code_enum and make_error_code() for DebugInfo error enumerations. 3. Rename GenericError -> PDBError (the file will be renamed in a subsequent commit) 4. Update custom error messages to follow the same formatting: (\w\s*)+\. 5. Keep generic "file not found" (ENOENT) errors as they are in PDB code. Previously, there used to be a custom enumeration for that purpose. 6. Remove a few extraneous LF in log() implementations. Printing LF is a responsability at a higher level, not at the error level. Differential Revision: https://reviews.llvm.org/D51499 llvm-svn: 341228
2017-11-17Don't #include MemoryBuffer.h from Host.h.Zachary Turner
It turns out this #include isn't used from Host.h anyway, but by having it it causes circular include dependencies. This issues only surfaced while I was working on a separate patch, so I'm submitting this first so that it's independent of the other, unrelated patch. llvm-svn: 318489
2017-10-20COFF: Add type server pdb files to linkrepro tar file.Peter Collingbourne
Differential Revision: https://reviews.llvm.org/D38977 llvm-svn: 316233
2017-06-30[CodeView, PDB] Fix some Clang-tidy modernize and Include What You Use ↵Eugene Zelenko
warnings; other minor fixes (NFC). llvm-svn: 306911
2017-01-27NFC: Rename PDB_ReaderType::Raw to Native for consistency with the ↵Adrian McCarthy
NativeSession rename. llvm-svn: 293235
2017-01-25NFC: Rename (PDB) RawSession to NativeSessionAdrian McCarthy
This eliminates one overload on the term Raw. Differential Revision: https://reviews.llvm.org/D29098 llvm-svn: 293104
2017-01-02[cmake] Add LLVM_ENABLE_DIA_SDK option, and expose it in LLVMConfigMichal Gorny
Add an explicit LLVM_ENABLE_DIA_SDK option to control building support for DIA SDK-based debugging. Control its value to match whether DIA SDK support was found and expose it in LLVMConfig (alike LLVM_ENABLE_ZLIB). Its value is needed for LLDB to determine whether to run tests requiring DIA support. Currently it is obtained from llvm/Config/config.h; however, this file is not available for standalone builds. Following this change, LLDB will be modified to use the value from LLVMConfig. Differential Revision: https://reviews.llvm.org/D26255 llvm-svn: 290818
2016-05-06Add missing include.Zachary Turner
llvm-svn: 268792
2016-05-06Port DebugInfoPDB over to using llvm::Error.Zachary Turner
Differential Revision: http://reviews.llvm.org/D19940 Reviewed By: rnk llvm-svn: 268791
2016-05-04Move pdb code into pdb namespace.Zachary Turner
llvm-svn: 268544
2016-04-29Put PDB parsing code into a pdb namespace.Zachary Turner
llvm-svn: 268072
2016-04-25Resubmit "Refactor raw pdb dumper into library"Zachary Turner
This fixes a number of endianness issues as well as an ODR violation that hopefully causes everything to be happy. llvm-svn: 267431
2016-04-22Revert r267049, r26706[16789], r267071 - Refactor raw pdb dumper into libraryDaniel Sanders
r267049 broke multiple buildbots (e.g. clang-cmake-mips, and clang-x86_64-linux-selfhost-modules) which the follow-ups have not yet resolved and this is preventing subsequent committers from being notified about additional failures on the affected buildbots. llvm-svn: 267148
2016-04-21Fix -Wreturn-type warning with HAVE_DIA_SDK is false.Zachary Turner
llvm-svn: 267068
2016-04-21Refactor raw pdb dumper into libraryZachary Turner
PDB parsing code was hand-rolled into llvm-pdbdump. This patch moves the parsing of this code into DebugInfoPDB and makes the dumper use this. This is achieved by implementing the skeleton of RawPdbSession, the non-DIA counterpart to the existing PDB read interface. None of the type / source file / etc information is accessible yet, so this implementation is not yet close to achieving parity with the DIA counterpart, but the RawSession class simply holds a reference to a PDBFile class which handles parsing the file format. Additionally a PDBStream class is introduced which allows accessing the bytes of a particular stream in a PDB file. Differential Revision: http://reviews.llvm.org/D19343 Reviewed By: majnemer llvm-svn: 267049
2016-04-19[llvm-pdbdump] Print a better error message when PDB loading fails.Zachary Turner
Differential Revision: http://reviews.llvm.org/D19234 llvm-svn: 266772
2015-12-17Test commitDave Bartolomeo
llvm-svn: 255926
2015-04-17[PDB] Support executables and source/line info.Zachary Turner
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. llvm-svn: 235237
2015-02-28[llvm-pdbdump] Better error handling.Zachary Turner
Previously it was impossible to distinguish between "There is no PDB implementation for this platform" and "I tried to load the PDB, but couldn't find the file", making it hard to figure out if you built llvm-pdbdump incorrectly or if you just mistyped a file name. This patch adds proper error handling so that we can know exactly what went wrong. llvm-svn: 230868
2015-02-14llvm-pdbdump: Re-order header files according to LLVM style guide.Zachary Turner
llvm-svn: 229231
2015-02-13Re-sort #include lines using my handy dandy ./utils/sort_includes.pyChandler Carruth
script. This is in preparation for changes to lots of include lines. llvm-svn: 229088
2015-02-10Provide DIA implementation of DebugInfoPDB.Zachary Turner
This implements DebugInfoPDB when the DIA SDK is present on the system. Specifically, this means that the following conditions are met: 1) You are building on Windows. 2) You are building with MSVC. 3) Visual Studio did not corrupt the installation of DIA due to a known issue with side-by-side installations of VS2012 and VS2013. If all of these conditions are true, you will be able to pass a value of PDB_Reader::DIA to PDB::createPdbReader(). There are no tests for this yet, as any test will be in the form of a lit test which tests the llvm-pdbdump.exe, which still needs to be rewritten in terms of this library. llvm-svn: 228747
2015-02-06Resubmit "Create lib/DebugInfo/PDB" (r228428)Zachary Turner
This change resubmits the patch that broke the build, this time without unittests. The unittests will be submitted separately after the problem has been addressed: --Original Commit Message-- 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 llvm-svn: 228435
2015-02-06Revert "Create lib/DebugInfo/PDB."Zachary Turner
This reverts commit 21028, as it is causing failures in LLVMConfig. llvm-svn: 228431
2015-02-06Create lib/DebugInfo/PDB.Zachary Turner
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 llvm-svn: 228428