summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/PDB/PDBExtras.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [DebugInfoPDB] Add a few missing definitions to PDBTypes.hAaron Smith2018-04-031-0/+3
| | | | | | | | | The missing definitions are from cvconst.h shipped with DIA SDK. Correct the url to MSDN for MemoryTypeEnum and set the underlying type of PDB_StackFrameType and PDB_MemoryType to uint16_t. llvm-svn: 329104
* [PDB] Support dumping injected sources via the DIA reader.Zachary Turner2018-03-131-0/+12
| | | | | | | | | | | | | | | | | | Injected sources are basically a way to add actual source file content to your PDB. Presumably you could use this for shipping your source code with your debug information, but in practice I can only find this being used for embedding natvis files inside of PDBs. In order to effectively test LLVM's natvis file injection, we need a way to dump the injected sources of a PDB in a way that is authoritative (i.e. based on Microsoft's understanding of the PDB format, and not LLVM's). To this end, I've added support for dumping injected sources via DIA. I made a PDB file that used the /natvis option to generate a test case. Differential Revision: https://reviews.llvm.org/D44405 llvm-svn: 327428
* Remove redundant includes from lib/DebugInfo.Michael Zolotukhin2017-12-131-1/+0
| | | | llvm-svn: 320620
* Fix -Wcovered-switch-default warnings from r314821Hans Wennborg2017-10-031-3/+2
| | | | llvm-svn: 314826
* CodeView: Provide a .def file with the register idsHans Wennborg2017-10-031-49/+5
| | | | | | | | | | | | | | The list of register ids was previously written out in a couple of dirrent places. This puts it in a .def file and also adds a few more registers (e.g. the x87 regs) which should lead to more readable dumps, but I didn't include the whole list since that seems unnecessary. X86_MC::initLLVMToSEHAndCVRegMapping is pretty ugly, but at least it's not relying on magic constants anymore. The TODO of using tablegen still stands. Differential revision: https://reviews.llvm.org/D38480 llvm-svn: 314821
* Revert "Debug: handle dumping the D language."Tim Northover2017-07-241-1/+0
| | | | | | Reid beat me to it. llvm-svn: 308902
* Debug: handle dumping the D language.Tim Northover2017-07-241-0/+1
| | | | | | | Mostly just to silence a warning about an unhandled case. There don't seem to be any tests for this operator (at least that I could find). llvm-svn: 308901
* Add missing case to switchReid Kleckner2017-07-241-0/+1
| | | | llvm-svn: 308894
* [codeview] Fix YAML for LF_TYPESERVER2 by hoisting PDB_UniqueIdReid Kleckner2017-07-171-6/+0
| | | | | | | | | | | | | | | | | | Summary: We were treating the GUIDs in TypeServer2Record as strings, and the non-ASCII bytes in the GUID would not round-trip through YAML. We already had the PDB_UniqueId type portably represent a Windows GUID, but we need to hoist that up to the DebugInfo/CodeView library so that we can use it in the TypeServer2Record as well as in PDB parsing code. Reviewers: inglorion, amccarth Subscribers: llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D35495 llvm-svn: 308234
* [CodeView, PDB] Fix some Clang-tidy modernize and Include What You Use ↵Eugene Zelenko2017-06-301-2/+2
| | | | | | warnings; other minor fixes (NFC). llvm-svn: 306911
* Properly parse the TypeServer2 record.Zachary Turner2017-02-031-19/+7
| | | | llvm-svn: 294046
* [codeview] Add support for new type records.Zachary Turner2016-05-241-56/+57
| | | | | | | | | | | | | | | | | | | This adds support for parsing and dumping the following symbol types: S_LPROCREF S_ENVBLOCK S_COMPILE2 S_REGISTER S_COFFGROUP S_SECTION S_THUNK32 S_TRAMPOLINE As of this patch, the test PDB files no longer have any unknown symbol types. llvm-svn: 270628
* Move pdb code into pdb namespace.Zachary Turner2016-05-041-16/+24
| | | | llvm-svn: 268544
* Parse and dump PDB DBI Stream Header InformationZachary Turner2016-04-261-0/+28
| | | | | | | | | | | | | | | | | | The DBI stream contains a lot of bookkeeping information for other streams. In particular it contains information about section contributions and linked modules. This patch is a first attempt at parsing some of the information out of the DBI stream. It currently only parses and dumps the headers of the DBI stream, so none of the module data or section contribution data is pulled out. This is just a proof of concept that we understand the basic properties of the DBI stream's metadata, and followup patches will try to extract more detailed information out. Differential Revision: http://reviews.llvm.org/D19500 Reviewed By: majnemer, ruiu llvm-svn: 267585
* [DebugInfoPDB] Teach Variant to support string types.Zachary Turner2016-02-171-11/+14
| | | | | | | | | | The IDiaSymbol::getValue() method returns a variant. Until now, I had never encountered a string value, so the Variant wrapper did not support VT_BSTR. Now we have need to support string values, so this patch just adds support for one extra type to Variant. llvm-svn: 261152
* Fix instance of -Wcovered-switch-defaultReid Kleckner2016-01-131-2/+0
| | | | llvm-svn: 257665
* [readobj] Expand CodeView dumping functionalityReid Kleckner2016-01-131-26/+24
| | | | | | | | | | | | | | | | This rewrites and expands the existing codeview dumping functionality in llvm-readobj using techniques similar to those in lib/Object. This defines a number of new records and enums useful for reading memory mapped codeview sections in COFF objects. The dumper is intended as a testing tool for LLVM as it grows more codeview output capabilities. Reviewers: majnemer Differential Revision: http://reviews.llvm.org/D16104 llvm-svn: 257658
* [llvm-pdbdump] Display full enum definitions.Zachary Turner2015-03-041-2/+2
| | | | | | | | | | | This will now display enum definitions both at the global scope as well as nested inside of classes. Additionally, it will no longer display enums at the global scope if the enum is nested. Instead, it will omit the definition of the enum globally and instead emit it in the corresponding class definition. llvm-svn: 231215
* [llvm-pdbdump] Many minor fixes and improvementsZachary Turner2015-03-021-1/+19
| | | | | | | | | | | | | | | | | A short list of some of the improvements: 1) Now supports -all command line argument, which implies many other command line arguments to simplify usage. 2) Now supports -no-compiler-generated command line argument to exclude compiler generated types. 3) Prints base class list. 4) -class-definitions implies -types. 5) Proper display of bitfields. 6) Can now distinguish between struct/class/interface/union. And a few other minor tweaks. llvm-svn: 230933
* [llvm-pdbdump] Fix dumping of function pointers and basic types.Zachary Turner2015-02-261-25/+0
| | | | | | | | | | | | Function pointers were not correctly handled by the dumper, and they would print as "* name". They now print as "int (__cdecl *name)(int arg1, int arg2)" as they should. Also, doubles were being printed as floats. This fixes that bug as well, and adds tests for all builtin types. as well as a test for function pointers. llvm-svn: 230703
* [llvm-pdbdump] Rewrite dumper using visitor pattern.Zachary Turner2015-02-221-5/+0
| | | | | | | | | | This increases the flexibility of how to dump different symbol types -- necessary for context-sensitive formatting of symbol types -- and also improves the modularity by allowing the dumping to be implemented in the actual dumper, as opposed to in the PDB library. llvm-svn: 230184
* llvm-pdbdump: Re-order header files according to LLVM style guide.Zachary Turner2015-02-141-0/+1
| | | | llvm-svn: 229231
* llvm-pdbdump: Add more comprehensive dumping of symbol types.Zachary Turner2015-02-131-0/+60
| | | | | | | | | In particular this patch adds the ability to dump complete function signature information including argument types as correctly formatted strings. A side effect of this is that almost all symbol and meta types are now formatted. llvm-svn: 229076
* Improve llvm-pdbdump output display.Zachary Turner2015-02-131-10/+87
| | | | | | | | | | | | This patch adds a number of improvements to llvm-pdbdump. 1) Dumping of the entire global scope, and not only those symbols that live in individual compilands. 2) Prepend class name to member functions and data 3) Improved display of bitfields. 4) Support for dumping more kinds of data symbols. llvm-svn: 229012
* Add concrete type overloads to PDBSymbol::findChildren().Zachary Turner2015-02-121-1/+1
| | | | | | | | | | | | Frequently you only want to iterate over children of a specific type (e.g. functions). Previously you would get back a generic interface that allowed iteration over the base symbol type, which you would have to dyn_cast<> each one of. With this patch, we allow the user to specify the concrete type as a template parameter, and it will return an iterator which returns instances of the concrete type directly. llvm-svn: 228960
* Fix some warnings due to -Wcovered-switch-default.Zachary Turner2015-02-111-6/+0
| | | | llvm-svn: 228773
* Rewrite llvm-pdbdump in terms of LLVMDebugInfoPDB.Zachary Turner2015-02-101-0/+219
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. llvm-svn: 228755
OpenPOWER on IntegriCloud