| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
imported variables.
llvm-svn: 144041
|
|
|
|
|
|
| |
have the correct value in the IRInterpreter.
llvm-svn: 143663
|
|
|
|
|
|
|
|
| |
IRInterpreter to get the value, not the location,
of references. The location of a reference has
type T&&, which is meaningless to Clang.
llvm-svn: 143592
|
|
|
|
|
|
|
|
|
|
| |
allows us to set __attribute__ ((used)) on expressions
that masquerade as methods. When we are stopped in
classes in anonymous namespaces, this fix (and enabling
__attribute__ ((used)) on the method) will allow
expressions to run.
llvm-svn: 143560
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
generated special member functions (constructors,
destructors, etc.) for classes that don't really have
them. We needed to mark these as artificial to reflect
the debug information; this bug does that for
constructors and destructors.
The "etc." case (certain assignment operators, mostly)
remains to be fixed.
llvm-svn: 143526
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
method as __attribute__ ((used)) when adding it to a
class. This functionality is useful when stopped in
anonymous namespaces: expressions attached to classes
in anonymous namespaces are typically elided by Clang's
CodeGen because they have no namespaces are intended
not to be externally visible. __attribute__ ((used))
forces CodeGen to emit the function.
Right now, __attribute__ ((used)) causes the JIT not to
emit the function, so we're not enabling it until we
fix that.
llvm-svn: 143469
|
|
|
|
|
|
|
|
|
|
| |
ClangExpressionDeclMap to ClangASTSource, and
moved all general type and namespace lookups
into ClangASTSource. Now ClangASTSource is ready
to complete types given nothing more than a target
and an AST context.
llvm-svn: 143292
|
|
|
|
|
|
| |
functions from ClangExpressionDeclMap to ClangASTSource.
llvm-svn: 143276
|
|
|
|
|
|
|
|
|
|
|
|
| |
AST importer on completing namespace mappings from
ClangExpressionDeclMap to ClangASTSource.
ClangASTSource now contains a TargetSP which it
uses to lookup namespaces in all of a target's
modules. I will use the TargetSP in the future to
look up globals.
llvm-svn: 143275
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
allow it to complete types on behalf of any AST context
(including the "scratch" AST context associated with
the target), I scrapped its role as intermediary between
the Clang parser and ClangExpressionDeclMap, and instead
made ClangExpressionDeclMap inherit from ClangASTSource.
After this, I will migrate the functions that complete
types and perform namespace lookups from
ClangExpressionDeclMap to ClangASTSource. Ultimately
ClangExpressionDeclMap's only responsiblity will be to
look up variables and ensure that they are materialized
and dematerialized correctly.
llvm-svn: 143253
|
|
|
|
|
|
| |
and ObjCInterfaceDecls.
llvm-svn: 143181
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of reference types. Previously, such variables were
materialized as references to those references, which
caused undesried behavior in Clang and was useless anyway
(the benefit of using references to variables is that it
allows expressions to modify variables in place, but for
references that's not required).
Now we just materialize the references directly, which
fixes a variety of expressions that use references.
llvm-svn: 143137
|
|
|
|
|
|
| |
be found in namespaces.
llvm-svn: 143096
|
|
|
|
|
|
| |
the compiler should pick this type up automatically.
llvm-svn: 143094
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"_cmd", "this", and "self". These variables are handled
differently from all other external variables used by
the expression. Other variables are used indirectly
through the $__lldb_arg operand; only _cmd, this, and
self are passed directly through the ABI.
There are two modifications:
- I added a function to ClangExpressionDeclMap that
retrives the value of one of these variables by name;
and
- I made IRInterpreter fetch these values when needed,
and ensured that the proper level of indirection is
used.
llvm-svn: 143065
|
|
|
|
|
|
|
|
|
| |
types of the same name. If a local variable with the
given name is found (and we are not searching a
specific namespace) we stop right then and there and
report it.
llvm-svn: 142962
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
parser. Now expression like the following work as
expected:
-
(lldb) expr struct { int a; int b; } $blah = { 10, 20 }
<no result>
(lldb) expr $blah
(<anonymous struct at Parse:6:5>) $blah = {
(int) a = 10
(int) b = 20
}
-
Now the IRForTarget subsystem knows how to handle
static initializers of various composite types.
Also removed an unnecessary parameter from
ClangExpressionDeclMap::GetFunctionInfo.
llvm-svn: 142936
|
|
|
|
|
|
|
|
|
|
| |
for debug information that occasionally gets the
const-ness of member functions wrong. We used to
demangle the name, add "const," and remangle it; now
we handle the mangled name directly, which is more
robust.
llvm-svn: 142933
|
|
|
|
|
|
| |
correctly even after the process has quit.
llvm-svn: 142712
|
|
|
|
|
|
|
|
| |
permits a namespace map to be created and populated
when the namespace is imported, not just when it is
requested via FindExternalVisibleDecls().
llvm-svn: 142690
|
|
|
|
|
|
|
|
|
| |
of arbitrary pointers, allowing direct dereferences
of literal addresses. Also disabled special-cased
generation of certain expression results (especially
casts), substituting the IR interpreter.
llvm-svn: 142638
|
|
|
|
|
|
|
|
|
|
| |
std::string and modified all places that used the std::string it returned
to use the "const char *".
Also modified the expression parser to not crash when a function type fails
to copy into the expression AST context.
llvm-svn: 142561
|
|
|
|
|
|
| |
committed.
llvm-svn: 142376
|
|
|
|
|
|
|
|
|
|
| |
we never used) with a much simpler class that wraps
the relevant dump functions in Clang. This class also
knows to disable external lookups on DeclContexts
being dumped so it should be safe to print incomplete
Decls.
llvm-svn: 142359
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
FindExternalVisibleDecls and FindExternalLexicalDecls
are marked and given unique IDs, so that all logging
done as part of their execution can be traced back to
the proper call.
Also there was some logging that really wasn't helpful
in most cases so I disabled it unless verbose logging
(log enable -v lldb expr) is enabled.
llvm-svn: 141987
|
|
|
|
|
|
|
|
| |
make it easier to track down which members belong
to which structs (and which call to
FindExternalLexicalDecls is doing the reporting).
llvm-svn: 141930
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Specifically, the expression parser used to use
functions attached to SymbolContext to do lookups,
but nowadays it searches a ModuleList or Module
directly instead. These functions had no
remaining clients so I removed them to prevent
bit rot.
I also removed a stray callback function from
ClangExpressionDeclMap.
llvm-svn: 141899
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
which had previously been commented out while I tested
it. It's not fully working yet, but it doesn't break
our testsuite and it's an important piece of
functionality.
Also added some logging to SymbolFileDWARF to help
diagnose entities that are found in a symbol file,
but do not reside in the expected namespace.
llvm-svn: 141894
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
context object. Having it populated and registered
within a single FindExternalVisibleDecls call worked
fine when there was only one call (i.e., when we were
just looking in the global namespace).
However, now FindExternalVisibleDecls is called for
nested namespaces as well, which means that it is
called not once but many times (once per module in
which the parent namespace appears). This means that
the namespace mapping is built up across many calls
to the inferior FindExternalVisibleDecls, so I moved
it into a data structure (the search context) that is
shared by all calls.
I also added some logging to make it easier to see
what is happening during a namespace search, and
cleaned up some existing logging.
llvm-svn: 141888
|
|
|
|
| |
llvm-svn: 141866
|
|
|
|
|
|
|
|
| |
down through Module and SymbolVendor into SymbolFile.
Added checks to SymbolFileDWARF that restrict symbol
searches when a namespace is passed in.
llvm-svn: 141847
|
|
|
|
|
|
|
|
|
|
|
| |
we don't need to look them up again when materializing.
Switched over the materialization mechanism (for JIT
expressions) and the lookup mechanism (for interpreted
expressions) to use the VariableSP/Symbol that were
found during parsing.
llvm-svn: 141839
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
lifetime of ClangExpressionDeclMap. This allows
ClangExpressionVariables found during parsing to be
queried for their containing namespaces during
expression execution.
Other clients (like ClangFunction) explicitly delete
this state, so they should not result in any memory
leaks.
llvm-svn: 141821
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
calls to the FindExternalVisibleDecls function.
FindExternalVisibleDecls was recording whether
it had found generic function symbols in variables
that were local to the function. Now, however,
multiple calls occur in response to one request
from Clang, since we may be searching across
namespaces. To support that, I moved the local
variables into a bitfield in NameSearchContext.
llvm-svn: 141808
|
|
|
|
|
|
| |
proper namespace-aware APIs.
llvm-svn: 141797
|
|
|
|
|
|
| |
data symbols in namespaces.
llvm-svn: 141792
|
|
|
|
|
|
|
| |
level FindFunctions() where appropriate and not use
SymbolContext::FindFunctionsByName().
llvm-svn: 141789
|
|
|
|
|
|
|
|
| |
module and namespace. Also made it use FindGlobalVariables()
instead of the more heavyweight
GetVariablesForVariableExpressionPath().
llvm-svn: 141783
|
|
|
|
|
|
|
| |
core Module functions that the expression parser
will soon be using.
llvm-svn: 141766
|
|
|
|
|
|
|
|
| |
look in individual modules rather than globally.
Also some whitespace fixes.
llvm-svn: 141765
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of namespaces (only in the modules where they've
been found) for entities inside those namespaces.
For each NamespaceDecl that has been imported into
the parser, we maintain a map containing
[ModuleSP, ClangNamespaceDecl] pairs in the ASTImporter.
This map has one entry for each module in which the
namespace has been found. When we later scan for an
entity inside a namespace, we search only the modules
in which that namespace was found.
Also made a small whitespace fix in
ClangExpressionParser.cpp.
llvm-svn: 141748
|
|
|
|
| |
llvm-svn: 141468
|
|
|
|
|
|
|
|
| |
This involved minor changes to the way we report Objective-C
methods, as well as cosmetic changes and added parameters
for a variety of Clang APIs.
llvm-svn: 141437
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
shared pointers.
Changed the ExecutionContext over to use shared pointers for
the target, process, thread and frame since these objects can
easily go away at any time and any object that was holding onto
an ExecutionContext was running the risk of using a bad object.
Now that the shared pointers for target, process, thread and
frame are just a single pointer (they all use the instrusive
shared pointers) the execution context is much safer and still
the same size.
Made the shared pointers in the the ExecutionContext class protected
and made accessors for all of the various ways to get at the pointers,
references, and shared pointers.
llvm-svn: 140298
|
|
|
|
|
|
|
|
|
|
|
|
| |
it to generate result variables that were not bound
to their underlying data. This allowed the SBValue
class to use the interpreter (if possible).
Also made sure that any result variables that point
to stack allocations in the stack frame of the
interpreted expressions do not get live data.
llvm-svn: 140285
|
|
|
|
|
|
|
|
|
| |
__attribute__ format so the compiler knows that this method takes
printf style formatter arguments and checks that it's being used
correctly. Fix a couple dozen incorrect SetErrorStringWithFormat()
calls throughout the sources.
llvm-svn: 140115
|
|
|
|
|
|
|
|
|
|
|
|
| |
lldb_private::Breakpoint
lldb_private::BreakpointLocations
lldb_private::BreakpointSite
lldb_private::Debugger
lldb_private::StackFrame
lldb_private::Thread
lldb_private::Target
llvm-svn: 139985
|
|
|
|
|
|
|
| |
being initialized properly in the absence of a
process.
llvm-svn: 139823
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to execute expressions even in the absence of a process.
This allows expressions to run in situations where the
target cannot run -- e.g., to perform calculations based
on type information, or to inspect a binary's static
data.
This modification touches the following files:
lldb-private-enumerations.h
Introduce a new enum specifying the policy for
processing an expression. Some expressions should
always be JITted, for example if they are functions
that will be used over and over again. Some
expressions should always be interpreted, for
example if the target is unsafe to run. For most,
it is acceptable to JIT them, but interpretation
is preferable when possible.
Target.[h,cpp]
Have EvaluateExpression now accept the new enum.
ClangExpressionDeclMap.[cpp,h]
Add support for the IR interpreter and also make
the ClangExpressionDeclMap more robust in the
absence of a process.
ClangFunction.[cpp,h]
Add support for the new enum.
IRInterpreter.[cpp,h]
New implementation.
ClangUserExpression.[cpp,h]
Add support for the new enum, and for running
expressions in the absence of a process.
ClangExpression.h
Remove references to the old DWARF-based method
of evaluating expressions, because it has been
superseded for now.
ClangUtilityFunction.[cpp,h]
Add support for the new enum.
ClangExpressionParser.[cpp,h]
Add support for the new enum, remove references
to DWARF, and add support for checking whether
the expression could be evaluated statically.
IRForTarget.[h,cpp]
Add support for the new enum, and add utility
functions to support the interpreter.
IRToDWARF.cpp
Removed
CommandObjectExpression.cpp
Remove references to the obsolete -i option.
Process.cpp
Modify calls to ClangUserExpression::Evaluate
to pass the correct enum (for dlopen/dlclose)
SBValue.cpp
Add support for the new enum.
SBFrame.cpp
Add support for he new enum.
BreakpointOptions.cpp
Add support for the new enum.
llvm-svn: 139772
|
|
|
|
| |
llvm-svn: 139582
|