Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# fe1b8a09 21-Jul-2019 Nathan Lanza <[email protected]>

[NativePDB] Make GetOrCreateDeclForUid return an lldb CompilerDecl

We intend to make PdbAstBuilder abstract and implement
PdbAstBuilderClang along with any other languages that wish to use
PDBs. Thu

[NativePDB] Make GetOrCreateDeclForUid return an lldb CompilerDecl

We intend to make PdbAstBuilder abstract and implement
PdbAstBuilderClang along with any other languages that wish to use
PDBs. Thus, change GetOrCreateDeclForUid from returning a clang decl
to a lldb_private::CompilerDecl.

llvm-svn: 366650

show more ...


Revision tags: llvmorg-10-init, llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3, llvmorg-8.0.1-rc2, llvmorg-8.0.1-rc1
# 869f934d 13-May-2019 Aleksandr Urakov <[email protected]>

[NativePDB] Support member function types in PdbAstBuilder

Summary:
This patch implements missing case in PdbAstBuilder::CreateType for
LF_MFUNCTION. This is necessary, for example, in s

[NativePDB] Support member function types in PdbAstBuilder

Summary:
This patch implements missing case in PdbAstBuilder::CreateType for
LF_MFUNCTION. This is necessary, for example, in stack unwinding of struct
methods.

Reviewers: amccarth, aleksandr.urakov

Reviewed By: amccarth

Subscribers: abidh, teemperor, lldb-commits, leonid.mashinskiy

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

llvm-svn: 360569

show more ...


Revision tags: llvmorg-8.0.0, llvmorg-8.0.0-rc5
# 0561be6c 11-Mar-2019 Nathan Lanza <[email protected]>

Add a case in SymbolFile{Native,}PDB::TranslateLanguage for Swift

Summary: see above

Reviewers: compnerd

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

llvm-svn: 355883


Revision tags: llvmorg-8.0.0-rc4
# 0e4c4821 06-Mar-2019 Adrian Prantl <[email protected]>

Pass ConstString by value (NFC)

My apologies for the large patch. With the exception of ConstString.h
itself it was entirely produced by sed.

ConstString has exactly one const char * data member, s

Pass ConstString by value (NFC)

My apologies for the large patch. With the exception of ConstString.h
itself it was entirely produced by sed.

ConstString has exactly one const char * data member, so passing a
ConstString by reference is not any more efficient than copying it by
value. In both cases a single pointer is passed. But passing it by
value makes it harder to accidentally return the address of a local
object.

