Commit Graph

138 Commits

Author SHA1 Message Date
Filipe Cabecinhas 22889540dc Mark the test as failing on both architectures, since LLDB won't handle the function to clang.
llvm-svn: 157679
2012-05-30 05:44:59 +00:00
Filipe Cabecinhas f96964b6ef Clean all files when executing 'make clean'
llvm-svn: 157677
2012-05-30 05:35:14 +00:00
Sean Callanan ce8af862ae Added support for rvalue references in debug information
(actually, mainly just hooked up support that was already
there).  Added a test case, although it's expected to fail
right now unless you're using top-of-tree LLVM.

llvm-svn: 157220
2012-05-21 23:31:51 +00:00
Sean Callanan 0061222ed8 Fixed the new-syntax testcase to reflect how we
print string literals.

llvm-svn: 157213
2012-05-21 22:25:12 +00:00
Sean Callanan 0259e51287 Fixed a nasty bug where JIT expressions didn't work
when stopped in a const method.  Also updated our
testsuite to ensure that JIT is forced in this case.

llvm-svn: 157208
2012-05-21 21:29:52 +00:00
Enrico Granata fd4c84ee9f <rdar://problem/11355592> Fixing a bug where we would incorrectly try and determine a dynamic type for a variable of a pointer type that is not a valid generic type for dynamic pointers.
llvm-svn: 157190
2012-05-21 16:51:35 +00:00
Sean Callanan 4407880666 I have updated Clang to include support for Objective-C
boxed expressions returning numbers and strings.

I also added boxed expressions to our testcases, and
enabled boxed expressions when libarclite is linked into
the inferior.

llvm-svn: 157026
2012-05-17 23:29:56 +00:00
Johnny Chen 5604c98fec Add i386-only expectedFailure decorators for current ToT.
llvm-svn: 156855
2012-05-15 21:27:40 +00:00
Jim Ingham 7ba6e99158 Found one more place where the OkayToDiscard needs to be consulted.
Also changed the defaults for SBThread::Step* to not delete extant plans.
Also added some test cases to test more complex stepping scenarios.

llvm-svn: 156667
2012-05-11 23:47:32 +00:00
Jim Ingham 18de2fdc55 If the ObjC Step Through Trampoline plan causes a target crash, properly propagate the error back to
the controlling plans so that they don't lose control.

Also change "ThreadPlanStepThrough" to take the return StackID for its backstop breakpoint as an argument
to the constructor rather than having it try to figure it out itself, since it might get it wrong whereas
the caller always knows where it is coming from.

rdar://problem/11402287

llvm-svn: 156529
2012-05-10 01:35:39 +00:00
Enrico Granata 73076f9269 Automatically enabling the Cocoa formatter categories for command-line LLDB. Previously, the categories were filled in but disabled by default. Tweaking test cases appropriately to keep working and do the right thing
llvm-svn: 155605
2012-04-26 01:40:38 +00:00
Johnny Chen 6381f01012 Renaming to rid of the '++' in the test file name and simplify the Makefile.
llvm-svn: 155521
2012-04-25 01:20:15 +00:00
Sean Callanan dd42e097eb Removed a binary that I accidentally committed.
llvm-svn: 155516
2012-04-25 01:04:34 +00:00
Sean Callanan 7457f8d7c9 Recognize Objective-C classes with runtime class
ObjCPlusPlus as Objective-C classes.  Really the
compiler should say they have Objective-C runtime
class, but we should be a little more resilient
(we were refusing to find ivars in those classes
before).

Also added a test case.

llvm-svn: 155515
2012-04-25 01:03:57 +00:00
Sean Callanan dfc066d274 Forgo the selector test on i386, where we can't
test whether an object responds to a selector
from outside the process.

llvm-svn: 155504
2012-04-24 23:31:54 +00:00
Sean Callanan 72546f01d3 Create an NSAutoreleasePool correctly in a test
case so that the Objective-C runtime doesn't
complain about lack of one, causing the test case
to fail.

llvm-svn: 155503
2012-04-24 23:18:47 +00:00
Johnny Chen 8da4ddf990 Add a suffix rule for compiling objc++ files and a sample directory under test/lang/objcxx.
llvm-svn: 155501
2012-04-24 23:05:07 +00:00
Johnny Chen 18104239b4 Ditto 'requires modern objc runtime' for TestRealDefinition.py -- fix test suite errors for i386.
llvm-svn: 154638
2012-04-13 00:23:26 +00:00
Johnny Chen 97ccf9f3b2 Ditto 'requires modern objc runtime' for TestObjCProperty.py -- fix test suite errors for i386.
llvm-svn: 154636
2012-04-13 00:18:17 +00:00
Johnny Chen 45872c01ff Fix some test suite errors. TestForwardDecl.py errors were due to bad Makefile.rules, while TestHiddenIvars.py errors due to features only available in modern objc runtime.
llvm-svn: 154635
2012-04-13 00:13:35 +00:00
Sean Callanan d13c23c393 Changed some tabs to spaces to make Python like
this file.

