History log of /llvm-project/llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp (Results 26 – 50 of 59)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-7.0.0
# cae73458 10-Sep-2018 Zachary Turner <zturner@google.com>

[PDB] Change uint32_t to SymIndex wherever it makes sense.

Although it's just a typedef, it helps for readability. NFC.

llvm-svn: 341863


Revision tags: llvmorg-7.0.0-rc3
# 5d629966 07-Sep-2018 Zachary Turner <zturner@google.com>

[PDB] Rename some files in the native reader.

By calling these NativeType<foo>.cpp, they will all be sorted
together, and it also distinguishes the types from the symbols.

llvm-svn: 341609


# 8ab7dd60 07-Sep-2018 Zachary Turner <zturner@google.com>

[PDB] Create a SymbolCache class.

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 n

[PDB] Create a SymbolCache class.

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

show more ...


# 7999b4fa 05-Sep-2018 Zachary Turner <zturner@google.com>

[PDB] Refactor the PDB symbol classes to fix a reuse bug.

The way DIA SDK works is that when you request a symbol, it
gets assigned an internal identifier that is unique for the
life of the session.

[PDB] Refactor the PDB symbol classes to fix a reuse bug.

The way DIA SDK works is that when you request a symbol, it
gets assigned an internal identifier that is unique for the
life of the session. You can then use this identifier to
get back the same symbol, with all of the same internal state
that it had before, even if you "destroyed" the original
copy of the object you had.

This didn't work properly in our native implementation, and
if you destroyed an object for a particular symbol, then
requested the same symbol again, it would get assigned a new
ID and you'd get a fresh copy of the object. In order to fix
this some refactoring had to happen to properly reuse cached
objects. Some unittests are added to verify that symbol
reuse is taking place, making use of the new unittest input
feature.

llvm-svn: 341503

show more ...


# 6a7efef4 31-Aug-2018 Alexandre Ganea <alexandre.ganea@ubisoft.com>

[DebugInfo] Common behavior for error types

Following D50807, and heading towards D50664, this intermediary change does the following:

1. Upgrade all custom Error types in llvm/trunk/lib/DebugInfo/

[DebugInfo] Common behavior for error types

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

show more ...


Revision tags: llvmorg-7.0.0-rc2, llvmorg-7.0.0-rc1, llvmorg-6.0.1, llvmorg-6.0.1-rc3, llvmorg-6.0.1-rc2, llvmorg-6.0.1-rc1
# 3dca0bed 10-Apr-2018 Aaron Smith <aaron.smith@microsoft.com>

[DebugInfoPDB] Add DIA implementations of findSymbolByRVA and findSymbolByAddr

llvm-svn: 329724


Revision tags: llvmorg-5.0.2, llvmorg-5.0.2-rc2
# ed81a9db 26-Mar-2018 Aaron Smith <aaron.smith@microsoft.com>

[DebugInfoPDB] Add DIA implementation of findLineNumbersByRVA

This method is used to find line numbers for PDBSymbolData
that have an invalid virtual address.

llvm-svn: 328586


# 53708a5e 26-Mar-2018 Aaron Smith <aaron.smith@microsoft.com>

[DebugInfoPDB] Add DIA implementation of addressForVA and addressForRVA

These are used in finding line numbers for PDBSymbolData

llvm-svn: 328585


# 523de05a 22-Mar-2018 Aaron Smith <aaron.smith@microsoft.com>

[DIA] Add IPDBSectionContrib interfaces and DIA implementation

To resolve symbol context at a particular address, we need to
determine the compiland for the address. We are able to determine
the par

[DIA] Add IPDBSectionContrib interfaces and DIA implementation

To resolve symbol context at a particular address, we need to
determine the compiland for the address. We are able to determine
the parent compiland of PDBSymbolFunc, PDBSymbolTypeUDT,
PDBSymbolTypeEnum symbols indirectly through line information.
However no such information is availabile for PDBSymbolData,
i.e. variables.

The Section Contribution table from PDBs has information about
each compiland's contribution to sections by address. For example,
a piece of a contribution looks like,

VA RelativeVA Sect No. Offset Length Compiland
14000087B0 000087B0 0001 000077B0 000000BB exe_main.obj

So given an address, it's possible to determine its compiland with
this information.

llvm-svn: 328178

show more ...


Revision tags: llvmorg-5.0.2-rc1
# 40198f59 15-Mar-2018 Aaron Smith <aaron.smith@microsoft.com>

[DebugInfo] Add a new method IPDBSession::findLineNumbersBySectOffset

Summary:
Some PDB symbols do not have a valid VA or RVA but have Addr by Section and Offset. For example, a variable in thread-l

[DebugInfo] Add a new method IPDBSession::findLineNumbersBySectOffset

Summary:
Some PDB symbols do not have a valid VA or RVA but have Addr by Section and Offset. For example, a variable in thread-local storage has the following properties:

get_addressOffset: 0
get_addressSection: 5
get_lexicalParentId: 2
get_name: g_tls
get_symIndexId: 12
get_typeId: 4
get_dataKind: 6
get_symTag: 7
get_locationType: 2

