Commit Graph

2513 Commits

Author SHA1 Message Date
Ed Maste 98b6546dde Remove hex character number from wchar_t test
After r220894 (StringPrinter change) it is no longer emitted. Update the
test rather than considering it a bug as the new format is preferred.

llvm-svn: 220914
2014-10-30 17:41:11 +00:00
Ed Maste 2ec8e1bd20 Temporarily disable test on FreeBSD that is asserting
llvm.org/pr21325

llvm-svn: 220871
2014-10-29 20:02:54 +00:00
Ed Maste e95d9d2c04 Skip test that's hanging on FreeBSD until it can be investigated
llvm.org/pr21411

llvm-svn: 220856
2014-10-29 15:09:27 +00:00
Enrico Granata 88282c69f3 Add a feature where a string data formatter can now be partially composed of Python summary functions
This works similarly to the {thread/frame/process/target.script:...} feature - you write a summary string, part of which is

${var.script:someFuncName}
someFuncName is expected to be declared as
def someFuncName(SBValue,otherArgument) - essentially the same as a summary function

Since . -> [] are the only allowed separators, and % is used for custom formatting, .script: would not be a legitimate symbol anyway, which makes this non-ambiguous

llvm-svn: 220821
2014-10-28 21:07:00 +00:00
Sean Callanan e17428acfa Added the ability to add attributes to inline
testcases.  Also fixed one of the testcases to
not run on the platforms that don't support
Objective-C.

We want to do better with the Objective-C attribute
but we'll do that in a future commit.

llvm-svn: 220820
2014-10-28 20:23:20 +00:00
Enrico Granata 4f2fe82b6d When trying to get the element type of an array type, do not go to the canonical type, since that will strip typedefs where we want them to be preserved. Fixes rdar://15453076
llvm-svn: 220810
2014-10-28 18:25:50 +00:00
Jim Ingham c891d86349 Add a test for setting and hitting the C++ Exception throw breakpoint.
llvm-svn: 220743
2014-10-28 00:53:20 +00:00
Enrico Granata e9afaf71f7 This looks like the actual path under which the builder looks for LLDB headers, so use this path instead
llvm-svn: 220718
2014-10-27 20:31:12 +00:00
Ed Maste 49e4068781 Skip ObjC test on FreeBSD that does not build
llvm-svn: 220681
2014-10-27 15:01:59 +00:00
Todd Fiala 479f230032 Fix the TestCreateAfterAttach test for llgs-local on ptracer lock-down.
llvm-svn: 220661
2014-10-27 00:58:27 +00:00
Todd Fiala 0135e236b6 Fix TestProcessAttach for Linux ptracer lock-down and llgs-local.
llvm-svn: 220660
2014-10-27 00:31:05 +00:00
Todd Fiala 789d29df34 Fix up TestRegisters for Linux ptracer lock-down.
All of these test fixups are prep work for when llgs is
running with llgs for local process debugging, where these
tests fail without the ptracer lock-down suppression.

llvm-svn: 220656
2014-10-26 22:25:33 +00:00
Todd Fiala 25a0ad9707 Fix TestAttachResume test so it doesn't hang on Linux with ptrace lockdown.
Similar to previous fix, this augments the test inferior to
immediately indicate it may be ptraced by any Linux process
when the appropriate symbols are defined.

This seems to indicate we need to fix our lldb attach logic to
catch when an attach fails, and trigger an appropriate error
instead of the current behavior of hanging indefinitely.

llvm-svn: 220654
2014-10-26 22:08:56 +00:00
Todd Fiala f183754779 Fix HelloWorld attach test for Linux kernels with ptrace ancestor lockdown.
Similar to a recent test I fixed for gdb-remote attach scenarios, this
fix is for Linux kernels, such as Ubuntu's stock setup on 11.04-ish and
later, where ptrace starts requiring a ptracer to be an ancestor of the
inferior to be ptraced.  This change checks for Linux and the ptrace-related
flags.  If they're found, it tries to switch on the "allow any ptracer" mode
for the inferior as the first statements in the program.  It's a best-effort
solution - if the prctl call fails, the failure is ignored, and probably will
lead to the test failing.

The ptrace security behavior can be modified system-wide, but is outside the
scope of the test to address.  Hence I went with this particular solution.

llvm-svn: 220650
2014-10-26 21:37:46 +00:00
Ed Maste 40dc7eb150 Remove duplicated new file content
llvm-svn: 220591
2014-10-24 20:49:50 +00:00
Jim Ingham 65b3f547cd Patch from ovyalov@google.com:
Handle pexpect exceptions correctly so that processes spawned with 
pexpect are always reaped.