llvm-svn: 154222
2012-04-06 23:02:44 +00:00
Johnny Chen 24086bc93b Second batch of adding @dsym_test/@dwarf_test decorators to existing test cases.
Plus some minor cleanup of test method names.
Third and final batch is coming.

llvm-svn: 154197
2012-04-06 19:54:10 +00:00
Enrico Granata 7f3296a6e1 Disabling blocks support because of rdar://problem/11024417 - This is hopefully just a temporary countermeasure
llvm-svn: 153758
2012-03-30 16:58:37 +00:00
Greg Clayton 84db9105d2 <rdar://problem/11113279>
Fixed type lookups to "do the right thing". Prior to this fix, looking up a type using "foo::bar" would result in a type list that contains all types that had "bar" as a basename unless the symbol file was able to match fully qualified names (which our DWARF parser does not). 

This fix will allow type matches to be made based on the basename and then have the types that don't match filtered out. Types by name can be fully qualified, or partially qualified with the new "bool exact_match" parameter to the Module::FindTypes() method.

This fixes some issue that we discovered with dynamic type resolution as well as improves the overall type lookups in LLDB.

llvm-svn: 153482
2012-03-26 23:03:23 +00:00
Johnny Chen 24b5b8b7b8 Remove a debug statement.
llvm-svn: 152732
2012-03-14 18:35:38 +00:00
Sean Callanan 226b70c154 Updated the revision of LLVM/Clang used by LLDB.
This takes two important changes:

- Calling blocks is now supported.  You need to
  cast their return values, but that works fine.

- We now can correctly run JIT-compiled
  expressions that use floating-point numbers.

Also, we have taken a fix that allows us to
ignore access control in Objective-C as in C++.

llvm-svn: 152286
2012-03-08 02:39:03 +00:00
Enrico Granata 297e69f15e Fixing an issue where a ValueObject had changed its value but the 'value changed' flag was not being set. This was breaking one of our test cases
llvm-svn: 152161
2012-03-06 23:21:16 +00:00
Sean Callanan 75383bf34d Added support for calling blocks from expressions,
but gated by an #ifdef until we roll LLVM/Clang to
bring in the necessary parser support.

llvm-svn: 152149
2012-03-06 21:56:33 +00:00
Jim Ingham 97f7e81891 Add a test case and fix the C++ exception symbols.
llvm-svn: 152101
2012-03-06 03:52:02 +00:00
Johnny Chen d1adb79010 Add two expectedFailure decorators with radar number.
llvm-svn: 152049
2012-03-05 19:48:28 +00:00
Enrico Granata 242d9838c6 Adding a test case for a bug where types CFGregorianDate and CFRange were improperly uniqued by LLDB such that both where shown as having the same structure contents - The bug itself is fixed in TOT but we want to catch regressions ASAP
llvm-svn: 151929
2012-03-02 18:47:26 +00:00
Sean Callanan e8c0cfbb00 Improved the type's handling of anonymous structs,
so that the expression parser can look up members
of anonymous structs correctly.  This meant creating
all the proper IndirectFieldDecls in each Record
after it has been completely populated with members.

llvm-svn: 151868
2012-03-02 01:03:45 +00:00
Sean Callanan 6d1c372c04 Added a testcase verifying that forward declarations
of Objective-C classes in header files are correctly
resolved in the final type.

llvm-svn: 151790
2012-03-01 02:06:31 +00:00
Sean Callanan 93831264b3 Made the hidden-ivar test a little more rigorous.
llvm-svn: 151221
2012-02-23 01:06:42 +00:00
Sean Callanan 7277284f87 Added support for looking up the complete type for
Objective-C classes.  This allows LLDB to find
ivars declared in class extensions in modules other
than where the debugger is currently stopped (we
already supported this when the debugger was
stopped in the same module as the definition).

This involved the following main changes:

- The ObjCLanguageRuntime now knows how to hunt
  for the authoritative version of an Objective-C
  type.  It looks for the symbol indicating a
  definition, and then gets the type from the
  module containing that symbol.

- ValueObjects now report their type with a
  potential override, and the override is set if
  the type of the ValueObject is an Objective-C
  class or pointer type that is defined somewhere
  other than the original reported type.  This
  means that "frame variable" will always use the
  complete type if one is available.

- The ClangASTSource now looks for the complete
  type when looking for ivars.  This means that
  "expr" will always use the complete type if one
  is available.

- I added a testcase that verifies that both
  "frame variable" and "expr" work.

llvm-svn: 151214
2012-02-22 23:57:45 +00:00
Johnny Chen b2cde923cf Remove @expectedFailure decorators as the bug has been fixed.
llvm-svn: 150501
2012-02-14 20:04:26 +00:00
Johnny Chen 5e60e3904c Add test cases exercising SBValue.GetObjectDescription() with the SBValue from SBTarget.FindGlobalVariables()
as well as from SBFrame.GetVariables().  Both scenarios are expected to work.

