Commit Graph

3128 Commits

Author SHA1 Message Date
Johnny Chen ee7a359d59 Check log shared pointer before using it.
llvm-svn: 137173
2011-08-09 23:10:20 +00:00
Johnny Chen e95fcf7860 Check log shared pointer before using it.
llvm-svn: 137169
2011-08-09 22:52:27 +00:00
Sean Callanan 1c49954b51 Fixed the type code to print "<invalid>" for NULL
types instead of letting Clang crash.

llvm-svn: 137167
2011-08-09 22:42:51 +00:00
Johnny Chen 4a871f989e Fix indentation.
llvm-svn: 137165
2011-08-09 22:38:07 +00:00
Jim Ingham 20829ac4da Fix a bunch of places where we were calling log->Printf to put CStrings.
llvm-svn: 137164
2011-08-09 22:24:33 +00:00
Sean Callanan 39821ac827 Fixed a potential crash in Process.cpp when we
used a log unchecked.

llvm-svn: 137157
2011-08-09 22:07:08 +00:00
Jim Ingham ae24c42fc4 Typo in the test case for i386.
llvm-svn: 137149
2011-08-09 21:27:48 +00:00
Jim Ingham 04f5672c5b When unloading a library, pass the old complete version of the library to UnloadImageLoadAddress, since that
one is completely filled in.  The one we make up from the event doesn't have section info since the
library has already been unloaded by the time we get to it.

llvm-svn: 137143
2011-08-09 20:45:45 +00:00
Sean Callanan 85a96b12de Fixed the Objective-C "self" test case, which
was behaving erratically because it didn't
have a return statement in -[A init].

Also made minor cosmetic changes to that test
case.

llvm-svn: 137142
2011-08-09 20:28:32 +00:00
Johnny Chen 356b818882 Silence clang warning.
llvm-svn: 137141
2011-08-09 20:22:44 +00:00
Johnny Chen 53e2edbc5c Simplify lang/objc/self/Makefile, plus it's wrong. :-)
For Makefile.rules, the modification of CFLAGS (addition of -arch $(ARCH) for Darwin) needs to come before
the consuming of CFLAGS, not after.

llvm-svn: 137140
2011-08-09 20:07:16 +00:00
Johnny Chen 4c1e920640 Fix a crash while running the test suite. Need to check the (LogSP)log shared pointer before using it.
llvm-svn: 137136
2011-08-09 18:56:45 +00:00
Sean Callanan 677f2a263a Fixed a problem where the HasAVX() code in
debugserver did not back up %ebx/%rbx, even
though it was being clobbered by the CPUID
instruction.

llvm-svn: 137131
2011-08-09 18:10:15 +00:00
Johnny Chen 606e049cca Add a negative self.expect() to verify that the bug has been fixed.
rdar://problem/9747668

llvm-svn: 137129
2011-08-09 17:48:29 +00:00
Greg Clayton dee205a31e The "bool HasAVX()" function doesn't backup and restore the
cpu registers it uses and it crashes the release version of 
debugserver. We just get lucky in Debug builds. Until this 
is fixed I am disabling AVX detection to avoid the crashes. 

llvm-svn: 137113
2011-08-09 05:27:14 +00:00
Greg Clayton c235ac763f Added some logging and did some member renaming.
llvm-svn: 137112
2011-08-09 05:20:29 +00:00
Jim Ingham 4b53618247 Move the handling of breakpoint conditions from the Private event loop to the StopInfoBreakpoint::DoActions, which happens as the
event is removed.  Also use the return value of asynchronous breakpoint callbacks, they get checked before, and override the 
breakpoint conditions.

Added ProcessModInfo class, to unify "stop_id generation" and "memory modification generation", and use where needed.

