Summary: Opened files on Windows cannot be modified, so this test doesn't make sense.
Reviewers: ovyalov, zturner, flackr, clayborg
Reviewed By: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D10295
llvm-svn: 239359
Summary:
Previously if an MI command had **X** mandatory and **Y** optional arguments you could provide **X** or more optional arguments without providing any of the mandatory arguments, and the argument validation code wouldn't complain.
For example this would pass argument validation even though the mandatory **address** and **count** arguments are missing:
-data-read-memory-bytes --thread 1 --frame 0
Part of the problem was that an empty string was considered a valid value for a mandatory argument, which didn't make much sense.
Patch by Vadim Macagon. Thanks!
Test Plan:
./dotest.py -A x86_64 -C clang --executable $BUILDDIR/bin/lldb tools/lldb-mi/
No unexpected failures on my Ubuntu 14.10 64bit Virtualbox VM.
Reviewers: domipheus, ki.stfu, abidh
Reviewed By: ki.stfu, abidh
Subscribers: brucem, lldb-commits
Differential Revision: http://reviews.llvm.org/D10299
llvm-svn: 239297
Summary: Updated `append_to_remote_wd` to work for both remote and local.
Reviewers: clayborg, ovyalov
Reviewed By: ovyalov
Subscribers: tberghammer, lldb-commits
Differential Revision: http://reviews.llvm.org/D10288
llvm-svn: 239203
Summary: This fixes the issue of multiple test suites opening the same file for writing.
Reviewers: clayborg, zturner
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D10284
llvm-svn: 239188
Summary:
This change also adds the infrastructure required to specify the API
levels for which tests should be skipped.
Reviewers: chying, labath
Reviewed By: labath
Subscribers: tberghammer, lldb-commits
Differential Revision: http://reviews.llvm.org/D10282
llvm-svn: 239183
Summary:
urlparse.ParseResult.hostname has only lowercase characters even if the
input URL had uppercase characters. Since Android device IDs can have
uppercase characters as well, use urlparse.ParseResult.netloc instead
and extract the device ID from it.
This change also improves the error message when lookup of the Android
device's API fails.
Reviewers: chaoren
Reviewed By: chaoren
Subscribers: tberghammer, lldb-commits
Differential Revision: http://reviews.llvm.org/D10278
llvm-svn: 239173
Summary:
This change adds the infrastructure to mark tests as xfail for specific
Android API levels.
Test Plan: dotest.py TestChangeProcessGroup on an Android API 16 device.
Reviewers: chying, labath, chaoren
Reviewed By: labath, chaoren
Subscribers: tberghammer, lldb-commits
Differential Revision: http://reviews.llvm.org/D10261
llvm-svn: 239126
Summary:
Not all of that register is readable/writable in user mode. This means
that even if the inferior is stopped, parts of the register could be
changing. So, do not flip this register to check if its value can be
restored.
Reviewers: tberghammer, chaoren
Reviewed By: tberghammer
Subscribers: rengolin, aemerson, lldb-commits
Differential Revision: http://reviews.llvm.org/D10204
llvm-svn: 239104
This was of course overridable by using DumpValueObjectOptions, but the default should be saner and the previous behavior made for a few fun investigations....
rdar://problem/21065149
llvm-svn: 238961
(lldb) settings set thread-format "abc"
(lldb) settings set thread-format 'abc'
(lldb) settings set thread-format abc
We strip the quotes before processing the format string and return an "error: mismatched quotes" if mismatched quotes are given.
<rdar://problem/21210789>
llvm-svn: 238896
% cd lldb/test/lang/c/array_types
% make TRIPLE=x86_64-apple-ios
% make clean
% make TRIPLE=x86_64-apple-ios8.1
% make clean
% make TRIPLE=armv7-apple-ios
% make clean
% make TRIPLE=armv7-apple-ios8.1
% make clean
The TRIPLE variable will automatically set the following variables:
SDKROOT if it isn't specified manually
ARCH will be set to the architecture from the triple
CFLAGS will include the extras needed for the triple which are set in TRIPLE_CFLAGS
TRIPLE_VENDOR set to the triple vendor ("apple" in the above cases)
TRIPLE_OS set to the triple OS ("ios" in the above cases)
TRIPLE_VERSION set to the version that was specified, or automatically set to the SDK version if it is missing
This allows you to change directory into any test case on MacOSX and quickly build for desktop:
% make
iOS simulator:
% make TRIPLE=x86_64-apple-ios
or iOS device:
% make TRIPLE=armv7-apple-ios
llvm-svn: 238869
Summary:
This fixes TestLldbGdbServer and TestSendSignal from Windows to Android.
This change depends on D10171.
Reviewers: clayborg, ovyalov
Reviewed By: clayborg, ovyalov
Subscribers: tberghammer, lldb-commits
Differential Revision: http://reviews.llvm.org/D10172
llvm-svn: 238852
Summary:
This change adds a utility that uses the `kill -l` command to get the
correct signal number. Falls back to using `SBUnixSignals`, and finally
`signal.SIG<signal>` if all else fails.
Reviewers: tberghammer, clayborg, ovyalov
Reviewed By: clayborg, ovyalov
Subscribers: tberghammer, lldb-commits
Differential Revision: http://reviews.llvm.org/D10171
llvm-svn: 238850
Summary:
Previously, OBJCOPY was empty because of the missing comma,
and ar was just `ar`.
Reviewers: ovyalov, tberghammer
Subscribers: tberghammer, lldb-commits
Differential Revision: http://reviews.llvm.org/D10175
llvm-svn: 238849
It consistently times out. The test is already XTIMEOUT'd, but causes
tests to take an extra 5 minutes waiting for the timeout to expire.
llvm.org/pr23731
llvm-svn: 238833
This test was very inconspicuosly skipped on linux, when it was crashing for local debugging. It
seems to work fine with LLGS, so I'm enabling it.
llvm-svn: 238816
Skip the g++ 4.6 test if we're not going to build any C++ source.
If a test has C++ source files we automatically determine which C++
compiler to use based on $CC (for example, clang++ if CC=clang).
However, this is not done for tests without C++ source and CXX will
be GNU make's default of g++. This produces suprious "g++: not found"
errors in testrun output on systems without a gcc/g++.
Differential Revision: http://reviews.llvm.org/D10122
llvm-svn: 238603
If get_stopped_thread(... eStopReasonSignal) returns no thread, the
thread.IsValid assertion would throw AttributeError: 'NoneType' object
has no attribute 'IsValid'.
Differential Revision: http://reviews.llvm.org/D10123
llvm-svn: 238600
Summary:
Previously, we reported inferior receiving SIGSEGV (or SIGILL, SIGFPE, SIGBUS) as an "exception"
to LLDB, presumably to match OSX behaviour. Beside the fact that we were basically lying to the
user, this was also causing problems with inferiors which handle SIGSEGV by themselves, since
LLDB was unable to reinject this signal back into the inferior.
This commit changes LLGS to report SIGSEGV as a signal. This has necessitated some changes in the
test-suite, which had previously used eStopReasonException to locate threads that crashed. Now it
uses platform-specific logic, which in the case of linux searches for eStopReasonSignaled with
signal=SIGSEGV.
I have also added the ability to set the description of StopInfoUnixSignal using the description
field of the gdb-remote packet. The linux stub uses this to display additional information about
the segfault (invalid address, address access protected, etc.).
Test Plan: All tests pass on linux and osx.
Reviewers: ovyalov, clayborg, emaste
Subscribers: emaste, lldb-commits
Differential Revision: http://reviews.llvm.org/D10057
llvm-svn: 238549
Summary:
Old Android devices, for example API 16, do not have the "readlink"
command. To take care of such devices, this commit changes to use "ls -l"
instead of "readlink" to get the lldb-server exe path.
The tests fixed with this change for an Android API 16 arm device are:
TestGdbRemoteAttach
TestGdbRemoteAuxvSupport
TestGdbRemoteExpeditedRegisters
TestGdbRemoteKill
TestGdbRemoteProcessInfo
TestGdbRemoteSegFault
TestGdbRemoteThreadsInStopReply
TestGdbRemote_qThreadStopInfo
Further, all tests in TestLldbGdbServer pass (previously erroring out),
except one which times out.
Test Plan:
Run dosep.py with 8 test threads targetting Android API 16
device.
Reviewers: vharron, ovyalov
Reviewed By: ovyalov
Subscribers: tberghammer, aemerson, lldb-commits
Differential Revision: http://reviews.llvm.org/D10107
llvm-svn: 238532
qEcho:%s
where '%s' is any valid string. The response to this packet is the exact packet itself with no changes, just reply with what you received!
This will help us to recover from packets timing out much more gracefully. Currently if a packet times out, LLDB quickly will hose up the debug session. For example, if we send a "abc" packet and we expect "ABC" back in response, but the "abc" command takes longer than the current timeout value this will happen:
--> "abc"
<-- <<<error: timeout>>>
Now we want to send "def" and get "DEF" back:
--> "def"
<-- "ABC"
We got the wrong response for the "def" packet because we didn't sync up with the server to clear any current responses from previously issues commands.
The fix is to modify GDBRemoteCommunication::WaitForPacketWithTimeoutMicroSecondsNoLock() so that when it gets a timeout, it syncs itself up with the client by sending a "qEcho:%u" where %u is an increasing integer, one for each time we timeout. We then wait for 3 timeout periods to sync back up. So the above "abc" session would look like:
--> "abc"
<-- <<<error: timeout>>> 1 second
--> "qEcho:1"
<-- <<<error: timeout>>> 1 second
<-- <<<error: timeout>>> 1 second
<-- "abc"
<-- "qEcho:1"
The first timeout is from trying to get the response, then we know we timed out and we send the "qEcho:1" packet and wait for 3 timeout periods to get back in sync knowing that we might actually get the response for the "abc" packet in the mean time...
In this case we would actually succeed in getting the response for "abc". But lets say the remote GDB server is deadlocked and will never response, it would look like:
--> "abc"
<-- <<<error: timeout>>> 1 second
--> "qEcho:1"
<-- <<<error: timeout>>> 1 second
<-- <<<error: timeout>>> 1 second
<-- <<<error: timeout>>> 1 second
We then disconnect and say we lost connection.
We might also have a bad GDB server that just dropped the "abc" packet on the floor. We can still recover in this case and it would look like:
--> "abc"
<-- <<<error: timeout>>> 1 second
--> "qEcho:1"
<-- "qEcho:1"
Then we know our remote GDB server is still alive and well, and it just dropped the "abc" response on the floor and we can continue to debug.
<rdar://problem/21082939>
llvm-svn: 238530
Summary:
-Buildbot parser depends on this line as start flag
-Will remove the dependency from buildbot parser, but it takes some time to take effect
-Will remove this line from printout after buildbot master reconfig
Reviewers: chaoren, vharron
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D10110
llvm-svn: 238527
Summary:
Using `(match){3}` instead of `matchmatchmatch`.
This is an update to D10078.
Test Plan: no change in test behavior.
Reviewers: clayborg, sivachandra
Reviewed By: sivachandra
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D10094
llvm-svn: 238510
Summary:
- This test cause Python crash randomly on darwin builder
- Tracked by bug 'llvm.org/pr23669'
Test Plan: ./dotest.py -m --executable /Users/lldb_build/testSlave/buildDir/lldb.src/build/Debug/lldb --framework /Users/lldb_build/testSlave/buildDir/lldb.src/build/Debug/LLDB.framework -A x86_64 -C clang -p TestThreadStates.py
Reviewers: chaoren, vharron
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D10053
llvm-svn: 238495