This change provides a new method to locate line numbers by Section and Offset from those symbols.

Reviewers: zturner, rnk, llvm-commits

Subscribers: asmith, JDevlieghere

Differential Revision: https://reviews.llvm.org/D44407

llvm-svn: 327601

show more ...


# 679aeadd 13-Mar-2018 Zachary Turner <zturner@google.com>

[PDB] Support dumping injected sources via the DIA reader.

Injected sources are basically a way to add actual source file content
to your PDB. Presumably you could use this for shipping your source

[PDB] Support dumping injected sources via the DIA reader.

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

show more ...


Revision tags: llvmorg-6.0.0, llvmorg-6.0.0-rc3
# 89a19ac3 23-Feb-2018 Aaron Smith <aaron.smith@microsoft.com>

[PDB] Check the result of setLoadAddress()

Summary: Change setLoadAddress() to return true or false on failure.

Reviewers: zturner, llvm-commits

Reviewed By: zturner

Differential Revision: https:

[PDB] Check the result of setLoadAddress()

Summary: Change setLoadAddress() to return true or false on failure.

Reviewers: zturner, llvm-commits

Reviewed By: zturner

Differential Revision: https://reviews.llvm.org/D43638

llvm-svn: 325843

show more ...


Revision tags: llvmorg-6.0.0-rc2, llvmorg-6.0.0-rc1, llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2
# 89bca9e5 16-Nov-2017 Aaron Smith <aaron.smith@microsoft.com>

[DebugInfo/PDB] Adding getUndecoratedNameEx and IPDB interfaces for IDiaEnumTables and IDiaTable.

Initial changes to support debugging PE/COFF files with LLDB on Windows through DIA SDK.
There is an

[DebugInfo/PDB] Adding getUndecoratedNameEx and IPDB interfaces for IDiaEnumTables and IDiaTable.

Initial changes to support debugging PE/COFF files with LLDB on Windows through DIA SDK.
There is another set of changes required on the LLDB side before this does anything.

Differential Revision: https://reviews.llvm.org/D39517

llvm-svn: 318403

show more ...


Revision tags: llvmorg-5.0.1-rc1
# 75257bc2 20-Oct-2017 Peter Collingbourne <peter@pcc.me.uk>

COFF: Add type server pdb files to linkrepro tar file.

Differential Revision: https://reviews.llvm.org/D38977

llvm-svn: 316233


Revision tags: llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3, llvmorg-5.0.0-rc2
# b41f03e7 04-Aug-2017 Adrian McCarthy <amccarth@google.com>

Enable llvm-pdbutil to list enumerations using native PDB reader

This extends the native reader to enable llvm-pdbutil to list the enums in a
PDB and it includes a simple test. It does not yet list

Enable llvm-pdbutil to list enumerations using native PDB reader

This extends the native reader to enable llvm-pdbutil to list the enums in a
PDB and it includes a simple test. It does not yet list the values in the
enumerations, which requires an actual implementation of
NativeEnumSymbol::FindChildren.

To exercise this code, use a command like:

llvm-pdbutil pretty -native -enums foo.pdb

Differential Revision: https://reviews.llvm.org/D35738

llvm-svn: 310144

show more ...


Revision tags: llvmorg-5.0.0-rc1
# 0962cb2e 12-Jul-2017 Reid Kleckner <rnk@google.com>

Fix non-Windows build after PDB native builtin type change

Some C++14 features slipped in along with an extra member qualification.

llvm-svn: 307835


# 8d090fc5 12-Jul-2017 Adrian McCarthy <amccarth@google.com>

[PDB] Enable NativeSession to create symbols for built-in types on demand

Summary:
There is a reserved range of type indexes for built-in types (like integers).
This will create a symbol for a built

[PDB] Enable NativeSession to create symbols for built-in types on demand

Summary:
There is a reserved range of type indexes for built-in types (like integers).
This will create a symbol for a built-in type if the caller askes for one by
type index. This is also plumbing for being able to recall symbols by type
index in general, but user-defined types will come in subsequent patches.

Reviewers: rnk, zturner

Subscribers: mgorny, hiraditya, llvm-commits

Differential Revision: https://reviews.llvm.org/D35163

llvm-svn: 307834

show more ...


# bf0afc32 28-Jun-2017 Adrian McCarthy <amccarth@google.com>

Introduce symbol cache to PDB NativeSession

Instead of creating symbols directly in the findChildren methods of the native
symbol implementations, they will rely on the NativeSession to act as a fac

Introduce symbol cache to PDB NativeSession

Instead of creating symbols directly in the findChildren methods of the native
symbol implementations, they will rely on the NativeSession to act as a factory
for these types. This lets NativeSession cache the NativeRawSymbols in its
new symbol cache and makes that cache the source of unique IDs for the symbols.

Right now, this affects only NativeCompilandSymbols. There's no external
change yet, so I think the existing tests are still sufficient. Coming soon
are patches to extend this to built-in types and enums.

llvm-svn: 306610

show more ...


# 31bcb6f6 22-Jun-2017 Adrian McCarthy <amccarth@google.com>