llvm-svn: 137102
2011-08-09 02:12:22 +00:00
Enrico Granata 27b625e12f Basic support for reading synthetic children by index:
if your datatype provides synthetic children, "frame variable object[index]" should now do the right thing
 in cases where the above syntax would have been rejected before, i.e.
  object is not a pointer nor an array (frame variable ignores potential overload of [])
  object is a pointer to an Objective-C class (which cannot be dereferenced)
 expression will still run operator[] if available and complain if it cannot do so
 synthetic children by name do not work yet

llvm-svn: 137097
2011-08-09 01:04:56 +00:00
Johnny Chen 250a501702 Check in a customized benchmark which compares the Xcode 4.1 vs. Xcode 4.2's gdb disassembly speed
on lldb's Driver::MainLoop function which is ~1190 lines of x86 assembly code.  This file is not
exercised during the normal test suite run, i.e., no +b option specified.  So it should be ok.

The following is the benchmark result on my MBP running OSX Lion:

[17:38:46] johnny:/Volumes/data/lldb/svn/trunk/test $ ./dotest.py -v +b -p TestFlintVsSlate
/Volumes/data/lldb/svn/trunk/build/Debug
LLDB-71
Path: /Volumes/data/lldb/svn/trunk
URL: https://johnny@llvm.org/svn/llvm-project/lldb/trunk
Repository Root: https://johnny@llvm.org/svn/llvm-project
Repository UUID: 91177308-0d34-0410-b5e6-96231b3b80d8
Revision: 137008
Node Kind: directory
Schedule: normal
Last Changed Author: gclayton
Last Changed Rev: 137008
Last Changed Date: 2011-08-05 17:50:36 -0700 (Fri, 05 Aug 2011)



Session logs for test failures/errors/unexpected successes will go into directory '2011-08-08-17_38_52'
Command invoked: python ./dotest.py -v +b -p TestFlintVsSlate
----------------------------------------------------------------------
Collected 2 tests

1: test_run_41_then_42 (TestFlintVsSlateGDBDisassembly.FlintVsSlateGDBDisassembly)
   Test disassembly on a large function with 4.1 vs. 4.2's gdb. ... 
4.1 gdb benchmark: Avg: 0.205623 (Laps: 5, Total Elapsed Time: 1.028113)
4.2 gdb benchmark: Avg: 0.201970 (Laps: 5, Total Elapsed Time: 1.009849)
gdb_42_avg/gdb_41_avg: 0.982236
ok
2: test_run_42_then_41 (TestFlintVsSlateGDBDisassembly.FlintVsSlateGDBDisassembly)
   Test disassembly on a large function with 4.1 vs. 4.2's gdb. ... 
4.2 gdb benchmark: Avg: 0.202602 (Laps: 5, Total Elapsed Time: 1.013012)
4.1 gdb benchmark: Avg: 0.204418 (Laps: 5, Total Elapsed Time: 1.022089)
gdb_42_avg/gdb_41_avg: 0.991119
ok

----------------------------------------------------------------------
Ran 2 tests in 15.688s

OK

llvm-svn: 137092
2011-08-09 00:56:07 +00:00
Jim Ingham 79c35da776 Don't create a new stop info if we've already calculated one and it is still valid.
llvm-svn: 137084
2011-08-09 00:32:52 +00:00
Jim Ingham 7d6811d60e Remove some commented out code that doesn't connect to anything yet...
llvm-svn: 137081
2011-08-09 00:26:56 +00:00
Greg Clayton 65a0399197 Added a "--global" option to the "target modules list"
command that allows us to see all modules that exist and
their corresponding global shared pointer count. This will
help us track down memory issues when modules aren't being
removed and cleaned up from the module list.

llvm-svn: 137078
2011-08-09 00:01:09 +00:00
Jim Ingham 41c7591a1a Add EvaluateWithError static method. Fix a bug in handling constant expressions - we weren't setting the result even though the expression evaluation succeeded...
llvm-svn: 137077
2011-08-09 00:00:49 +00:00
Greg Clayton 2d0e7a4a2e Fixed a loop that I was testing changes with and forgot
to revert to zero.

