Commit Graph

9748 Commits

Author SHA1 Message Date
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
Enrico Granata 622be238eb Expose the type-info flags at the public API layer. These flags provide much more informational content to consumers of the LLDB API than the existing TypeClass. Part of the fix for rdar://18517593
llvm-svn: 220322
2014-10-21 20:52:14 +00:00
Eric Christopher 098f898fd2 Move anonymous types declared in an anonymous union to
outside the anonymous union as it's a language extension
we don't normally support.

llvm-svn: 220320
2014-10-21 20:39:34 +00:00
Eric Christopher f75b0ee2ab Remove unused variable.
llvm-svn: 220319
2014-10-21 20:36:17 +00:00
Eric Christopher a2b05d0441 Fix implicit conversion of NULL constant to 'bool'.
llvm-svn: 220318
2014-10-21 20:35:35 +00:00
Enrico Granata dd86f33902 Add typemaps to handle the transformation of Python list of strings into a 'char const **'. This fixes zephyr's issue with SBTarget::Launch without splitting the API into multiple names
llvm-svn: 220306
2014-10-21 17:49:24 +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
Sean Callanan 35e678c7e0 Don't allow the expression parser to magically
look through 'self' at its ivars.  It produces
surprising results.

<rdar://problem/18698760>

llvm-svn: 220220
2014-10-20 18:36:58 +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
Zachary Turner cb5742b828 Don't use mkstemp, as it doesn't exist on Windows.
Differential Revision: http://reviews.llvm.org/D5849
Reviewed by: Jason Molenda

llvm-svn: 220218
2014-10-20 17:46:56 +00:00
Zachary Turner 10687b0ea5 Remove LLDB_DEFAULT_SHELL #define, and determine this at runtime.
Differential Revision: http://reviews.llvm.org/D5805
Reviewed by: Greg Clayton

llvm-svn: 220217
2014-10-20 17:46:43 +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
Sean Callanan 766cf60961 Make the registerEHFrame function do nothing,
because the default implementation isn't meant
to run against a target process.

<rdar://problem/16639561>

llvm-svn: 220100
2014-10-17 23:02:41 +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 0e478f5aa3 Make a general helper function on the AST context to retrieve a type by identifier in the fashion needed by data formatters
llvm-svn: 220059
2014-10-17 17:56:59 +00:00
Jason Molenda 8e96e6b6f2 Break out of the command word parsing loop if we hit
an invalid combination of words; don't accidentally
continue trying to parse the command line.
clang static analysis fixit.

llvm-svn: 220026
2014-10-17 02:10:33 +00:00
Jason Molenda 81926c3ffe Add #if 0 around unreachable block of code to suppress warnings.
clang warnings.

llvm-svn: 220025
2014-10-17 01:56:57 +00:00
Jason Molenda 9bdc4e1a59 Add null-checks around getter/setter before using them.
clang static analyzer fixit.

llvm-svn: 220024
2014-10-17 01:55:08 +00:00
Jason Molenda 84843ed536 A << operation would be undefined for a bit-selecting
function because of a '1u' making it a 32-bit value
when it really needed to be a 64-bit value.  Trivial to fix
once I figured out what was going on.
clang static analzyer fixit.

llvm-svn: 220022
2014-10-17 01:52:30 +00:00
Jason Molenda 5b94115d50 Remove always-true part of a conditional expression.
clang warning.

llvm-svn: 220018
2014-10-17 01:38:10 +00:00
Jason Molenda 61e0a3ef1f Put #if 0 blocks around three sections of code that are intentionally
unreachable so we don't get warnings about them.

Completely initialize a structure instead of leaving some of its fields
potentially indeterminate (although in reality they would all be set 
before use -- but the compiler warning doesn't know that).

clang warning.

llvm-svn: 220017
2014-10-17 01:36:20 +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
Jason Molenda bc464ee614 Change a use of mktemp() to mkstemp() for better security.
We have two more uses of mktemp still in the source base
but they'll take a little more consideration.
clang static analyzer fixit.

llvm-svn: 219983
2014-10-16 23:10:03 +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
Jason Molenda e5d8eaf042 Only call RemovePersistentVariable on expr_result if that shared
pointer contains something.

llvm-svn: 219966
2014-10-16 21:25:43 +00:00
Enrico Granata 8d9c2da2d1 Rework this code so that it does not trigger a compiler warning. NFC
llvm-svn: 219964
2014-10-16 21:18:58 +00:00
Jason Molenda 48c0440d97 Fix MemoryHistory plugin to check whether the plugin
was able to create itself before returning the shared
pointer to it.
clang warning.

llvm-svn: 219936
2014-10-16 16:59:23 +00:00
Jason Molenda 823d8f6246 Most of this function checks to see if m_process is non-null before
dereferencing it, except for this one section of code.  Add a null
check around it.
clang static analyzer fix.

llvm-svn: 219920
2014-10-16 08:43:27 +00:00
Jason Molenda 9bc86593a2 Another logical-or vrs. bitwise-or mixup in ClangUserExpression.
clang unreachable code warning.

llvm-svn: 219918
2014-10-16 08:27:27 +00:00
Jason Molenda b3795a4f5e Enable warnings in the debugserver project file..
llvm-svn: 219917
2014-10-16 08:16:29 +00:00
Jason Molenda 0060a38e7b A series of bit-flag values should be bitwise-or'ed not logical-or'ed.
clang unreachable code warning.

llvm-svn: 219916
2014-10-16 08:15:11 +00:00