| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
copied by the copy constructor for ClangExpressionVariable.
This meant that a NULL m_register_info wouldn't be
copied, and instead the field was uninitialized, potentially
confusing the materializer.
llvm-svn: 120472
|
|
|
|
|
|
|
|
|
|
| |
timeouts, and restarting with all threads into a utility function in Process. This required a bunch of renaming.
Added a ThreadPlanCallUserExpression that differs from ThreadPlanCallFunction in that it holds onto a shared pointer to its ClangUserExpression so that can't go away before the thread plan is done using it.
Fixed the stop message when you hit a breakpoint while running a user expression so it is more obvious what has happened.
llvm-svn: 120386
|
|
|
|
|
|
|
|
|
|
|
| |
using special $-variables from expressions.
(lldb) expr $rip
These variables are available for reading and
writing.
llvm-svn: 120367
|
|
|
|
| |
llvm-svn: 120322
|
|
|
|
|
|
|
|
| |
of failures in the AST importer. Also ensured
that a variable will not be blindly added if
GetVariableValue() returns an error.
llvm-svn: 119889
|
|
|
|
| |
llvm-svn: 119888
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RegisterContext* - normally this is retrieved from the ExecutionContext's
StackFrame but when we need to evaluate an expression while creating
the stack frame list this can be a little tricky.
Add DW_OP_deref_size, needed for the _sigtramp FDE expression.
Add support for processing DWARF expressions in RegisterContextLLDB.
Update callers to DWARFExpression::Evaluate.
llvm-svn: 119885
|
|
|
|
|
|
|
|
|
| |
perform recursive type lookups, because these are not
required for full type fidelity. We also make the
SelectorTable last for the full lifetime of the Clang
compiler; this was the source of many bugs.
llvm-svn: 119835
|
|
|
|
|
|
|
|
|
|
| |
that the result of an expression should be coerced to
a specific type. Also made breakpoint conditions pass
in the bool type for this type.
The expression parser ignores this indication for now.
llvm-svn: 119779
|
|
|
|
|
|
| |
conventions.
llvm-svn: 119771
|
|
|
|
|
|
|
| |
externally-defined variables to match up with
the code in ClangASTSource that produces them.
llvm-svn: 119750
|
|
|
|
| |
llvm-svn: 119677
|
|
|
|
|
|
| |
they have to get cleaned up in the derived class's destructor. Make sure that happens.
llvm-svn: 119675
|
|
|
|
|
|
|
| |
They are replaced with calls to the CoreFoundation function
CFStringCreateWithBytes() by a portion of the IRForTarget pass.
llvm-svn: 119582
|
|
|
|
| |
llvm-svn: 119581
|
|
|
|
|
|
|
|
|
| |
with the Interrupted bit set. Process::HandlePrivateEvent ignores Interrupted events.
DoHalt is changed to ensure that the stop even is processed, and an event with
the Interrupted event is posted. Finally ClangFunction is rationalized to use this
facility so the that Halt is handled more deterministically.
llvm-svn: 119453
|
|
|
|
|
|
|
| |
It currently isn't working, but it should be close. I will work on this more
when I figure out what I am not doing correctly.
llvm-svn: 119324
|
|
|
|
|
|
|
|
|
|
|
| |
expression logging.
Added some properties to the "objc" test. The expression parser can currently
display properties that are backed by the default functions "expr myStr.string"
will work. But it won't currently work when the property is backed by a
different function such as "expr myStr.date".
llvm-svn: 119103
|
|
|
|
|
|
| |
currently only enabled when we blow the stack.
llvm-svn: 119101
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
can too. So now the lldb_private::Variable class has support for this.
Variables now have support for having a basename ("i"), and a mangled name
("_ZN12_GLOBAL__N_11iE"), and a demangled name ("(anonymous namespace)::i").
Nowwhen searching for a variable by name, users might enter the fully qualified
name, or just the basename. So new test functions were added to the Variable
and Mangled classes as:
bool NameMatches (const ConstString &name);
bool NameMatches (const RegularExpression ®ex);
I also modified "ClangExpressionDeclMap::FindVariableInScope" to also search
for global variables that are not in the current file scope by first starting
with the current module, then moving on to all modules.
Fixed an issue in the DWARF parser that could cause a varaible to get parsed
more than once. Now, once we have parsed a VariableSP for a DIE, we cache
the result even if a variable wasn't made so we don't do any re-parsing. Some
DW_TAG_variable DIEs don't have locations, or are missing vital info that
stops a debugger from being able to display anything for it, we parse a NULL
variable shared pointer for these DIEs so we don't keep trying to reparse it.
llvm-svn: 119085
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
expression. This currently takes waaaayyyyy too much time to evaluate. We will
need to look at the expression parser and find ways to optimize the info we
provide and get this to evaluate quicker. I believe the performance issue is
currently related to us always providing a complete C++ class type when asked
about a C++ class which can cause a lot of information to be pulled since all
classes will be fully created (methods, base classes, members, all their
types). We will need to give the classes back the parser and mark them as
having external sources and get parser (Sema) to query us when it needs more
info. This should bring things up to an acceptable level.
llvm-svn: 118979
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cases when getting the clang type:
- need only a forward declaration
- need a clang type that can be used for layout (members and args/return types)
- need a full clang type
This allows us to partially parse the clang types and be as lazy as possible.
The first case is when we just need to declare a type and we will complete it
later. The forward declaration happens only for class/union/structs and enums.
The layout type allows us to resolve the full clang type _except_ if we have
any modifiers on a pointer or reference (both R and L value). In this case
when we are adding members or function args or return types, we only need to
know how the type will be laid out and we can defer completing the pointee
type until we later need it. The last type means we need a full definition for
the clang type.
Did some renaming of some enumerations to get rid of the old "DC" prefix (which
stands for DebugCore which is no longer around).
Modified the clang namespace support to be almost ready to be fed to the
expression parser. I made a new ClangNamespaceDecl class that can carry around
the AST and the namespace decl so we can copy it into the expression AST. I
modified the symbol vendor and symbol file plug-ins to use this new class.
llvm-svn: 118976
|
|
|
|
| |
llvm-svn: 118697
|
|
|
|
|
|
|
|
| |
Fixed the DWARF plug-in such that when it gets all attributes for a DIE, that
it omits the DW_AT_sibling and DW_AT_declaration when getting attributes
from a DW_AT_abstract_origin or DW_AT_specification DIE.
llvm-svn: 118654
|
|
|
|
|
|
|
|
|
|
|
|
| |
to not get resolved.
Fixed the "void **isa_ptr" variable inside the objective C verifier to start
with a '$' character so we don't go looking for it in our program.
Moved the lookup for "$__lldb_class" into the part that knows we are looking
for internal types that start with a '$'.
llvm-svn: 118488
|
|
|
|
|
|
|
|
|
| |
when a function starts and ends, and also the
disassembly for anything that is a client of
ClangExpressionParser after it has been JIT
compiled.
llvm-svn: 118401
|
|
|
|
|
|
|
|
|
| |
every external variable reference in the module,
and returning a clean error (instead of letting
LLVM issue a fatal error) if the variable could
not be resolved.
llvm-svn: 118388
|
|
|
|
|
|
|
|
|
|
|
| |
don't crash if we disable logging when some code already has a copy of the
logger. Prior to this fix, logs were handed out as pointers and if they were
held onto while a log got disabled, then it could cause a crash. Now all logs
are handed out as shared pointers so this problem shouldn't happen anymore.
We are also using our new shared pointers that put the shared pointer count
and the object into the same allocation for a tad better performance.
llvm-svn: 118319
|
|
|
|
|
|
|
| |
of store statements were not being marked for
resolution.
llvm-svn: 118316
|
|
|
|
|
|
| |
and a parameter to control it in ClangUserExpression, and on down to ClangFunction.
llvm-svn: 118290
|
|
|
|
|
|
|
|
|
|
|
| |
that check pointer validity fail to parse. Now
lldb does not crash in that case. Also added
support for checking Objective-C class validity
in the Version 1 runtime as well as Version 2
runtimes with varying levels of available debug
support.
llvm-svn: 118271
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
adding support into lldb_private::Process:
virtual uint32_t
lldb_private::Process::LoadImage (const FileSpec &image_spec,
Error &error);
virtual Error
lldb_private::Process::UnloadImage (uint32_t image_token);
There is a default implementation that should work for both linux and MacOSX.
This ability has also been exported through the SBProcess API:
uint32_t
lldb::SBProcess::LoadImage (lldb::SBFileSpec &image_spec,
lldb::SBError &error);
lldb::SBError
lldb::SBProcess::UnloadImage (uint32_t image_token);
Modified the DynamicLoader plug-in interface to require it to be able to
tell us if it is currently possible to load/unload a shared library:
virtual lldb_private::Error
DynamicLoader::CanLoadImage () = 0;
This way the dynamic loader plug-ins are allows to veto whether we can
currently load a shared library since the dynamic loader might know if it is
currenlty loading/unloading shared libraries. It might also know about the
current host system and know where to check to make sure runtime or malloc
locks are currently being held.
Modified the expression parser to have ClangUserExpression::Evaluate() be
the one that causes the dynamic checkers to be loaded instead of other code
that shouldn't have to worry about it.
llvm-svn: 118227
|
|
|
|
|
|
|
| |
implementation of the Objective-C object checkers
into the Objective-C language runtime.
llvm-svn: 118226
|
|
|
|
|
|
|
|
| |
exception checks at the right time, and modified
ClangFunction so that it doesn't misinterpret the
stop as a timeout stop.
llvm-svn: 118189
|
|
|
|
|
|
|
| |
for a global variable that we had replaced with
a reference to a slot in the input array.
llvm-svn: 118123
|
|
|
|
|
|
|
| |
on i386 platforms, leading to crashes on simple
expressions.
llvm-svn: 118114
|
|
|
|
|
|
|
|
|
| |
statement. Now when ClangExpressionDeclMap returns
a variable for a name, it pretty-prints that
variable to the log instead of printing a (fairly
useless) NamedDecl pointer.
llvm-svn: 117972
|
|
|
|
|
|
| |
and warnings.
llvm-svn: 117947
|
|
|
|
|
|
|
|
|
| |
than just the entire log channel.
Add checks, where appropriate, to make sure a log channel/category has
not been disabled before attempting to write to it.
llvm-svn: 117715
|
|
|
|
|
|
| |
an #ifndef.
llvm-svn: 117706
|
|
|
|
| |
llvm-svn: 117700
|
|
|
|
|
|
| |
7pm, and made minor integration fixes.
llvm-svn: 117680
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
which holds the name of a file whose contents are
prefixed to each expression. For example, if the file
~/lldb.prefix.header contains:
typedef unsigned short my_type;
then you can do this:
(lldb) settings set target.expr-prefix '~/lldb.prefix.header'
(lldb) expr sizeof(my_type)
(unsigned long) $0 = 2
When the variable is changed, the corresponding file
is loaded and its contents are fetched into a string
that is stored along with the target. This string
is then passed to each expression and inserted into
it during parsing, like this:
typedef unsigned short my_type;
void
$__lldb_expr(void *$__lldb_arg)
{
sizeof(my_type);
}
llvm-svn: 117627
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
all of the calls inlined in the header file for better performance.
Fixed the summary for C string types (array of chars (with any combo if
modifiers), and pointers to chars) work in all cases.
Fixed an issue where a forward declaration to a clang type could cause itself
to resolve itself more than once if, during the resolving of the type itself
it caused something to try and resolve itself again. We now remove the clang
type from the forward declaration map in the DWARF parser when we start to
resolve it and avoid this additional call. This should stop any duplicate
members from appearing and throwing all the alignment of structs, unions and
classes.
llvm-svn: 117437
|
|
|
|
|
|
|
|
|
| |
being generated correctly.
Also added a messy way to single-step through expressions
that I will improve soon.
llvm-svn: 117342
|
|
|
|
|
|
|
|
|
| |
"unsigned short." As discussed in the comments,
this is pending a better solution to the problem
of types not in the debug information but readily
available through headers.
llvm-svn: 117247
|
|
|
|
|
|
|
|
|
| |
method results to int. This will only last until we
get accurate type information for Objective-C methods
or some way of making their types inferred by the
parser.
llvm-svn: 117178
|
|
|
|
|
|
|
| |
as persistent variables. These are special markers
used by LLDB.
llvm-svn: 117078
|
|
|
|
|
|
| |
gets processed. That means GetStopReason needs to return a shared pointer, not a pointer to the thread's cached version. Also allow the thread plans to get and set the thread private stop reason - that is usually more appropriate for the logic the thread plans need to do.
llvm-svn: 116892
|
|
|
|
|
|
|
| |
to be passed improperly to expressions in certain
cases.
llvm-svn: 116884
|