Commit Graph

1668 Commits

Author SHA1 Message Date
Jim Ingham e2231ac783 Added an SBAPI to get the PythonPath (if the Host knows how to do that). And a -P option to the Driver
to print it out.  Changed dotest.py to use that to find the PythonPath it should use given the lldb binary
it was told to run.

llvm-svn: 170932
2012-12-21 22:22:26 +00:00
Andrew Kaylor 06a18d7d56 Updating TestAbbreviations.py to check for a reduced set of instructions when testing 'dis -f'.
Not all of the expected instructions were being generated for the function being disassembled on x86-64-based Linux.  It had no push, pop or leave.

llvm-svn: 170818
2012-12-21 00:26:22 +00:00
Andrew Kaylor d362d910f3 Setting TestInferiorChanged.py to expectedFailureLinux because of bugzilla 14662.
Note that the test actually fails before reaching the assertion described in that bug, but the failure is a trivial matter of adding OS-conditional expected stop reason strings (as noted by new comments in this patch).  However, with the stop reason strings changed, the test fails for the more substantial reason noted in bugzilla 14662.

llvm-svn: 170619
2012-12-20 00:19:27 +00:00
Andrew Kaylor a817191605 Mark register tests as expectedFailureLinux because of bugzilla reports 14600 and 14661.
llvm-svn: 170605
2012-12-19 23:31:12 +00:00
Daniel Malea c66cf9e3eb Disable confirmation prompt in TestProcessLaunch (to avoid hang on Linux once bug is fixed)
llvm-svn: 170603
2012-12-19 23:22:11 +00:00
Sean Callanan 7be70e8528 This patch removes the SymbolFileSymtab support
for reporting class types from Objective-C runtime
class symbols.  Instead, LLDB now queries the 
Objective-C runtime for class types.

We have also added a (minimal) Objective-C runtime
type vendor for Objective-C runtime version 1, to 
prevent regressions when calling class methods in
the V1 runtime.

Other components of this fix include:

- We search the Objective-C runtime in a few more
  places.

- We enable enumeration of all members of
  Objective-C classes, which Clang does in certain
  circumstances.

- SBTarget::FindFirstType and SBTarget::FindTypes
  now query the Objective-C runtime as needed.

- I fixed several test cases.

<rdar://problem/12885034>

llvm-svn: 170601
2012-12-19 23:05:01 +00:00
Andrew Kaylor 8013df71c7 Skip libc++ data formatter tests on Linux because there is no standard location for the makefile to find libc++.
llvm-svn: 170575
2012-12-19 19:32:40 +00:00
Daniel Malea 34f21d18b5 Test suite cleanup for Linux: mark test cases expected to fail due to open bugzillas
- bugzillas covered: 14323, 14600, 14541, 14437, 14540, 14541

llvm-svn: 170564
2012-12-19 17:19:28 +00:00
Jim Ingham 1b5792e5ad Adding events when watchpoints are set or changed.
<rdar://problem/11597849>

llvm-svn: 170400
2012-12-18 02:03:49 +00:00
Andrew Kaylor d3ce0041b4 Skipping the DeadStripTestCase.test_with_dwarf test on Linux because the Linux ld lacks support for the -dead_strip option.
llvm-svn: 170244
2012-12-14 21:11:46 +00:00
Sean Callanan 06119a17ce Made the struct test case actually use an expression
instead of falling through to the "frame variable"
code.

llvm-svn: 170169
2012-12-14 00:56:57 +00:00
Enrico Granata 73f601fbd9 Fixing the -f option so that one specify multiple filters, e.g.
./dotest.py  -C clang --arch x86_64 --arch i386  -v -t -f ObjCDataFormatterTestCase.test_appkit_with_dsym_and_run_command -f ObjCDataFormatterTestCase.test_appkit_with_dwarf_and_run_command -f TestObjCBuiltinTypes.test_with_dsym_and_python_api -f TestObjCBuiltinTypes.test_with_dwarf_and_python_api -f ObjCDataFormatterTestCase.test_appkit_with_dsym_and_run_command -f ObjCDataFormatterTestCase.test_appkit_with_dwarf_and_run_command -f TestObjCBuiltinTypes.test_with_dsym_and_python_api -f -TestObjCBuiltinTypes.test_with_dwarf_and_python_api