llvm-svn: 150450
2012-02-14 01:02:41 +00:00
Enrico Granata 55031d28ba fixing a macro name mismatch that was making our test case succeed for the wrong reason; plus a minor code change to the CPP side of the test which eases debugging efforts
llvm-svn: 150213
2012-02-10 00:10:27 +00:00
Johnny Chen f4a75d880d Fix compile time warnings for the inferior program.
llvm-svn: 150205
2012-02-09 20:29:11 +00:00
Johnny Chen a2791f8aeb Special build dictionary needs the same dictionary when specifying the after-the-test cleanup.
llvm-svn: 149900
2012-02-06 21:11:17 +00:00
Johnny Chen 2eb6c3d246 Add regular C++ inheritance in addition to the virtual inheritance to TestCppValueCast.py.
Plus mark the virtual inheritance test cases as expected failures.

llvm-svn: 149891
2012-02-06 19:14:44 +00:00
Sean Callanan 5b26f27f46 I have brought LLDB up-to-date with top of tree
LLVM/Clang.  This brings in several fixes, including:

- Improvements in the Just-In-Time compiler's
  allocation of memory: the JIT now allocates
  memory in chunks of sections, improving its
  ability to generate relocations.  I have
  revamped the RecordingMemoryManager to reflect
  these changes, as well as to get the memory
  allocation and data copying out fo the
  ClangExpressionParser code.  Jim Grosbach wrote
  the updates to the JIT on the LLVM side.

- A new ExternalASTSource interface to allow LLDB to
  report accurate structure layout information to
  Clang.  Previously we could only report the sizes
  of fields, not their offsets.  This meant that if
  data structures included field alignment
  directives, we could not communicate the necessary
  alignment to Clang and accesses to the data would
  fail.  Now we can (and I have update the relevant
  test case).  Thanks to Doug Gregor for implementing
  the Clang side of this fix.

- The way Objective-C interfaces are completed by
  Clang has been made consistent with RecordDecls;
  with help from Doug Gregor and Greg Clayton I have
  ensured that this still works.

- I have eliminated all local LLVM and Clang patches,
  committing the ones that are still relevant to LLVM
  and Clang as needed.

I have tested the changes extensively locally, but
please let me know if they cause any trouble for you.

llvm-svn: 149775
2012-02-04 08:49:35 +00:00
Greg Clayton 81e871ed76 Convert all python objects in our API to use overload the __str__ method
instead of the __repr__. __repr__ is a function that should return an
expression that can be used to recreate an python object and we were using
it to just return a human readable string.

Fixed a crasher when using the new implementation of SBValue::Cast(SBType).

Thread hardened lldb::SBValue and lldb::SBWatchpoint and did other general
improvements to the API.

Fixed a crasher in lldb::SBValue::GetChildMemberWithName() where we didn't
correctly handle not having a target.

llvm-svn: 149743
2012-02-04 02:27:34 +00:00
Johnny Chen b428b69745 Add test cases for SBValue.Cast(SBType). The test logic needs more polishing.
llvm-svn: 149741
2012-02-04 02:07:33 +00:00
Johnny Chen 9dad8ae6c6 Fix typos.
llvm-svn: 149710
2012-02-03 20:50:56 +00:00
Johnny Chen 15f247ad8c Add test cases for APIs to get template arguments from an SBType.
llvm-svn: 149707
2012-02-03 20:43:00 +00:00
Jim Ingham 5c93906cbf Fix the test properly now that SBValue::GetValueAsUnsigned works for bitfields.
llvm-svn: 148280
2012-01-17 02:17:45 +00:00
Sean Callanan 3c88eae154 Fixed a problem in our local Clang's method for
performing Objective-C instance variable lookup.
Previously, it only completed the derived class
that was the beginning of the search.  Now, as
it walks up the superclass chain looking for the
ivar, it completes each superclass in turn.

Also added a testcase covering this issue.

llvm-svn: 147621
2012-01-05 22:35:40 +00:00
Greg Clayton dcad5021d4 <rdar://problem/10546739>
Fixed SBValue::GetValueAsUnsigned() and SBValue::GetValueAsSigned() calls to
work for bitfields.

llvm-svn: 147332
2011-12-29 01:26:56 +00:00
Sean Callanan 20bb3aa53a The "desired result type" code in the expression
parser has hitherto been an implementation waiting
for a use.  I have now tied the '-o' option for
the expression command -- which indicates that the
result is an Objective-C object and needs to be
printed -- to the ExpressionParser, which
communicates the desired type to Clang.

Now, if the result of an expression is determined
by an Objective-C method call for which there is
no type information, that result is implicitly
cast to id if and only if the -o option is passed
to the expression command.  (Otherwise if there
is no explicit cast Clang will issue an error.
This behavior is identical to what happened before
r146756.)

Also added a testcase for -o enabled and disabled.

llvm-svn: 147099
2011-12-21 22:22:58 +00:00