Commit Graph

3794 Commits

Author SHA1 Message Date
Jim Ingham 56bbb88689 ValueObjectVariable::GetClangAST should check that it has a valid Type before accessing it.
llvm-svn: 143393
2011-10-31 23:06:45 +00:00
Daniel Dunbar f1a7d2253a build: Fix SWIG include paths on Darwin.
llvm-svn: 143390
2011-10-31 22:51:14 +00:00
Daniel Dunbar 3257a7714d build: Build in the Darwin-Kernel OperatingSystem plugin.
llvm-svn: 143389
2011-10-31 22:51:11 +00:00
Daniel Dunbar f9031c4ff5 build: Fix Makefiles on Darwin to link proper dynamic loader plugin.
llvm-svn: 143388
2011-10-31 22:51:08 +00:00
Daniel Dunbar 12a199040c warnings: Use LLVM_EXTENSION to suppress a bunch of pedantic warnings.
llvm-svn: 143387
2011-10-31 22:51:05 +00:00
Daniel Dunbar 0d23d03b7c warnings: Fix a non-standard escape sequence.
llvm-svn: 143386
2011-10-31 22:51:02 +00:00
Daniel Dunbar 108228bf5b warnings: Fix use of a non-standard escape.
llvm-svn: 143385
2011-10-31 22:51:00 +00:00
Daniel Dunbar dacdfb52b0 warnings: Get rid of spurious semicolon.
llvm-svn: 143384
2011-10-31 22:50:57 +00:00
Daniel Dunbar 807d2c6b27 build: Add some -Wno's for things LLDB isn't clean on yet.
llvm-svn: 143383
2011-10-31 22:50:55 +00:00
Daniel Dunbar 5ae8732394 build: Fix an improperly formed include path (works under Xcode's promiscuous include additions, but not Makefiles).
llvm-svn: 143382
2011-10-31 22:50:53 +00:00
Daniel Dunbar a08823fd10 warnings: Fix a bunch of -Wreorder problems.
llvm-svn: 143381
2011-10-31 22:50:49 +00:00
Daniel Dunbar daed340b57 warnings: Fix several uses of trailing comma on enumeration extensions.
llvm-svn: 143380
2011-10-31 22:50:41 +00:00
Daniel Dunbar f9f7032b5d warnings: Fix up several const qualified return types.
llvm-svn: 143379
2011-10-31 22:50:37 +00:00
Daniel Dunbar 8914cba576 warnings: Fixup a number of mismatched tags problems.
llvm-svn: 143378
2011-10-31 22:50:33 +00:00
Daniel Dunbar d56f63f06c build: Fix Darwin linker flags which weren't properly passed (and aren't valid).
llvm-svn: 143377
2011-10-31 22:50:30 +00:00
Daniel Dunbar e6fb049d3d build: Fixup Darwin process plugin build for Makefiles.
llvm-svn: 143376
2011-10-31 22:50:27 +00:00
Daniel Dunbar 647bf23510 AppleObjCTrampolineHandler: Use array_lengthof instead of unnecessary sentinel.
llvm-svn: 143375
2011-10-31 22:50:24 +00:00
Johnny Chen 8e9383d69c Revert 143359 and modify the test case to not include non-valid c identifier character.
llvm-svn: 143372
2011-10-31 22:22:06 +00:00
Sean Callanan fc8feb8137 The IRDynamicChecks subsystem was not properly
detecting Objective-C method calls because the
"lldb.call.realName" metadata was no longer
being correctly installed.  I fixed this problem.

llvm-svn: 143371
2011-10-31 22:11:40 +00:00
Greg Clayton 4f8e86979a <rdar://problem/10368163>
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
2011-10-31 20:50:40 +00:00
Johnny Chen ced5e7b99b Add bench entries.
llvm-svn: 143361
2011-10-31 20:29:36 +00:00
Johnny Chen 773f8ad66b Fix the r143266 check-in which broke TestCommandRegex.py.
llvm-svn: 143359
2011-10-31 20:12:14 +00:00
Johnny Chen e8d9dc60be Add a Python script to invoke each test file under the test root using a separate process.
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
2011-10-31 19:04:07 +00:00
Peter Collingbourne 43459974f1 When running tests, prepend our LibDir to the user's SHLIBPATH_VAR
instead of replacing it.