llvm-svn: 137008
2011-08-06 00:50:36 +00:00
Sean Callanan 69b5341c6a Made the expression parser use the StackFrame's
variable search API rather than rolling its own,
fixing one of our testcases.

llvm-svn: 137004
2011-08-06 00:28:14 +00:00
Sean Callanan 72e4940bd1 This is an overhaul of the expression parser code
that detects what context the current expression is
meant to execute in.  LLDB now properly consults
the method declaration in the debug information
rather than trying to hunt down the "this" or "self"
pointer by name, which can be misleading.

Other fixes include:

- LLDB now properly detects that it is inside
  an inlined C++ member function.

- LLDB now allows access to non-const members when
  in const code.

- The functions in SymbolFile that locate the
  DeclContext containing a DIE have been renamed
  to reflect what they actually do.  I have added
  new functions that find the DeclContext for the
  DIE itself.

I have also introduced testcases for C++ and 
Objective-C.

llvm-svn: 136999
2011-08-05 23:43:37 +00:00
Johnny Chen 76ea84eaf4 On second thought, add the IsValid() method to SBTypeList, making it similar to SBSymbolContextList and SBValueList.
Modify the test suite accordingly.

llvm-svn: 136990
2011-08-05 22:23:26 +00:00
Johnny Chen 7af935ed9a Fixed test suite failure of test_SBTypeList().
SBTypeList does not have IsValid() method defined.  It's always valid in a sense.
So the Python's truth value testing in turn delegates to __len__() method, which
is defined for SBTypeList, and returns 0.

llvm-svn: 136985
2011-08-05 21:55:15 +00:00
Johnny Chen cbf1737ea1 Add SBType.GetBasicType() to the test scenario.
Add docstring for SBType, too.

llvm-svn: 136983
2011-08-05 21:35:43 +00:00
Greg Clayton a17ec9d84d Fixed issues for iOS debugging where if a device has
a native architecture that doesn't match the universal
slice that is being used for all executables, we weren't
correctly descending through the platform architectures
and resolving the binaries.

llvm-svn: 136980
2011-08-05 20:48:30 +00:00
Johnny Chen 9b97f1c3e6 Add docstring & example usage for SBTypeList.
llvm-svn: 136979
2011-08-05 20:48:02 +00:00
Johnny Chen 20208b37e3 Fix indentation and remove the private section of SBTypeList.
SWIG doesn't care about the private section of class SBTypeList.

llvm-svn: 136976
2011-08-05 20:30:56 +00:00
Johnny Chen 36c5eb1327 o modify-python-lldb.py:
Add the rich comparison methods (__eq__, __ne__) to SBType, too.

o lldbtest.py:

  Add debug utility method TestBase.DebugSBType().

o test/python_api/type:

  Add tests for exercising SBType/SBTypeList API, including the SBTarget.FindTypes(type_name)
  API which returns a SBTypeList matching the type_name.

llvm-svn: 136975
2011-08-05 20:17:27 +00:00
Johnny Chen 05c998ceda The recently introduced SBTypeList is also iterable.
This patch takes some time because the old Python constructor pattern was not a valid one,
and breaks with SBTypeList's __init__ signature.  Oops.

llvm-svn: 136958
2011-08-05 01:35:49 +00:00
Enrico Granata f1af1ed6d2 Option --regex (-x) now also works for synthetic children:
- Added a test case in python-synth
Minor code improvements in categories, making them ready for adding new element types

llvm-svn: 136957
2011-08-05 01:32:50 +00:00
Peter Collingbourne 2ced913c9c Complete Host::Backtrace prototype. Fixes Linux build.
llvm-svn: 136951
2011-08-05 00:35:43 +00:00
Johnny Chen 190f2b1c21 Remove expectedFailure decorator for test_SBType, which does not take an empty constructor after the recent changes.
And remove expectedFailure decorator for test_SBTypeMember, which no longer exists after the recent changes, replace
it with test_SBTypeList.

