summaryrefslogtreecommitdiff
path: root/llvm/lib/DebugInfo/PDB/Native/SymbolCache.cpp
AgeCommit message (Collapse)Author
2025-03-23[DebugInfo] Avoid repeated hash lookups (NFC) (#132586)Kazu Hirata
2024-11-18[PDB] Fix missing `consumeError` which raise error with asserts enabled ↵Romain Thomas
(#116480) As mentioned in the title, the missing `consumeError` triggers assertions.
2024-10-15[DebugInfo] Avoid repeated hash lookups (NFC) (#112298)Kazu Hirata
2024-06-29[llvm] Use std::make_unique (NFC) (#97165)Kazu Hirata
This patch is based on clang-tidy's modernize-make-unique but limited to those cases where type names are mentioned twice like std::unique_ptr<Type>(new Type()), which is a bit mouthful.
2022-03-12Cleanup includes: DebugInfo & CodeGenserge-sans-paille
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D121332
2022-03-01[PDB] Add char8_t typeZequan Wu
Differential Revision: https://reviews.llvm.org/D120690
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
2021-12-08[llvm] Use range-based for loops (NFC)Kazu Hirata
2021-01-17[llvm] Use llvm::sort (NFC)Kazu Hirata
2021-01-10[CodeGen, DebugInfo] Use llvm::find_if (NFC)Kazu Hirata
2021-01-04[DebugInfo] Use llvm::append_range (NFC)Kazu Hirata
2020-12-17[llvm-symbolizer][Windows] Add start line when searching in line table sections.Amy Huang
Fixes issue where if a line section doesn't start with a line number then the addresses at the beginning of the section don't have line numbers. For example, for a line section like this ``` 0001:00000010-00000014, line/column/addr entries = 1 7 00000013 ! ``` a line number wouldn't be found for addresses from 10 to 12. This matches behavior when using the DIA SDK. Differential Revision: https://reviews.llvm.org/D93306
2020-12-12fix typos to cycle botsNico Weber
2020-11-17[llvm-symbolizer] Add inline stack traces for Windows.Amy Huang
This adds inline stack frames for symbolizing on Windows. Differential Revision: https://reviews.llvm.org/D88988
2020-07-21[PDB][NativeSession] Clean up some things in NativeSession.Amy Huang
-Use the actual sect/offset to keep track of symbols in the cache so they don't get created multiple times with different addresses. -Remove getSymTag from PDBFunctionSymbol/PDBPublicSymbol because it's already implemented in the base class -Merge the symbolizer test files for DIA and native, since the tests are the same. -Implement getCompilandId for NativeLineNumber Reviewed By: amccarth Differential Revision: https://reviews.llvm.org/D84208
2020-07-07[NativeSession] Add column numbers to NativeLineNumber.Amy Huang
Summary: This adds column numbers if they are present, and otherwise sets the column number to be zero. Bug: https://bugs.llvm.org/show_bug.cgi?id=41795 Reviewers: amccarth Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D81950
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-05-13[NativeSession] Implement NativeSession::findSymbolByAddress.Amy Huang
Summary: This implements searching for function symbols and public symbols by address. More specifically, -Implements NativeSession::findSymbolByAddress for function symbols and public symbols. I think data symbols are also searched for, but isn't implemented in this patch. -Adds classes for NativeFunctionSymbol and NativePublicSymbol -Adds a '-use-native-pdb-reader' option to llvm-symbolizer, for testing purposes. Reviewers: rnk, amccarth, labath Subscribers: mgorny, hiraditya, MaskRay, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D79269
2018-12-03Don't build the Tpi Hash map by default.Zachary Turner
This is very slow and should be done for specific cases where lookups will need to happen. llvm-svn: 348160
2018-10-01[PDB] Add support for dumping Typedef records.Zachary Turner
These work a little differently because they are actually in the globals stream and are treated as symbol records, even though DIA presents them as types. So this also adds the necessary infrastructure to cache records that live somewhere other than the TPI stream as well. llvm-svn: 343507
2018-10-01[PDB] Add support for parsing VFTable Shape records.Zachary Turner
This allows them to be returned from the native API. llvm-svn: 343506
2018-09-30[PDB] Add native support for dumping array types.Zachary Turner
llvm-svn: 343412
2018-09-21[NativePDB] Add support for reading function signatures.Zachary Turner
This adds support for parsing function signature records and returning them through the native DIA interface. llvm-svn: 342780
2018-09-21[PDB] Add native reading support for UDT / class types.Zachary Turner
This allows the native reader to find records of class/struct/ union type and dump them. This behavior is tested by using the diadump subcommand against golden output produced by actual DIA SDK on the same PDB file, and again using pretty -native to confirm that we actually dump the classes. We don't find class members or anything like that yet, for now it's just the class itself. llvm-svn: 342779
2018-09-20[PDB] Better printing of builtin types when using DIA dumper.Zachary Turner
llvm-svn: 342658
2018-09-18[PDB] Better support for enumerating pointer types.Zachary Turner
There were several issues with the previous implementation. 1) There were no tests. 2) We didn't support creating PDBSymbolTypePointer records for builtin types since those aren't described by LF_POINTER records. 3) We didn't support a wide enough variety of builtin types even ignoring pointers. This patch fixes all of these issues. In order to add tests, it's helpful to be able to ignore the symbol index id hierarchy because it makes the golden output from the DIA version not match our output, so I've extended the dumper to disable dumping of id fields. llvm-svn: 342493
2018-09-17[PDB] Make the native reader support enumerators.Zachary Turner
Previously we would dump the names of enum types, but not their enumerator values. This adds support for enumerator values. In doing so, we have to introduce a general purpose mechanism for caching symbol indices of field list members. Unlike global types, FieldList members do not have a TypeIndex. So instead, we identify them by the pair {TypeIndexOfFieldList, IndexInFieldList}. llvm-svn: 342415
2018-09-17[PDB] Make the native reader support modified types.Zachary Turner
Previously for cv-qualified types, we would just ignore them and they would never get printed. Now we can enumerate them and cache them like any other symbol type. llvm-svn: 342414
2018-09-14[PDB] Refactor a little of the Symbol creation code.Zachary Turner
Eventually we need to be able to support nested types, which don't have an associated CVType record. To handle this, remove the CVType from all of the record classes, and instead store the deserialized record. Then move the deserialization up to the thing that creates the type. This actually makes error handling better anyway as we can return an invalid symbol instead of asserting false. llvm-svn: 342284
2018-09-07[PDB] Support pointer types in the native reader.Zachary Turner
In order to start testing this, I've added a new mode to llvm-pdbutil which is only really useful for writing tests. It just dumps the value of raw fields in record format. This isn't really ideal and it won't allow us to test some important cases, but it's better than nothing for now. llvm-svn: 341729
2018-09-07[PDB] Rename some files in the native reader.Zachary Turner
By calling these NativeType<foo>.cpp, they will all be sorted together, and it also distinguishes the types from the symbols. llvm-svn: 341609
2018-09-07[PDB] Create a SymbolCache class.Zachary Turner
Part of the responsibility of the native PDB reader is to cache symbols the first time they are accessed, so they can then be looked up by an ID. Furthermore, we need to resolve type indices to records that we vend to the user, and other things. Previously this code was all thrown together a bit haphazardly in the native session class, but it makes sense to collect all of this into a single class whose sole responsibility is to manage the collection of known symbols. llvm-svn: 341608