llvm-svn: 143323
2011-10-31 00:43:12 +00:00
Jason Molenda ada22aa0e9 finish removal of alpha arch -- previous half-removal caused lldb to assert on startup
llvm-svn: 143294
2011-10-29 20:32:56 +00:00
Sean Callanan fb3e4306af Cloned FindExternalVisibleDecls from
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
2011-10-29 19:50:43 +00:00
Sean Callanan ba0aca72f0 Moved FindExternalLexicalDecls and a few smaller
functions from ClangExpressionDeclMap to ClangASTSource.

llvm-svn: 143276
2011-10-29 02:28:18 +00:00
Sean Callanan 1ee44b741d I moved the responsibility for interacting with the
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
2011-10-29 01:58:46 +00:00
Johnny Chen 61200b31db Add a simple regression test to go with r143260.
CommandInterpreter::PreprocessCommand() should not infinite loop
when a target has not been specified yet.

llvm-svn: 143274
2011-10-29 01:58:39 +00:00
Jason Molenda 2fae235365 Remove alpha from list of known architectures -- it was just removed
from llvm TOT.

llvm-svn: 143273
2011-10-29 01:34:50 +00:00
Greg Clayton c05203ba81 Updated the project to use the "DEVELOPER_DIR" build setting that specifies
the path to the /Developer directory, and also bumped the Xcode project version
for lldb-83 and debugserver-148.

llvm-svn: 143269
2011-10-29 01:19:08 +00:00
Greg Clayton 52ec56ccd0 Fixed the "expression" command when it comes to using it with the new GDB format
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
2011-10-29 00:57:28 +00:00
Jim Ingham c30ee56fdf Fix a type in Symbol::Compare which was causing calls to Compare with type eSymbolTypeAny to fail.
llvm-svn: 143264
2011-10-29 00:54:12 +00:00
Johnny Chen ed00fa4554 Add bench entries.
llvm-svn: 143261
2011-10-29 00:35:28 +00:00
Johnny Chen 51ea0ad7ca Get a dummy target to allow for calculator mode while processing backticks.
This also helps break the infinite loop caused when target is null.

So that we can have:

$ /Volumes/data/lldb/svn/trunk/build/Debug/lldb
(lldb) itob `0x123 - 0x321` 32 v
 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
 [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0]
(lldb) 

llvm-svn: 143260
2011-10-29 00:21:50 +00:00
Greg Clayton 1848afbbe8 Fixed the continuation dumping of instructions to properly advance the
previous address only by the number of bytes consumed by the disassembly:

(lldb) x/4i 0x0000000100000ea9
0x100000ea9:  66 c7 45 fa 10 00     movw   $16, -6(%rbp)
0x100000eaf:  c7 45 f4 20 00 00 00  movl   $32, -12(%rbp)
0x100000eb6:  e8 47 00 00 00        callq  0x0000000100000f02       ; void f<nullptr_t>(nullptr_t)
0x100000ebb:  8b 45 fc              movl   -4(%rbp), %eax
(lldb) 
0x100000ebe:  48 83 c4 10  addq   $16, %rsp
0x100000ec2:  5d           popq   %rbp
0x100000ec3:  c3           ret    
0x100000ec4:  90           nop    
(lldb) 
0x100000ec5:  90  nop    
0x100000ec6:  90  nop    
0x100000ec7:  90  nop    
0x100000ec8:  90  nop    
(lldb) 
0x100000ec9:  90  nop    
0x100000eca:  90  nop    
0x100000ecb:  90  nop    
0x100000ecc:  90  nop    
(lldb) 
0x100000ecd:  90  nop    
0x100000ece:  90  nop    
0x100000ecf:  90  nop    
0x100000ed0:  55  pushq  %rbp