llvm-svn: 136947
2011-08-05 00:07:41 +00:00
Enrico Granata cd1c0236fe fixed a potential memory leak ; small improvement in the formatters lookup algorithm
llvm-svn: 136945
2011-08-04 23:37:18 +00:00
Johnny Chen 0affe0213d Print out the stopwatch (which contains laps, total elapsed time, and average)
instead of just the average.

llvm-svn: 136932
2011-08-04 22:05:36 +00:00
Johnny Chen e464282f29 Add a benchmark comparing lldb vs. gdb with disassembly on a large function (lldb's Driver::MainLoop()).
Sample run on my OSX Lion (MacBook Pro):

1: test_run_gdb_then_lldb (TestDisassembly.DisassembleDriverMainLoop)
   Test disassembly on a large function with lldb vs. gdb. ... 
gdb benchmark: Avg: 0.201802 (Laps: 5, Total Elapsed Time: 1.009008)
lldb benchmark: Avg: 0.109569 (Laps: 5, Total Elapsed Time: 0.547843)
lldb_avg/gdb_avg: 0.542952
ok
2: test_run_lldb_then_gdb (TestDisassembly.DisassembleDriverMainLoop)
   Test disassembly on a large function with lldb vs. gdb. ... 
lldb benchmark: Avg: 0.109580 (Laps: 5, Total Elapsed Time: 0.547902)
gdb benchmark: Avg: 0.201587 (Laps: 5, Total Elapsed Time: 1.007936)
lldb_avg/gdb_avg: 0.543588
ok

llvm-svn: 136931
2011-08-04 22:01:21 +00:00
Sean Callanan 0c4d8d25a7 Fixed a problem that caused LLDB to fail to execute
expressions that used function pointers.  The problem
was that IRForTarget previously only scanned the IR
for the expression for call instructions; if a function
was used in another context, it was ignored.

Now LLDB scans the Module for functions that are only
declared (not also defined -- so these are externals);
it then constructs function pointers for these
functions and substitutes them wherever the function
is used.

Also made some changes so that "expr main" works just
as well as "expr &main"; they end up being the same
code, but LLDB was generating the result variable in
different ways.

llvm-svn: 136928
2011-08-04 21:37:47 +00:00
Greg Clayton 2c5f0e96c4 Make sure we track CXX and objc method decls.
llvm-svn: 136920
2011-08-04 21:02:57 +00:00
Johnny Chen d63991ca4a Fix some typos.
llvm-svn: 136919
2011-08-04 21:01:04 +00:00
Johnny Chen 2cce3f394c Remove an extra 'for' in the comment.
llvm-svn: 136918
2011-08-04 20:48:50 +00:00
Johnny Chen 189bff103d Fix makefile rules to prevent CFLAGS from appearing twice in the command line.
llvm-svn: 136917
2011-08-04 20:44:56 +00:00
Johnny Chen 19bfde34ed Add a test to check the integrity of the lldb public api directory containing SB*.h headers.
There should be nothing unwanted there and a simpe main.cpp (generated from main.cpp.template)
which includes SB*.h should compile and link with the LLDB framework.

llvm-svn: 136894
2011-08-04 18:17:16 +00:00
Enrico Granata 4443d8c321 changing CFString.py to reflect the new behavior of CreateValueFromAddress
llvm-svn: 136887
2011-08-04 17:14:03 +00:00
Enrico Granata 61408e0856 more logical behavior for SBValue::CreateValueFromAddress
llvm-svn: 136886
2011-08-04 17:07:02 +00:00
Enrico Granata 15dbe2a491 copying std:: SynthProviders in examples/synthetic
llvm-svn: 136863
2011-08-04 02:35:14 +00:00
Enrico Granata 5dfd49ccba New formatting symbol %# can be used in summary strings to get the "count of children" of a variable
- accordingly, the test cases for the synthetic providers for the std:: containers have been edited to use
   ${svar%#} instead of ${svar.len} to print out the count of elements ; the .len synthetic child has been
   removed from the synthetic providers
The synthetic children providers for the std:: containers now return None when asked for children indexes >= num_children()
Basic code to support filter names based on regular expressions (WIP)

llvm-svn: 136862
2011-08-04 02:34:29 +00:00
Enrico Granata 6fd87d5d33 APIs to GetValueAsSigned/Unsigned() in SBValue now also accept an SBError parameter to give more info about any problem
The synthetic children providers now use the new (safer) APIs to get the values of objects
As a side effect, fixed an issue in ValueObject where ResolveValue() was not always updating the value before reading it

llvm-svn: 136861
2011-08-04 01:41:02 +00:00
Greg Clayton fe42ac4d0a Cleaned up the SBType.h file to not include internal headers and reorganized
the SBType implementation classes.

Fixed LLDB core and the test suite to not use deprecated SBValue APIs.

Added a few new APIs to SBValue:

    int64_t
    SBValue::GetValueAsSigned(int64_t fail_value=0);

    uint64_t
    SBValue::GetValueAsUnsigned(uint64_t fail_value=0)

 

llvm-svn: 136829
2011-08-03 22:57:10 +00:00
Enrico Granata 890af72acc Basic handling of Objective-C tagged pointers: return a custom ISA and typename when one is detected
llvm-svn: 136819
2011-08-03 22:01:27 +00:00
Johnny Chen 1b93d0233f Minor modification to get the full path to the target program.
llvm-svn: 136815
2011-08-03 21:18:23 +00:00
Johnny Chen 16fc2cc9fa Remove copy-and-paste residues.
llvm-svn: 136812
2011-08-03 20:58:02 +00:00
Johnny Chen c99dd97fc5 Fix typos.
llvm-svn: 136809
2011-08-03 20:40:35 +00:00
Johnny Chen a8d4df429a Add license header comment.
llvm-svn: 136808
2011-08-03 20:39:26 +00:00
Johnny Chen d855d82a16 Conditionize the 'print "Set environment ..."' stmt.
llvm-svn: 136806
2011-08-03 20:28:34 +00:00
Jim Ingham b7f0bfc5dc Add a directory to make the second copy of libd.dylib in, so we don't have
to make & delete directories in the test case.  Make a real copy of libd.dylib
in that directory so the two libraries are actually different.  Use (and remove)
the DYLD_LIBRARY_PATH to point to the new library.

llvm-svn: 136801
2011-08-03 19:32:42 +00:00
Johnny Chen f044a1e788 Patch from David Forsythe for FreeBSD build!
llvm-svn: 136800
2011-08-03 18:55:26 +00:00
Johnny Chen 5ad1245b0e Add expectedFailure decorator.
rdar://problem/9890530

llvm-svn: 136798
2011-08-03 18:35:48 +00:00
Johnny Chen e5ffe78c13 Unquote the env_cmd_string variable.
Skip the test case test_dyld_library_path(self) because it causes the debugserver to crash.

llvm-svn: 136796
2011-08-03 18:28:41 +00:00
Jim Ingham f169c394ca Don't set DYLD_LIBRARY_PATH in the Python environment (which will get passed down to
debugserver) but set it in the debugger settings (which will just get passed down to
the target).

llvm-svn: 136793
2011-08-03 17:41:28 +00:00
Enrico Granata 9bb48e6407 temporarily blacklisting a test case causing hangs on Mac OS X
llvm-svn: 136791
2011-08-03 17:20:19 +00:00
Enrico Granata 7823ee3307 testing for a previous issue where formats in summaries where not enforced in all cases ; removed an unused local variable
llvm-svn: 136785
2011-08-03 16:23:33 +00:00
Sean Callanan a789aa770e Improved the expression parser's detection of the
current context.  Previously, if there was a variable
called "self" available, the expression parser
assumed it was inside a method.  But class methods
in Objective-C also take a "self" parameter, of DWARF
type "id".  We now detect this properly, and only
assume we're in an instance method if "self" is a
pointer to an Objective-C object.

llvm-svn: 136784
2011-08-03 16:23:08 +00:00
Johnny Chen 9bfd9144e6 Fixed an issue of wrong (by +2) branch target calculation in the disassembler's symbolic information output.
A8.6.23 BLX (immediate T2)
Target Address = Align(PC, 4) + offset value

rdar://problem/9885678

llvm-svn: 136766
2011-08-03 04:50:37 +00:00
Greg Clayton fad9eef23b Fixed an issue with parsing object files from .a archives.
The entire .a file gets cached, and after the first .o file
gets loaded, a cached version would get used when trying to
extract the skinny slice from a fat BSD archive and would
cause a code path to get taken in the BSD archive parser
even if we aren't at a BSD archive offset.

llvm-svn: 136765
2011-08-03 04:39:36 +00:00
Enrico Granata 9910bc855d Fixed an issue where the KVO swizzled type would be returned as the dynamic type instead of the actual user-level type
- see the test case in lang/objc/objc-dynamic-value for an example
Objective-C dynamic type lookup now works for every Objective-C type
 - previously, true dynamic lookup was only performed for type id

llvm-svn: 136763
2011-08-03 02:18:51 +00:00
Johnny Chen cf901ed229 Add a test file to go with r136745. It fails, though, for:
expr ptr[i]->point.x

Radar to be filed.

llvm-svn: 136760
2011-08-03 01:34:29 +00:00
Greg Clayton 73da24413c Create the scratch AST context in the accessor function, not
only when the executable is set.

llvm-svn: 136758
2011-08-03 01:23:55 +00:00
Jim Ingham b53cb271ca Add method Module::IsLoadedInTarget, and then in the MacOS X dynamic loader, after we
have initialized our shared library state, discard all the modules that didn't make
it into the running process.

llvm-svn: 136755
2011-08-03 01:03:17 +00:00
Jim Ingham e716ae02a9 Fix a copy/paste error in a comment.
llvm-svn: 136754
2011-08-03 01:00:06 +00:00
Greg Clayton d41f032a45 Fixed an issue where StackFrame::GetValueForVariableExpressionPath(...)
was previously using the entire frame variable list instead of using the
in scope variable list. I added a new function to a stack frame:

	lldb::VariableListSP
	StackFrame::GetInScopeVariableList (bool get_file_globals);

This gets only variables that are in scope and they will be ordered such
that the variables from the current scope are first.

llvm-svn: 136745
2011-08-02 23:35:43 +00:00
Jason Molenda 2f7af6a15a Change CommandObjectTargetModulesAdd to set the return status
object on successful adding of a module.

llvm-svn: 136744
2011-08-02 23:28:55 +00:00
Enrico Granata d8b5fce230 bug fix in SBValue::CreateValueFromAddress() where using the resulting VO as a pointer would crash LLDB ; minor improvements in dynamic formatters lookup
llvm-svn: 136743
2011-08-02 23:12:24 +00:00
Johnny Chen aaa82ff9ad Add the real benchmarks comparing lldb against gdb for repeated expression evaluations.
Modify lldbbench.py so that lldbtest.line_number() utility function is available to
BenchBase client as just line_number(), and modify lldbtest.py so that self.lldbExec
(the full path for the 'lldb' executable) is available to BenchBase client as well.

An example run of the test case on my MacBook Pro running Lion:

1: test_compare_lldb_to_gdb (TestRepeatedExprs.RepeatedExprsCase)
   Test repeated expressions with lldb vs. gdb. ... 
lldb_avg: 0.204339
gdb_avg: 0.205721
lldb_avg/gdb_avg: 0.993284
ok

llvm-svn: 136740
2011-08-02 22:54:37 +00:00
Sean Callanan 763d72a1fd Fixed a bug in which the DWARF reader did not distinguish
appropriately between C++ static methods and non-static
methods.  This bug made it impossible to call most static
methods, either because Clang did not recognize that a
method could be called without providing a "this"
parameter, or because Clang did not properly mangle the
name of the method when searching for it in the target.

Also added a testcase.

llvm-svn: 136733
2011-08-02 22:21:50 +00:00
Johnny Chen 8f3d8384be Patch by David Forsythe to build lldb on FreeBSD!
I did not take the patch for ClangExpressionParser.cpp since there was a
recent change by Peter for the same line.  Feel free to disagree. :-)