llvm-svn: 220583
2014-10-24 18:51:57 +00:00
Enrico Granata ecbe7c03a0 This test case should not rely on stepping behavior because that might chance due to inlining. Set breakpoints where you want them instead. Fixes rdar://18724175
llvm-svn: 220513
2014-10-23 21:35:18 +00:00
Enrico Granata 249d639786 Fix a problem where an SBType was advertising its static type class even though a dynamic type was available. Solves rdar://18744420
llvm-svn: 220511
2014-10-23 21:15:20 +00:00
Ed Maste e1b25368f0 Disable dsym tests on !Darwin hosts
This was missing from r219984

llvm.org/pr21324

llvm-svn: 220485
2014-10-23 15:21:45 +00:00
Enrico Granata e85fe3a4d1 Reorganize some of the data formatters code to simplify CXXFormattersFunction.h. Also, add a synthetic child provider for libc++'s version of std::initializer_list<T>
llvm-svn: 220421
2014-10-22 20:34:38 +00:00
Enrico Granata 4bd54a1544 Fixed a problem in the lldbinline logic where C++ files could not be validly compiled
llvm-svn: 220420
2014-10-22 20:33:34 +00:00
Enrico Granata 50bed5e86f Fix a problem where summary strings could not use a synthetically generated value as part of themselves
llvm-svn: 220414
2014-10-22 20:14:09 +00:00
Shawn Best 13491c4f24 Sort unit test failures by name - submitted for Vince Harron http://reviews.llvm.org/D5904
llvm-svn: 220406
2014-10-22 19:29:00 +00:00
Matthew Gardiner c928de3e8e Added functions to the C++ API, for the benefit of non-8-bit byte architectures.
New functions to give client applications to tools to discover target byte sizes
for addresses prior to ReadMemory. Also added GetPlatform and ReadMemory to the
SBTarget class, since they seemed to be useful utilities to have.

Each new API has had a test case added.

http://reviews.llvm.org/D5867

llvm-svn: 220372
2014-10-22 07:22:56 +00:00
Jim Ingham a672ecefef The breakpoint location hit counts were getting incremented in
BreakpointLocation::ShouldStop.  That worked but wasn't really right,
since there's nothing to guarantee that won't get called more than
once.  So this change moves that responsibility to the StopInfoBreakpoint
directly, and then it uses the BreakpointSite to actually do the bumping.

Also fix a test case that was assuming if you had many threads running some 
code with a breakpoint in it, the hit count when you stopped would always be
1.  Many of the threads could have hit it at the same time...

<rdar://problem/18577603>

llvm-svn: 220358
2014-10-22 01:54:17 +00:00
Greg Clayton dc6224e0a3 Make the "synchronous" mode actually work without race conditions.
There were many issues with synchronous mode that we discovered when started to try and add a "batch" mode. There was a race condition where the event handling thread might consume events when in sync mode and other times the Process::WaitForProcessToStop() would consume them. This also led to places where the Process IO handler might or might not get popped when it needed to be.

llvm-svn: 220254
2014-10-21 01:00:42 +00:00
Ed Maste 1b102650cb Skip dsym test on !Darwin
r219978 fixed this test to work on Darwin, and removed the expected
failure decorator, but it then started running (and failing) on FreeBSD.

I'd think @dsym_test should skip the test on all non-Darwin operating
systems. It seems not to be the case, so for now skip it the same way as
done for other @dsym_test tests.

llvm-svn: 220219
2014-10-20 18:12:46 +00:00
Todd Fiala 30846cd941 Fix 4 failing llgs-related tests on a stock Ubuntu 14.04 x86_64 system./
This fix addresses a requirement on some Linux kernels that limits
a PTRACER to be an ancestor of the ptraced process.  The fix in this
case is to have the inferior test exe explicitly allow any ptracer
to attach.

This fixes several ptrace-related issues that I did not see on a modified
kernel we used internally on my team.

See http://reviews.llvm.org/D5846 for details.

This fixes these previously failing tests on stock Ubuntu systems:

FAIL: LLDB (suite) :: TestGdbRemoteProcessInfo.py (Linux vagrant 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64)

FAIL: LLDB (suite) :: TestGdbRemoteAttach.py (Linux vagrant 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64)

FAIL: LLDB (suite) :: TestLldbGdbServer.py (Linux vagrant 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64)

FAIL: LLDB (suite) :: TestGdbRemoteKill.py (Linux vagrant 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64)
llvm-svn: 220181
2014-10-20 03:56:46 +00:00
Greg Clayton a6cffdecde Fixed python API event test cases.
Issues were:
1 - It isn't good to have more than one listener for the process events, just supply a listener at launch instead of making a one then have the process broadcaster add a new listener
2 - run in async mode