llvm-svn: 143254
2011-10-28 23:44:55 +00:00
Sean Callanan eddeb3b96f As part of a general refactoring of ClangASTSource to
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
2011-10-28 23:38:38 +00:00
Johnny Chen 8763780961 Add an example customization directory which uses a binutils.py module to provide
commands to print the binary representaion of an integer.

llvm-svn: 143252
2011-10-28 23:30:28 +00:00
Greg Clayton 7c533b2447 Fixed the GDB format to allow the size and format characters to come in any
order. Also hooked up the new formats for instruction, hex float and address
to the new formats.

llvm-svn: 143251
2011-10-28 23:27:55 +00:00
Jim Ingham c6674fd597 Added the ability for the target to specify Modules that will not be searched
when setting breakpoints, but only if no module is specified.  The Darwin 
platform uses this to not set breakpoints in dyld.

llvm-svn: 143249
2011-10-28 23:14:11 +00:00
Greg Clayton 605684ec20 Added support for C++0x char16_t and char32_t types.
llvm-svn: 143246
2011-10-28 23:06:08 +00:00
Greg Clayton 490fbbe270 Enabled the "printf" attribute on all debugserver logging functions and fixed
the ensuing mayhem.

llvm-svn: 143244
2011-10-28 22:59:14 +00:00
Greg Clayton 5521f99a42 Added the ability to have GDB formats appended to any command so you can do
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
2011-10-28 21:38:01 +00:00
Johnny Chen a4c6a7b2b6 Remove extra newline in the docstring.
llvm-svn: 143228
2011-10-28 21:23:58 +00:00
Greg Clayton d443641291 Added support for the C++Ox "nullptr_t" type.
llvm-svn: 143225
2011-10-28 21:00:00 +00:00
Johnny Chen 57fe0e2e7e Add bench entries.
llvm-svn: 143210
2011-10-28 18:21:00 +00:00
Johnny Chen 6c75b61f08 Fix a typo.
llvm-svn: 143207
2011-10-28 17:56:02 +00:00
Greg Clayton e3c3d724c9 Bumping Xcode project version in mainline to match the latest build that was
submitted.

llvm-svn: 143199
2011-10-28 16:41:16 +00:00
Sean Callanan da1452dc29 Added a bunch of logging to CompleteType for TagDecls
and ObjCInterfaceDecls.

llvm-svn: 143181
2011-10-28 02:08:32 +00:00
Greg Clayton 708c1ab6f5 Python does some bad things to the signal masks in the current process and
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
2011-10-28 01:24:12 +00:00
Jim Ingham 52c7d20241 Grab the address of the breakpoint site for the StopInfoBreakpoint so if
it gets deleted before GetDescription is called we still at least know
where it was.

llvm-svn: 143175
2011-10-28 01:12:19 +00:00
Jim Ingham aab78371b9 Fix up how we shut down the communication with debugserver so we don't rely on
debugserver being responsive to shut down.

llvm-svn: 143174
2011-10-28 01:11:35 +00:00
Johnny Chen 2a781097f3 Add a binutils.py which contains Python functions for displaying bit representation of numbers.
llvm-svn: 143173
2011-10-28 01:09:53 +00:00
Johnny Chen d9809f542b Print out the version of the locally built 'lldb' binary, not the one found in your PATH env variable.
llvm-svn: 143170
2011-10-28 00:59:00 +00:00
Johnny Chen c2d6974702 This benchmark is meant to run the locally built 'lldb' binary, not the binary on the PATH env variable.
llvm-svn: 143169
2011-10-28 00:46:47 +00:00
Sean Callanan 7bf37d7904 Fixed a leak in the LLVM disassembler where the
InstructionLLVM class dropped its instruction
handle on the floor instead of releasing it
correctly.

llvm-svn: 143156
2011-10-27 22:16:42 +00:00
Greg Clayton e889ad65cc <rdar://problem/10357230>
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
2011-10-27 22:04:16 +00:00
Sean Callanan c0a6e0619d Added a function to the Host that gets a dummy target
for it, so that people who want to use LLDB as a
calculator can run simple expressions without needing
a target or process.