Reference:
----------------------------------------------------------------------
r136580 | pcc | 2011-07-30 15:42:24 -0700 (Sat, 30 Jul 2011) | 3 lines

Add reloc arg to standard JIT createJIT()

Fixes non-__APPLE__ build.  Patch by Matt Johnson!
----------------------------------------------------------------------

Also, I ignore the part of the patch to remove the RegisterContextDarwin*.h/.cpp.

llvm-svn: 136720
2011-08-02 20:52:42 +00:00
Greg Clayton 819122dc1a Remove libEnhancedDisassembly.dylib
llvm-svn: 136713
2011-08-02 19:00:17 +00:00
Enrico Granata c3e320a7a0 Fixed a bug where a variable could not be formatted in a summary if its datatype already had a custom format
Fixed a bug where Objective-C variables coming out of the expression parser could crash the Python synthetic providers:
 - expression parser output has a "frozen data" component, which is a byte-exact copy of the value (in host memory),
   if trying to read into memory based on the host address, LLDB would crash. we are now passing the correct (target)
   pointer to the Python code
Objective-C "id" variables are now formatted according to their dynamic type, if the -d option to frame variable is used:
 - Code based on the Objective-C 2.0 runtime is used to obtain this information without running code on the target

llvm-svn: 136695
2011-08-02 17:27:39 +00:00
Johnny Chen da0384c90e Simple renaming: self.swatch -> self.stopwatch.
llvm-svn: 136666
2011-08-02 00:50:55 +00:00
Johnny Chen 2352af85f9 Add a Stopwatch utility class to lldbench.py module and initialize an instance of
Stopwatch (self.swatch) within the BenchBase's setUp() instance method to be available
to all the child classes.