The previous implementation would only remember the last filter passed, and consequently break redo.py

llvm-svn: 170163
2012-12-14 00:07:09 +00:00
Enrico Granata 9e7b388589 <rdar://problem/11689939>
Supporting a compact display syntax for ObjC pointers where 0x00.....0 is replaced by a much more legible "nil"
e.g. this would show:
(NSArray *) $2 = nil
instead of:
(NSArray *) $2 = 0x0000000000000000 <nil>

llvm-svn: 170161
2012-12-13 23:50:33 +00:00
Andrew Kaylor 2529ae3962 Marking test_lldb_iter_frame in TestLLDBIterator.py as expectedFailureLinux (due to lack of multi-threaded debugging support).
llvm-svn: 170074
2012-12-13 01:28:44 +00:00
Andrew Kaylor f256cfc85e Marking TestPrintStackTraces.py as expectedFailureLinux (due to lack of multi-threaded debugging support).
llvm-svn: 170043
2012-12-12 23:12:09 +00:00
Jim Ingham c627682ef7 Fixed a few bugs in the "step in" thread plan logic.
Added a "step-in-target" flag to "thread step-in" so if you have something like:

Process 28464 stopped
* thread #1: tid = 0x1c03, function: main , stop reason = breakpoint 1.1
    frame #0: 0x0000000100000e08 a.out`main at main.c:62
   61         
-> 62         int A6 = complex (a(4), b(5), c(6)); // Stop here to step targetting b and hitting breakpoint.
   63             

and you want to get into "complex" skipping a, b and c, you can do:

(lldb) step -t complex
Process 28464 stopped
* thread #1: tid = 0x1c03, function: complex , stop reason = step in
    frame #0: 0x0000000100000d0d a.out`complex at main.c:44
   41     
   42     int complex (int first, int second, int third)
   43     {
-> 44         return first + second + third;  // Step in targetting complex should stop here
   45     }
   46         
   47     int main (int argc, char const *argv[])

llvm-svn: 170008
2012-12-12 19:58:40 +00:00
Enrico Granata 7b8c513f08 Option changes:
the option to print the runtime-specific description has been modified in the frame variable, memory read and expression command.

All three commands now support a --object-description option, with a shortcut of -O (uppercase letter o)

This is a breaking change:
frame variable used --objc as the long option name
expression used -o as a shortcut
memory read uses --objd as the long option name

Hopefully, most users won't be affected by the change since people tend to access "expression --object-description" under the alias "po" which still works

The test suite has been tweaked accordingly.

llvm-svn: 169961
2012-12-12 03:23:37 +00:00
Greg Clayton 89deb06bbb <rdar://problem/12780507>
Fix add-dsym ("target symbols add") to correctly add a dSYM file when the target arch doesn't match the arch of the module.

llvm-svn: 169952
2012-12-12 01:15:30 +00:00
Enrico Granata 9d14084b45 Adding a validation callback mechanism to OptionValueString (such a feature might theoretically be added to the general OptionValue base class should the need arise)
Using this mechanism, making sure that the options to pass a summary string or a named summary to frame variable do not have invalid values

<rdar://problem/11576143>

llvm-svn: 169927
2012-12-11 22:42:19 +00:00
Sean Callanan 496970f6ee Fixed the IRInterpreter's handling of "this" and
"self" when those pointers are in registers.
Previously in this case the IRInterpreter would
handle them just as if the user had typed in
"$rdi", which isn't safe because $rdi is passed
in through the argument struct.

Now we correctly break out all three cases (i.e.,
normal variables in registers, $reg, and this/self),
and handle them in a way that's a little bit easier
to read and change.