llvm-svn: 143147
2011-10-27 21:22:25 +00:00
Sean Callanan 9829801437 Changed the way the expression parser handles variables
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
2011-10-27 19:41:13 +00:00
Johnny Chen 0071778a3b Add bench history entries.
llvm-svn: 143121
2011-10-27 18:43:39 +00:00
Johnny Chen ea3a9af832 Undo r142549 and r142543 which temporarily relax the expected substrings for
watchpoint creation output due to wrong debug info from clang.  It has been
fixed.

llvm-svn: 143118
2011-10-27 18:27:52 +00:00
Greg Clayton 5009f9d501 Added support for the new ".apple_objc" accelerator tables. These tables are
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
2011-10-27 17:55:14 +00:00
Sean Callanan 7f9be0fdc1 Liberalized the "id" check a little; now "id" can
be found in namespaces.

llvm-svn: 143096
2011-10-27 02:10:28 +00:00
Sean Callanan fb40b0d4b5 Disabled lookups for the Objective-C builtin type "id;"
the compiler should pick this type up automatically.

llvm-svn: 143094
2011-10-27 02:06:03 +00:00
Greg Clayton 04b78e9f20 Updated the grossly out of date status page.
llvm-svn: 143092
2011-10-27 01:33:27 +00:00
Johnny Chen 09e87a6622 Add display of min and max samples to Stopwatch's string representation.
llvm-svn: 143087
2011-10-27 00:32:03 +00:00
Sean Callanan 7ba9636f0a Added an extra parameter to the object-checker
functions in the Objective-C language runtime
that is set to the selector that is being passed
to the object.

llvm-svn: 143083
2011-10-27 00:02:05 +00:00
Johnny Chen 66d362e9bf Establish a baseline for bench.py score by using a fixed lldb executable as the
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
2011-10-26 22:58:02 +00:00
Sean Callanan d2cb626ac1 Extended the IR interpreter to handle the variables
"_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
2011-10-26 21:20:00 +00:00
Greg Clayton 63f8cc6aca Fixed the display of OSTypes (the four character codes).
llvm-svn: 143056
2011-10-26 21:01:16 +00:00
Jim Ingham 1d18ebf62a When completing "help foo bar" if "foo" is not a real command, don't ask its NULL command object to complete the line.
llvm-svn: 143047
2011-10-26 19:32:01 +00:00
Greg Clayton f91381e82c Update the GDB format text to be a bit more clear.
llvm-svn: 143043
2011-10-26 18:35:21 +00:00
Peter Collingbourne 46df6a252a Use full path to ClangForward.h
Fixes Linux build.

llvm-svn: 143038
2011-10-26 17:55:48 +00:00
Sean Callanan 3b1d4f6785 Added a new #define, LLVM_NDEBUG_OFF, that should
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
2011-10-26 17:46:51 +00:00
Sean Callanan 580b29f9cb Fixed VerifyDecl to use shared forward declarations.
llvm-svn: 143029
2011-10-26 16:20:57 +00:00
Greg Clayton 82f4cf46aa A simple fix for the GDB format strings so the byte size parameter gets
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
2011-10-26 04:32:38 +00:00
Greg Clayton 55561e942b Fixed an issue where a class that resides inside another class wasn't getting
an access specifier set on it, causing an assertion to fire when building
with a Debug+Asserts build of clang.

llvm-svn: 143010
2011-10-26 03:31:36 +00:00
Sean Callanan 5e9e1991e9 Added VerifyDecl, a function that, when LLDB is
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
2011-10-26 01:06:27 +00:00
Greg Clayton 86edbf41d1 Cleaned up many error codes. For any who is filling in error strings into
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
2011-10-26 00:56:27 +00:00
Johnny Chen 457e786932 Fix typo in the docstring.
llvm-svn: 142996
2011-10-26 00:44:40 +00:00
Johnny Chen 6e5b330fb4 Add another metric for startup delay -- run to breakpoint, which measures the time from issuing
the run command till the first breakpoint hit.  Example:

 $ ./dotest.py -v +b -n -x '-F Driver::MainLoop()' -p TestStartupDelays.py