Use self.swatch to measure elapsed time in TestRepeatedExprs.py, which needs to be
modified later on to actually measure repeated expression evaluations within the
context of lldb as well as gdb.

llvm-svn: 136664
2011-08-02 00:43:09 +00:00
Johnny Chen c96a0476cd Remove unittest.skip() as 'rdar://problem/9691614 Expression parser crashes' is fixed.
llvm-svn: 136651
2011-08-01 21:36:02 +00:00
Johnny Chen 098781b55e Remove the @expectedFailure decorator as rdar://problem/8668674 is fixed.
llvm-svn: 136650
2011-08-01 21:30:30 +00:00
Johnny Chen 985e740cd9 Add an abstract base class called BenchBase to be inherited by benchmark tests.
Modify the example TestRepeatedExprs.py to use BenchBase, instead.

llvm-svn: 136649
2011-08-01 21:13:26 +00:00
Sean Callanan 7f3755b5ff Fixed a problem in the expression parser that
caused functions that were cast as part of the
call to have that cast ignored once their 
addresses were resolved.

Notably, in the case of objc_msgSend(), if
the function was cast from something returning
i8* to something returning i8, the expression
parser was discarding the cast as part of its
resolution.  This caused crashes later on.

llvm-svn: 136648
2011-08-01 20:53:53 +00:00
Johnny Chen fb4264c501 More refactorings to migrate logic from TestBase to its parent class.
llvm-svn: 136641
2011-08-01 19:50:58 +00:00
Johnny Chen a74bb0ae6f Start refactoring lldbtest.TestBase so that it inherits from a newly created lldbtest.Base class,
while its API clients remain unchanged.  The new lldbtest.Base class is to capture common behaviors
when working with the test driver to accomplish things.  The clients of lldbtest.Base can be
lldb command line and api tests as well as other generic tests like a benchmark test.