(This fixes rdar://problem/48640859 for the Apple folks)

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

llvm-svn: 355553

show more ...


Revision tags: llvmorg-8.0.0-rc3
# d1304bba 18-Feb-2019 Pavel Labath <[email protected]>

PECOFF: Implement GetBaseAddress

COFF files are modelled in lldb as having one big container section
spanning the entire module image, with the actual sections being
subsections of that. In this mod

PECOFF: Implement GetBaseAddress

COFF files are modelled in lldb as having one big container section
spanning the entire module image, with the actual sections being
subsections of that. In this model, the base address is simply the
address of the first byte of that section.

This also removes the hack where ObjectFilePECOFF was using the
m_file_offset field to communicate this information. Using file offset
for this purpose is completely wrong, as that is supposed to indicate
where is this ObjectFile located in the file on disk. This field is only
meaningful for fat binaries, and should normally be 0.

Both PDB plugins have been updated to use GetBaseAddress instead of
GetFileOffset.

llvm-svn: 354258

show more ...


# 0f30a3b6 13-Feb-2019 Adrian Prantl <[email protected]>

Deserialize Clang module search path from DWARF

This patch properly extracts the full submodule path as well as its
search paths from DWARF import decls and passes it on to the
ClangModulesDeclVendo

Deserialize Clang module search path from DWARF

This patch properly extracts the full submodule path as well as its
search paths from DWARF import decls and passes it on to the
ClangModulesDeclVendor.

rdar://problem/47970144

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

llvm-svn: 353961

show more ...


Revision tags: llvmorg-7.1.0, llvmorg-7.1.0-rc1, llvmorg-8.0.0-rc2
# 758657e5 01-Feb-2019 Aleksandr Urakov <[email protected]>

[PDB] Fix location retrieval for function local variables and arguments that are
stored relative to VFRAME

Summary:
This patch makes LLDB able to retrieve proper values for function arguments and
lo

[PDB] Fix location retrieval for function local variables and arguments that are
stored relative to VFRAME

Summary:
This patch makes LLDB able to retrieve proper values for function arguments and
local variables stored in PDB relative to VFRAME register.

Patch contains retrieval of corresponding FPO table entries from PDB and a
generic translator from FPO programs to DWARF expressions to get correct VFRAME
value.

Patch also improves variables-locations.test and makes this test passable on
x86.

Patch By: leonid.mashinsky

Reviewers: zturner, asmith, stella.stamenova, aleksandr.urakov

Reviewed By: zturner

Subscribers: arphaman, labath, mgorny, aprantl, JDevlieghere, lldb-commits

Tags: #lldb

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

llvm-svn: 352845

show more ...


Revision tags: llvmorg-8.0.0-rc1
# 2946cd70 19-Jan-2019 Chandler Carruth <[email protected]>

Update the file headers across all of the LLVM projects in the monorepo
to reflect the new license.

We understand that people may be surprised that we're moving the header
entirely to discuss the ne

Update the file headers across all of the LLVM projects in the monorepo
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

show more ...


# 576495e6 14-Jan-2019 Zachary Turner <[email protected]>

[SymbolFile] Remove SymbolContext parameter from FindTypes.

This parameter was only ever used with the Module set, and
since a SymbolFile is tied to a module, the parameter turns
out to be entirely

[SymbolFile] Remove SymbolContext parameter from FindTypes.

This parameter was only ever used with the Module set, and
since a SymbolFile is tied to a module, the parameter turns
out to be entirely unnecessary. Furthermore, it doesn't make
a lot of sense to ask a caller to ask SymbolFile which is tied
to Module X to find types for Module Y, but that possibility
was open with the previous interface. By removing this
parameter from the API, it makes it harder to use incorrectly
as well as easier for an implementor to understand what it
needs to do.

llvm-svn: 351133

show more ...


# c0a246af 14-Jan-2019 Zachary Turner <[email protected]>

[SymbolFile] Remove the SymbolContext parameter from FindNamespace.

Every callsite was passing an empty SymbolContext, so this parameter
had no effect. Inside the DWARF implementation of this funct

[SymbolFile] Remove the SymbolContext parameter from FindNamespace.

Every callsite was passing an empty SymbolContext, so this parameter
had no effect. Inside the DWARF implementation of this function,
however, there was one codepath that checked members of the
SymbolContext. Since no call-sites actually ever used this
functionality, it was essentially dead code, so I've deleted this
code path as well.

llvm-svn: 351132

show more ...


# ffc1b8fd 14-Jan-2019 Zachary Turner <[email protected]>

[SymbolFile] Rename ParseFunctionBlocks to ParseBlocksRecursive.

This method took a SymbolContext but only actually cared about the
case where the m_function member was set. Furthermore, it was
int

[SymbolFile] Rename ParseFunctionBlocks to ParseBlocksRecursive.

This method took a SymbolContext but only actually cared about the
case where the m_function member was set. Furthermore, it was
intended to be implemented to parse blocks recursively despite not
documenting this in its name. So we change the name to indicate
that it should be recursive, while also limiting the function
parameter to be a Function&. This lets the caller know what is
required to use it, as well as letting new implementers know what
kind of inputs they need to be prepared to handle.

llvm-svn: 351131

show more ...


# 863f8c18 11-Jan-2019 Zachary Turner <[email protected]>

[SymbolFile] Make ParseCompileUnitXXX accept a CompileUnit&.

Previously all of these functions accepted a SymbolContext&.
While a CompileUnit is one member of a SymbolContext, there
are also many ot

[SymbolFile] Make ParseCompileUnitXXX accept a CompileUnit&.

Previously all of these functions accepted a SymbolContext&.
While a CompileUnit is one member of a SymbolContext, there
are also many others, and by passing such a monolithic parameter
in this way it makes the requirements and assumptions of the
API unclear for both callers as well as implementors.

All these methods need is a CompileUnit. By limiting the
parameter type in this way, we simplify the code as well as
make it self-documenting for both implementers and users.

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

llvm-svn: 350943

show more ...


# ac0d41c7 10-Jan-2019 Zachary Turner <[email protected]>

Change SymbolFile::ParseTypes to ParseTypesForCompileUnit.

The function SymbolFile::ParseTypes previously accepted a SymbolContext.
This makes it extremely difficult to implement faithfully, because

Change SymbolFile::ParseTypes to ParseTypesForCompileUnit.

The function SymbolFile::ParseTypes previously accepted a SymbolContext.
This makes it extremely difficult to implement faithfully, because you
have to account for all possible combinations of members being set in
the SymbolContext. On the other hand, no clients of this function
actually care about implementing this function to this strict of a
standard. AFAICT, there is actually only 1 client in the entire
codebase, and it is the function ParseAllDebugSymbols, which is itself
only called for testing purposes when dumping information. At this
call-site, the only field it sets is the CompileUnit, meaning that an
implementer of a SymbolFile need not worry about any examining or
handling any other fields which might be set.

By restricting this API to accept exactly a CompileUnit& and nothing
more, we can simplify the life of new SymbolFile plugin implementers by
making it clear exactly what the necessary and sufficient set of
functionality they need to implement is, while at the same time removing
some dead code that tried to handle other types of SymbolContext fields
that were never going to be set anyway.

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

llvm-svn: 350889

show more ...


# 44f19514 10-Jan-2019 Zachary Turner <[email protected]>

[NativePDB] Add support for parsing typedef records.

Typedefs are represented as S_UDT records in the globals stream. This
creates a strange situation where "types" are actually represented as
"symb

[NativePDB] Add support for parsing typedef records.

Typedefs are represented as S_UDT records in the globals stream. This
creates a strange situation where "types" are actually represented as
"symbols", so they need special handling.

In order to test this, we don't just use lldb and print out some
variables causing the AST to get created, because variables whose type
is a typedef will have debug info referencing the original type, not the
typedef. So we use lldb-test instead which will parse all debug info in
the entire file. This exposed some problems with lldb-test and the
native reader, mainly that certain types of obscure symbols which we can
find when iterating every single record would trigger crashes. These
have been fixed as well so that lldb-test can be used to test this
functionality.

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

llvm-svn: 350888

show more ...


# 22566330 02-Jan-2019 Zachary Turner <[email protected]>

[NativePDB] Implement ParseDeclsForContext.

This is a first step towards getting lldb-test symbols working
with the native plugin. There is a remaining issue, which is
that the plugin expects that

[NativePDB] Implement ParseDeclsForContext.

This is a first step towards getting lldb-test symbols working
with the native plugin. There is a remaining issue, which is
that the plugin expects that ParseDeclsForContext will also
create lldb symbols rather than just the decls, but the native
pdb plugin doesn't currently do this. This will be addressed
in a followup patch.

llvm-svn: 350243

show more ...


# b3130b4f 02-Jan-2019 Zachary Turner <[email protected]>

[NativePDB] Fix setting breakpoint by file and line.

There were several problems preventing this from working. The
first is that when the PDB had an absolute path to the main
source file, we would

[NativePDB] Fix setting breakpoint by file and line.

There were several problems preventing this from working. The
first is that when the PDB had an absolute path to the main
source file, we would construct an invalid path by prepending the
compilation directory to it anyway. So we needed to check if the
path is already absolute first.

Second, LLDB assumes that the zero'th item in the support file list
is the main compilation unit. We were respecting this requirement,
but LLDB *also* requires that file to appear somewhere in the list
starting from index 1 as well. So the main compilation file should
appear in the support file list twice. And when parsing a line
table, it expects the LineEntry records to be constructed using
the 1-based index. With these two fixes we can now set breakpoints
by file and line using the native PDB reader.

llvm-svn: 350240

show more ...


# 3790029d 20-Dec-2018 Zachary Turner <[email protected]>

[NativePDB] Create VarDecls for global variables.

Previously we would create these for local variables but not for
global variables.

Also updated existing tests which created global variables to ch

[NativePDB] Create VarDecls for global variables.

Previously we would create these for local variables but not for
global variables.

Also updated existing tests which created global variables to check
for them in the resulting AST.

llvm-svn: 349854

show more ...


# 51f88af3 19-Dec-2018 Zachary Turner <[email protected]>

[NativePDB] Fix a use after free and enable corresponding native test.

We had a use after free where we were assigning the result of a function
that returned a string to a StringRef. After fixing t

[NativePDB] Fix a use after free and enable corresponding native test.

We had a use after free where we were assigning the result of a function
that returned a string to a StringRef. After fixing this use after
free, one of the DIA PDB tests now passes with the native PDB reader,
so we enable the test under native mode as well. The goal is to
eventually make all the tests pass under both, at which point we can
disable them all under DIA mode.

llvm-svn: 349673

show more ...


# 594c85e9 17-Dec-2018 Zachary Turner <[email protected]>

[NativePDB] Decouple AST reconstruction from lldb Symbol creation.

Previously the code that parsed debug info to create lldb's Symbol
objects such as Variable, Type, Function, etc was tightly couple

[NativePDB] Decouple AST reconstruction from lldb Symbol creation.

Previously the code that parsed debug info to create lldb's Symbol
objects such as Variable, Type, Function, etc was tightly coupled
to the AST reconstruction code. This made it difficult / impossible
to implement functions such as ParseDeclsForContext() that were only
supposed to be operating on clang AST's. By splitting these apart,
the logic becomes much cleaner and we have a clear separation of
responsibilities.

llvm-svn: 349383

show more ...


# f03e8023 14-Dec-2018 Richard Trieu <[email protected]>

Remove unused variable.

llvm-svn: 349128


# d3d2b9b8 13-Dec-2018 Zachary Turner <[email protected]>

[NativePDB] Add support for local variables.

This patch adds support for parsing and evaluating local variables.
using the native pdb plugin.

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

[NativePDB] Add support for local variables.

This patch adds support for parsing and evaluating local variables.
using the native pdb plugin.

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

llvm-svn: 349067

show more ...


# 6753d2d1 12-Dec-2018 Zachary Turner <[email protected]>

[ast] CreateParameterDeclaration should use an appropriate DeclContext.

Previously CreateParameterDeclaration was always using the translation
unit DeclContext. We would later go and add parameters

[ast] CreateParameterDeclaration should use an appropriate DeclContext.

Previously CreateParameterDeclaration was always using the translation
unit DeclContext. We would later go and add parameters to the
FunctionDecl, but internally clang makes a copy when you do this, and
we'd end up with ParmVarDecl's at the global scope as well as in the
function scope.

This fixes the issue. It's hard to say whether this will introduce
a behavioral change in name lookup, but I know there have been several
hacks introduced in previous years to deal with collisions between
various types of variables, so there's a chance that this patch could
obviate one of those hacks.

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

llvm-svn: 348941

show more ...


Revision tags: llvmorg-7.0.1, llvmorg-7.0.1-rc3
# a42bbe39 07-Dec-2018 Zachary Turner <[email protected]>

[NativePDB] Reconstruct function declarations from debug info.

Previously we would create an lldb::Function object for each function
parsed, but we would not add these to the clang AST. This is a fi

[NativePDB] Reconstruct function declarations from debug info.

Previously we would create an lldb::Function object for each function
parsed, but we would not add these to the clang AST. This is a first
step towards getting local variable support working, as we first need an
AST decl so that when we create local variable entries, they have the
proper DeclContext.

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

llvm-svn: 348631

show more ...


# a93458b0 06-Dec-2018 Zachary Turner <[email protected]>

[PDB] Move some code around. NFC.

llvm-svn: 348505


# 99744172 16-Nov-2018 Davide Italiano <[email protected]>

[SymbolFile] Remove unused function. NFCI.

llvm-svn: 347084


12345