llvm-svn: 220113
2014-10-17 23:58:27 +00:00
Enrico Granata 39e4bb3bc5 Do not delete the class, or else multiple tests that try to rely on lldbinline will fail
llvm-svn: 220095
2014-10-17 21:50:42 +00:00
Sean Callanan 5e3bdbff3f Fixed the expression parser to handle cases where
GetValueForVariableExpressionPath returns NULL and
doesn't set an error.

<rdar://problem/18682916>

llvm-svn: 220070
2014-10-17 18:16:04 +00:00
Enrico Granata cf3ab58e47 Making all @expectedFailure markers take an explicit bugnumber annotation. This used to be optional, but that makes it harder to track what tests are failing for what reason. So, make it mandatory, in the form of refusing to run the test suite if annotations are missing
llvm-svn: 220012
2014-10-17 01:11:29 +00:00
Enrico Granata 4b2f7456ad Don't enable the log here. It was just me debugging
llvm-svn: 220011
2014-10-17 01:09:06 +00:00
Enrico Granata ed1d075d78 Add a few more bug IDs for x'fail test cases
llvm-svn: 220003
2014-10-17 00:47:44 +00:00
Sean Callanan d950fa7165 Made multi-line test case actions possible in
the inline test cases.  This makes them much
more readable.

llvm-svn: 220001
2014-10-17 00:39:37 +00:00
Enrico Granata e2669ba6d4 Attach a bug number to these failures
llvm-svn: 219986
2014-10-16 23:17:46 +00:00
Enrico Granata d15ad22048 Split this test case to handle each literal kind uniquely
llvm-svn: 219985
2014-10-16 23:16:13 +00:00
Sean Callanan 816cb3eed4 Added a new kind of test case: the "inline" test
case.  This test case style attempts to shed all
of the boilerplate that is required for test
cases, and let 80% of test cases use a much terser
syntax.

Inline testcases have much simplified python files
(the corresponding .py file should contain two
lines of code) and require no Makefile, because the
Makefile is generated automatically.  Breakpoints
are set automatically and the indicated breakpoint
actions (specified after a magic //% comment) are
executed when the breakpoint is hit.

All other testcases are unaffected.

One thing I'm not really happy with yet is the way
multiple actions for the same line are specified.
I'm going to use lang/c/struct_types as a guinea
pig to develop this further.

llvm-svn: 219984
2014-10-16 23:15:22 +00:00
Enrico Granata 511247188f The number '5' triggers a bug unrelated to LLDB, and is not instrumental to this test in any way. Use another, randomly chosen, number to make the test pass again and provide useful actionable feedback about things that truly matter
llvm-svn: 219982
2014-10-16 23:06:40 +00:00
Enrico Granata 82909b9f1d Some more test marking
llvm-svn: 219981
2014-10-16 23:03:06 +00:00
Enrico Granata d2657c53ac This test needs the SB headers to make sense
llvm-svn: 219980
2014-10-16 23:02:45 +00:00
Jim Ingham da3a386622 Add a test for the -b (batch mode) option to the lldb driver.
llvm-svn: 219979
2014-10-16 23:02:14 +00:00
Enrico Granata a0524bd159 Fix this test case to actually work - it was relying on a certain 'po' output which wasn't occurring
llvm-svn: 219978
2014-10-16 23:02:03 +00:00
Enrico Granata 83e7f68d39 Some more failure to bug tracking
llvm-svn: 219973
2014-10-16 22:27:17 +00:00
Enrico Granata 0d976f0699 Associate a bug tracking ID with this test case
llvm-svn: 219972
2014-10-16 22:06:26 +00:00
Enrico Granata be7d285e73 This test actually works alright - we were just checking for the wrong string
llvm-svn: 219971
2014-10-16 22:04:05 +00:00
Enrico Granata d116f4a0a0 I see this test case crash - skip for now
llvm-svn: 219970
2014-10-16 21:42:34 +00:00
Enrico Granata b0c5b8f228 Make this test case more resilient in the face of line-table and inlining changes
llvm-svn: 219828
2014-10-15 18:42:45 +00:00
Zachary Turner 756acbaa0e Fix a path concatenation issue related to windows paths.
llvm-svn: 219730
2014-10-14 21:54:14 +00:00
Greg Clayton b8e9b8b703 Fixed stdio redirection within LLDB to "do the right thing" in all cases.
The main issue was if you didn't specify all three (stdin/out/err), you would get file actions added to the launch that would always use the pseudo terminal. This is now fixed.

Also fixed the test suite test that handles IO to test redirecting things individually and all together and in other combinations to make sure we don't regress.

<rdar://problem/18638226>

llvm-svn: 219711
2014-10-14 20:18:05 +00:00