llvm-svn: 136636
2011-08-01 18:46:13 +00:00
Johnny Chen f57119bc21 Remove the @expectedFailure decorator since the bug has been fixed.
rdar://problem/9673664

llvm-svn: 136633
2011-08-01 18:26:32 +00:00
Sean Callanan b995119900 Added checking to make sure that the target has a
scratch AST context before attempting to parse.

llvm-svn: 136631
2011-08-01 18:18:33 +00:00
Sean Callanan af8e96c185 Fixed a bug where named constants were being
treated as externals, causing problems when we
tried to look their locations up in the debug
info.  For example:

expr char c[] = "foo"; c[0]

would terminate when trying to find c in the
debug information, despite the fact that c was
defined inside the expression.

llvm-svn: 136629
2011-08-01 17:41:38 +00:00
Greg Clayton 89f138ae63 Remove the deprecated MacOSX native plug-in.
llvm-svn: 136626
2011-08-01 17:08:02 +00:00
Greg Clayton 0516c503ec Copy the native darwin register stuff out of the ProcessMacOSX
plug-in folder.

llvm-svn: 136625
2011-08-01 17:06:30 +00:00
Sean Callanan 789ee677d9 Updated LLVM to pick up a few new ARM targets.
llvm-svn: 136622
2011-08-01 16:38:39 +00:00
Greg Clayton 0b099a432b Update Xcode project versions to lldb-70 and debugserver-142.
llvm-svn: 136606
2011-08-01 05:05:43 +00:00
Peter Collingbourne eb72547f09 Add reloc arg to standard JIT createJIT()
Fixes non-__APPLE__ build.  Patch by Matt Johnson!