Add IDs and clone methods to NativeRawSymbol

All NativeRawSymbols will have a unique symbol ID (retrievable via
getSymIndexId). For now, these are initialized to 0, but soon the
NativeSession will

Add IDs and clone methods to NativeRawSymbol

All NativeRawSymbols will have a unique symbol ID (retrievable via
getSymIndexId). For now, these are initialized to 0, but soon the
NativeSession will be responsible for creating the raw symbols, and it will
assign unique IDs.

The symbol cache in the NativeSession will also require the ability to clone
raw symbols, so I've provided implementations for that as well.

llvm-svn: 306042

show more ...


# 6a4b080a 22-Jun-2017 Adrian McCarthy <amccarth@google.com>

Make IPDBSession::getGlobalScope a non-const method

There doesn't seem to be a compelling reason why this method should be const
other than it was possible with the DIA implementation. The native s

Make IPDBSession::getGlobalScope a non-const method

There doesn't seem to be a compelling reason why this method should be const
other than it was possible with the DIA implementation. The native session
is going to act as a symbol factory and cache. This could be acheived with
mutable (and the existing const_cast), but it seems cleaner to accept that
this method affects the state of the session.

This change eliminates an existing const_cast.

llvm-svn: 306041

show more ...


Revision tags: llvmorg-4.0.1, llvmorg-4.0.1-rc3, llvmorg-4.0.1-rc2, llvmorg-4.0.1-rc1
# c883a8c6 12-Apr-2017 Zachary Turner <zturner@google.com>

[llvm-pdbdump] More advanced class definition dumping.

Previously the dumping of class definitions was very primitive,
and it made it hard to do more than the most trivial of output
formats when dum

[llvm-pdbdump] More advanced class definition dumping.

Previously the dumping of class definitions was very primitive,
and it made it hard to do more than the most trivial of output
formats when dumping. As such, we would only dump one line for
each field, and then dump non-layout items like nested types
and enums.

With this patch, we do a complete analysis of the object
hierarchy including aggregate types, bases, virtual bases,
vftable analysis, etc. The only immediately visible effects
of this are that a) we can now dump a line for the vfptr where
before we would treat that as padding, and b) we now don't
treat virtual bases that come at the end of a class as padding
since we have a more detailed analysis of the class's storage
usage.

In subsequent patches, we should be able to use this analysis
to display a complete graphical view of a class's layout including
recursing arbitrarily deep into an object's base class / aggregate
member hierarchy.

llvm-svn: 300133

show more ...


# 4d93d66d 29-Mar-2017 Adrian McCarthy <amccarth@google.com>

Re-land: "Make NativeExeSymbol a concrete subclass of NativeRawSymbol [PDB]"

This should work on all platforms now that r299006 has landed. Tested locally
on Windows and Linux.

This moves exe symb

Re-land: "Make NativeExeSymbol a concrete subclass of NativeRawSymbol [PDB]"

This should work on all platforms now that r299006 has landed. Tested locally
on Windows and Linux.

This moves exe symbol-specific method implementations out of NativeRawSymbol
into a concrete subclass. Also adds implementations for hasCTypes and
hasPrivateSymbols and a simple test to ensure the native reader can access the
summary information for the executable from the PDB.

Original Differential Revision: https://reviews.llvm.org/D31059

llvm-svn: 299019

show more ...


# 3c0328e0 23-Mar-2017 Adrian McCarthy <amccarth@google.com>

Somehow this still breaks because of ANSI color codes in test output on Linux.
Reverting until I can figure out the root cause.

Revert "Re-land: Make NativeExeSymbol a concrete subclass of NativeRa

Somehow this still breaks because of ANSI color codes in test output on Linux.
Reverting until I can figure out the root cause.

Revert "Re-land: Make NativeExeSymbol a concrete subclass of NativeRawSymbol [PDB]"

This reverts commit f461a70cc376f0f91c8b4917be79479cc86330a5.

llvm-svn: 298626

show more ...


# 997a15c3 23-Mar-2017 Adrian McCarthy <amccarth@google.com>

Re-land: Make NativeExeSymbol a concrete subclass of NativeRawSymbol [PDB]

The new test should pass on all platforms now that llvm-pdbdump has the
`-color-output` option.

This moves exe symbol-spe

Re-land: Make NativeExeSymbol a concrete subclass of NativeRawSymbol [PDB]

The new test should pass on all platforms now that llvm-pdbdump has the
`-color-output` option.

This moves exe symbol-specific method implementations out of NativeRawSymbol
into a concrete subclass. Also adds implementations for hasCTypes and
hasPrivateSymbols and a simple test to ensure the native reader can access
the summary information for the executable from the PDB.

Original Differential Revision: https://reviews.llvm.org/D31059

llvm-svn: 298623

show more ...


# 2d9c0820 17-Mar-2017 Zachary Turner <zturner@google.com>

Revert "Make NativeExeSymbol a concrete subclass of NativeRawSymbol [PDB]"

For some reason this is causing ANSI color codes to be printed
even when run through FileCheck.

llvm-svn: 298026


123