This results in more accurate printing of "this" and
"self" pointers all around.  I have strengthened the
optimized-code test case for Objective-C to ensure
that we catch regressions in this area reliably in
the future.

<rdar://problem/12693963>

llvm-svn: 169924
2012-12-11 22:39:36 +00:00
Enrico Granata e6a6d9ae07 <rdar://problem/12709976>
Adding a summary for NSError

llvm-svn: 169792
2012-12-10 23:30:25 +00:00
Andrew Kaylor e0930d3316 Fix Test11588.py on Linux. The test was failing because the synthetic type fields were resolving to int instead of long. A similar change was made in r155144 to eliminate the type specification for an earlier check in this test, so it seemed appropriate here too.
llvm-svn: 169615
2012-12-07 17:45:05 +00:00
Jim Ingham b58671eca3 Mark the "dwarf" version of the test expected fail as well as the dsym version.
llvm-svn: 169549
2012-12-06 21:40:51 +00:00
Greg Clayton 4ef877f5e9 <rdar://problem/12560257>
Fixed zero sized arrays to work correctly. This will only happen once we get a clang that emits correct debug info for zero sized arrays. For now I have marked the TestStructTypes.py as an expected failure.

llvm-svn: 169465
2012-12-06 02:33:54 +00:00
Sean Callanan faa0bb3fa1 Rewrote the bitfield logic. Major changes include:
- Removed the BitfieldMap class because it is unnecessary.
  We now just track the most recently added field.

- Moved the code that calculates bitfield widths so it
  can also be used to determine whether it's necessary
  to insert anonymous fields.

- Simplified the anonymous field calculation code into
  three cases (two of which are resolved identically).

- Beefed up the bitfield testcase.

llvm-svn: 169449
2012-12-05 23:37:14 +00:00
Daniel Malea 4e718e7dd8 Mark TestConnectRemote.py as expected to fail on Linux due to bugzilla #14427
llvm-svn: 169295
2012-12-04 19:53:59 +00:00
Greg Clayton 3bcdfc0ec1 <rdar://problem/12798131>
Cleaned up the option parsing code to always pass around the short options as integers. Previously we cast this down to "char" and lost some information. I recently added an assert that would detect duplicate short character options which was firing during the test suite.

This fix does the following:
- make sure all short options are treated as "int"
- make sure that short options can be non-printable values when a short option is not required or when an option group is mixed into many commands and a short option is not desired
- fix the help printing to "do the right thing" in all cases. Previously if there were duplicate short character options, it would just not emit help for the duplicates
- fix option parsing when there are duplicates to parse options correctly. Previously the option parsing, when done for an OptionGroup, would just start parsing options incorrectly by omitting table entries and it would end up setting the wrong option value