llvm-svn: 136580
2011-07-30 22:42:24 +00:00
Greg Clayton 3ae5a18656 Protect a bit against uninitialized std::list objects, but there is more
work to be done.

llvm-svn: 136579
2011-07-30 22:26:17 +00:00
Greg Clayton 3883bca4f4 Protect a bit better against uninitialized vectors.
llvm-svn: 136578
2011-07-30 22:25:25 +00:00
Sean Callanan cc427fadec This change brings in the latest LLVM/Clang, and
completes the support in the LLDB expression parser
for incomplete types.  Clang now imports types
lazily, and we complete those types as necessary.

Changes include:

- ClangASTSource now supports three APIs which it
  passes to ClangExpressionDeclMap.  CompleteType
  completes a TagDecl or an ObjCInterfaceDecl when
  needed; FindExternalVisibleDecls finds named
  entities that are visible in the expression's
  scope; and FindExternalLexicalDecls performs a
  (potentially restricted) search for entities
  inside a lexical scope like a namespace.  These
  changes mean that entities in namespaces should
  work normally.

- The SymbolFileDWARF code for searching a context
  for a specific name is now more general, and can
  search arbitrary contexts.

- We are continuing to adapt our calls into LLVM
  from interfaces that take start and end iterators
  when accepting multiple items to interfaces that
  use ArrayRef.

- I have cleaned up some code, especially our use
  of namespaces.

This change is neutral for our testsuite and greatly
improves correctness for large programs (like Clang)
with complicated type systems.  It should also lay
the groundwork for improving the expression parser's
performance as we are lazier and lazier about
providing type information.

llvm-svn: 136555
2011-07-30 02:42:06 +00:00