detecting Objective-C method calls because the
"lldb.call.realName" metadata was no longer
being correctly installed. I fixed this problem.
llvm-svn: 143371
Fixed an issue where if a mach-o symbol table was corrupt and had a string
table offset that is invalid, we could crash. We now properly check the string
table offset and ignore any symbols with invalid strings.
llvm-svn: 143362
Example:
[11:33:09] johnny:/Volumes/data/lldb/svn/trunk/test $ ./dosep.ty -o "-v -n"
dotest.py options: -v -n
Running /Volumes/data/lldb/svn/trunk/test/dotest.py -v -n -p TestPublicAPIHeaders.py /Volumes/data/lldb/svn/trunk/test/api/check_public_api_headers
1: test_sb_api_directory (TestPublicAPIHeaders.SBDirCheckerCase)
Test the SB API directory and make sure there's no unwanted stuff. ... ok
----------------------------------------------------------------------
Ran 1 test in 4.404s
OK
Running /Volumes/data/lldb/svn/trunk/test/dotest.py -v -n -p TestEmulations.py /Volumes/data/lldb/svn/trunk/test/arm_emulation
1: test_arm_emulations (TestEmulations.ARMEmulationTestCase) ... ok
2: test_thumb_emulations (TestEmulations.ARMEmulationTestCase) ... ok
----------------------------------------------------------------------
Ran 2 tests in 1.399s
OK
...
llvm-svn: 143355
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
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
command suffix:
(lldb) expression/x 3+3
Since "expression" is a raw command that has options, we need to make sure the
command gets its options properly terminated with a "--".
Also fixed an issue where if you try to use the GDB command suffix on a
command that doesn't support the "--gdb-format" command, it will report an
appropriate error.
For the fix above, you can query an lldb_private::Options object to see if it
supports a long option by name.
llvm-svn: 143266
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
things like:
(lldb) x/32xb 0x1000
"x" is an alias to "memory read", so this will actually turn into:
(lldb) memory read --gdb-format=32xb 0x1000
This applies to all commands, so the GDB formats will work with "register read",
"frame variable", "target variable" and others. All commands that can accept
formats, counts and sizes have been modified to support the "--gdb-format"
option.
llvm-svn: 143230
then we spawn child processes (debugserver, etc) and those bad settings get
inherited. We stop this from happening by correctly mucking with the posix
spawn attributes.
llvm-svn: 143176
Fixed an issue where async packets were incurring a delay even though they
were sent correctly. We now properly broadcast the private run state being
resumed correctly. Also fixed logging to reflect what is happening.
llvm-svn: 143154
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
in the same hashed format as the ".apple_names", but they map objective C
class names to all of the methods and class functions. We need to do this
because in the DWARF the methods for Objective C are never contained in the
class definition, they are scattered about at the translation unit level and
they don't even have attributes that say the are contained within the class
itself.
Added 3 new formats which can be used to display data:
eFormatAddressInfo
eFormatHexFloat
eFormatInstruction
eFormatAddressInfo describes an address such as function+offset and file+line,
or symbol + offset, or constant data (c string, 2, 4, 8, or 16 byte constants).
The format character for this is "A", the long format is "address".
eFormatHexFloat will print out the hex float format that compilers tend to use.
The format character for this is "X", the long format is "hex float".
eFormatInstruction will print out disassembly with bytes and it will use the
current target's architecture. The format character for this is "i" (which
used to be being used for the integer format, but the integer format also has
"d", so we gave the "i" format to disassembly), the long format is
"instruction".
Mate the lldb::FormatterChoiceCriterion enumeration private as it should have
been from the start. It is very specialized and doesn't belong in the public
API.
llvm-svn: 143114
inferior program for the lldb debugger to operate on. The fixed lldb executable
corresponds to r142902.
Plus some minor modifications to the test benchmark to conform to way bench.py
is meant to be invoked.
llvm-svn: 143075
"_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
be set if linking against an LLVM compiled with
NDEBUG off. If it is set, we do not enable NDEBUG
in any place where we include LLVM headers.
llvm-svn: 143036
properly marked as valid.
Also modified the "memory read" command to be able to intelligently repeat
subsequent memory requests, so now you can do:
(lldb) memory read --format hex --count 32 0x1000
Then hit enter to keep viewing the memory that follows the last valid request.
llvm-svn: 143015
linked against a debug LLVM, runs a variety of
functions -- currently just one -- that verify
that the Decls we create are valid.
ClangASTContext now calls this verifier whenever
it adds a Decl to a DeclContext, and the verifier
checks that the AccessSpecifier is sane.
llvm-svn: 143000
lldb_private::Error objects the rules are:
- short strings that don't start with a capitol letter unless the name is a
class or anything else that is always capitolized
- no trailing newline character
- should be one line if possible
Implemented a first pass at adding "--gdb-format" support to anything that
accepts format with optional size/count.
llvm-svn: 142999
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
An example (with /Developer/usr/bin/lldb vs. /usr/bin/gdb):
[13:05:04] johnny:/Volumes/data/lldb/svn/trunk/test $ ./dotest.py -v +b -n -p TestCompileRunToBreakpointTurnaround.py
1: test_run_lldb_then_gdb (TestCompileRunToBreakpointTurnaround.CompileRunToBreakpointBench)
Benchmark turnaround time with lldb vs. gdb. ...
lldb turnaround benchmark: Avg: 4.574600 (Laps: 3, Total Elapsed Time: 13.723799)
gdb turnaround benchmark: Avg: 7.966713 (Laps: 3, Total Elapsed Time: 23.900139)
lldb_avg/gdb_avg: 0.574214
ok
----------------------------------------------------------------------
Ran 1 test in 55.462s
OK
llvm-svn: 142949
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
OptionGroupFormat. Updated OptionGroupFormat to be able to also use the
"--size" and "--count" options. Commands that use a OptionGroupFormat instance
can choose which of the options they want by initializing OptionGroupFormat
accordingly. Clients can either get only the "--format", "--format" + "--size",
or "--format" + "--size" + "--count". This is in preparation for upcoming
chnages where there are alternate ways (GDB format specification) to set a
format.
llvm-svn: 142911
Fixed an issue where bad DWARF from clang would get recycled from DWARF back
into types and cause clang to assert and die, killing the lldb binary, when
it tried to used the type in an expression.
llvm-svn: 142897
function and having it not require both a bool and a quote char to fill in.
We intend to get rid of this functionality when we rewrite the command
interpreter for streams eventually, but not for now.
llvm-svn: 142888
command in the '- Hook id' header. This should improve readbility of the 'display'
command if, for example, we have issued 'display a' and 'display b' which turn into
"target stop-hook add -o 'expr -- a'" and "target stop-hook add -o 'expr -- b'".
Plus some minor change in TestAbbreviations.py to conditionalize the platform-specific
checkings of the "image list" output.
llvm-svn: 142868