llvm-svn: 169189
2012-12-04 00:32:51 +00:00
Daniel Malea 2bbf09e39e Mark expected failures on Linux (due to bugzilla #14437)
llvm-svn: 168727
2012-11-27 21:33:41 +00:00
Jim Ingham 9732e08a4d The skipOnLinux decorator wasn't calling the test method correctly (no need to pass in the "self") resulting
in errors on MacOS X for the tests so decorated.

llvm-svn: 168662
2012-11-27 01:21:28 +00:00
Daniel Malea b0916015ae Improvement to TestGlobalVariables fix
- use lldb settings command instead of os.environ
- use dyldPath fixture variable instead of hardcoding LD_LIBRARY_PATH
- add tear-down hook to restore environment after testcase is run

llvm-svn: 168613
2012-11-26 21:23:12 +00:00
Daniel Malea 179ff29811 Fix for TestSharedLib.py (on Linux)
- use lldb 'settings' command to help testcase find shared library
- pull up dyldPath variable from TestLoadUnload.py to fixture base class (applicable in multiple cases)

llvm-svn: 168612
2012-11-26 21:21:11 +00:00
Daniel Malea bdf0fef067 Fix TestGlobalVariables.py (on Linux)
- setting LD_LIBRARY_PATH required for the test program to run correctly

llvm-svn: 168595
2012-11-26 16:54:53 +00:00
Daniel Malea 561e218517 Skip objC test on non-darwin platforms
llvm-svn: 168531
2012-11-23 22:15:09 +00:00
Daniel Malea 662f2b8be0 Remove decorator to skip event tests
- hang resolved in r168503

llvm-svn: 168530
2012-11-23 22:10:20 +00:00
Daniel Malea 93aec0f9a9 Update test status on Linux
- add decorators @expectedFailLinux and @skipOnLinux
- skip/mark xfail cases due to open bugzillas # 14323, 14416, 14423, 14424, 14425, 14426

Patch by Ashok Thirumurthi!

llvm-svn: 168529
2012-11-23 21:59:29 +00:00
Daniel Malea 4bd152d8e6 Disable darwin-specific test on non-darwin platforms
llvm-svn: 168454
2012-11-21 20:17:07 +00:00
Daniel Malea b90c36868e Linux test case fixes
- missing includes in cpp test programs
- mismatched dwarf/dsym test cases
- make "com.apple.main-thread" expected string conditional on darwin platform

llvm-svn: 168452
2012-11-21 20:12:12 +00:00
Daniel Malea 1b8b392889 Clear auto-confirm setting on teardown for tests that use it
llvm-svn: 168382
2012-11-20 19:46:54 +00:00
Daniel Malea 096925233b Use auto-confirm setting to avoid prompts causing some tests to appear to hang
- this commit addresses bugzilla #14385

llvm-svn: 168375
2012-11-20 18:53:21 +00:00
Daniel Malea e199a571cb Fix incorrect usage of buildDsym() in dwarf test
llvm-svn: 168371
2012-11-20 16:08:36 +00:00
Daniel Malea a750049171 Skip dsym tests on Linux
llvm-svn: 168370
2012-11-20 16:07:33 +00:00
Daniel Malea 218894788d Temporarily skip tests known to hang on Linux
- opened bugzilla defects #14384 and #14385

llvm-svn: 168323
2012-11-19 20:55:52 +00:00
Filipe Cabecinhas 83ae33d461 Fix expected error message in test.
llvm-svn: 168220
2012-11-16 23:18:41 +00:00
Sean Callanan e0b23b5198 In cases where the Objective-C ivar symbols are stripped out,
expressions that refer to ivars will not work because Clang
emits IR that refers to them to get the ivar offsets. 
However, it is possible to search the runtime for these values.

I have added support for reading the relevant tables to the
Objective-C runtime, and extended ClangExpressionDeclMap to
query that information if and only if it doesn't find the symbols
in the binary.

Also added a testcase.

<rdar://problem/12628122>

llvm-svn: 168018
2012-11-15 02:02:04 +00:00
Enrico Granata e78fe11b6c <rdar://problem/12408181> Test case to make sure this area of ObjC support does not regress in the future
llvm-svn: 168000
2012-11-14 23:45:48 +00:00
Daniel Malea d4214f0c86 Fix typo (dwarf/dsym mismatch) in testcase causing early failure on Linux
llvm-svn: 167771
2012-11-12 22:43:13 +00:00
Jason Molenda 28826a491c Patch from Dan Malea daniel.malea@gmail.com to add some required
flags to the Linux makefiles to get the tests to run.

llvm-svn: 167600
2012-11-08 23:50:33 +00:00
Greg Clayton 9f078b773d Added unnamed bitfields to our bitfield test.
llvm-svn: 167473
2012-11-06 18:22:59 +00:00
Sean Callanan 0c23368a34 Fixes to make the test suite work better when
explicitly pointed at an LLDB framework and
executable.

llvm-svn: 167250
2012-11-01 21:23:21 +00:00
Filipe Cabecinhas c281a3bf43 Makefile patches from Charles Davis and Daniel Malea (+ one or two tweaks).
llvm-svn: 167242
2012-11-01 18:55:16 +00:00