1: test_startup_delay (TestStartupDelays.StartupDelaysBench)
   Test start up delays creating a target and setting a breakpoint. ... 
lldb startup delay (create fresh target) benchmark: Avg: 0.124496 (Laps: 30, Total Elapsed Time: 3.734883)
lldb startup delay (set first breakpoint) benchmark: Avg: 0.220828 (Laps: 30, Total Elapsed Time: 6.624847)
lldb startup delay (run to breakpoint) benchmark: Avg: 0.478159 (Laps: 30, Total Elapsed Time: 14.344774)
ok

llvm-svn: 142993
2011-10-26 00:35:10 +00:00
Sean Callanan efa7d1f117 Fixed a problem where local variables conflict with
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
2011-10-25 20:36:57 +00:00
Johnny Chen fc9e79fb95 Benchmark the turnaround time starting a debugger and run to the breakpoint with lldb vs. gdb.
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
2011-10-25 20:08:03 +00:00
Sean Callanan c70ed46dda Improved handling of static data in the expression
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
2011-10-25 18:36:40 +00:00
Sean Callanan f463856fd0 Fixed our handling of const functions, compensating
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
2011-10-25 18:02:05 +00:00
Johnny Chen 3d0fcf5eae Patch from Dragos to fix Linux build!
llvm-svn: 142932
2011-10-25 17:58:16 +00:00
Greg Clayton 1deb796238 Updated all commands that use a "--format" / "-f" options to use the new
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
2011-10-25 06:44:01 +00:00
Jason Molenda 0c8e006987 Prefix display/undisplay regexp command alises with "_regexp" as per the
style of the other regexp command aliases.

llvm-svn: 142902
2011-10-25 02:11:20 +00:00
Jason Molenda 4223b3b380 typeo
llvm-svn: 142900
2011-10-25 01:28:56 +00:00
Jason Molenda b278f1e191 Add examples of shortest-possible lldb commands where appropriate.
Add new "Examining Variables" section.
Updated a few command entries to match current lldb behavior.

llvm-svn: 142898
2011-10-25 01:28:31 +00:00
Greg Clayton 4495393fed <rdar://problem/10335756>
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
2011-10-25 01:25:35 +00:00
Greg Clayton 5196416772 Simplified the CommandInterpreter::StripFirstWord logic by making it a static
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
2011-10-25 00:36:27 +00:00
Johnny Chen 447a2507a4 Add a bench-history file to keep track of simple bench results.
llvm-svn: 142874
2011-10-24 23:18:17 +00:00
Johnny Chen aeab25c70f Add more context information to the stop-hook mechanism by displaying the stop-hook
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
2011-10-24 23:01:06 +00:00
Johnny Chen 51a4655201 Minor change.
llvm-svn: 142858
2011-10-24 22:06:48 +00:00
Johnny Chen 0deafe065a Test some lldb command abbreviations to make sure the common short spellings of
many commands remain available even after we add/delte commands in the future.

llvm-svn: 142857
2011-10-24 22:03:01 +00:00
Johnny Chen 7149b6f115 Add two new @expectedFailure decorators.
rdar://problem/10334911

llvm-svn: 142839
2011-10-24 20:06:23 +00:00
Jim Ingham 7e18e42235 Add "di" and "dis" aliases to "disassemble" so they will win over "display".
llvm-svn: 142834
2011-10-24 18:37:00 +00:00
Jim Ingham c10312cea2 Add a "-a" option to "image list" to show the image at a given address.
llvm-svn: 142833
2011-10-24 18:36:33 +00:00
Johnny Chen 9593622b08 Fix test regressions due to the addition of 'display' alias to the top level commands, which conflicts
with the original 'dis' -> 'disassemble' unique expansion.  Change it to 'disass' now.

llvm-svn: 142825
2011-10-24 18:24:54 +00:00