$qC from debugserver now returns the current thread's thread-id (and, like $?, will set a current thread if one is not already selected). Previously it was returning the current process id.
lldb will now query $qProcessInfo to retrieve the process id. The process id is now cached lazily and reset like other cached values. Retrieval of the process id will fall back to the old $qC method for vendor==Apple and os==iOS if the qProcessInfo retrieval fails.
Added a gdb remote protocol-level test to verify that $qProcessInfo reports a valid process id after launching a process, while the process is in the initial stopped state. Verifies the given process id is a currently valid process on host OSes for which we know how to check (MacOSX, Linux, {Free/Net}BSD). Ignores the live process check for OSes where we don't know how to do this. (I saw no portable way to do this in stock Python without pulling in other libs).
llvm-svn: 208241
Added a test validating that $qC after an inferior launch via $A
returns a thread id that an immediately followig $? reports for the
active thread. This is currently skipped on debugserver (the thread
ids don't match) and isn't yet implemented in TOT for llgs.
llvm-svn: 208061
Pushed gdbremote protocol sequence expectations into a separate
class and defer matching of llgs/debugserver output to the
sequence entry. Pre-step to adding regex matching and
grouped content collecting.
No longer require anything before the read/send packet
portion of slurped-up log lines used for setting up
gdb remote test sequences. Several packet logging options
produce a wide range of content before the read/send packet.
Added helpers to TestLldbGdbServer to clean up test setup
and test expectations matching.
llvm-svn: 207998
Tests added for debugserver and lldb-gdbserver. lldb-gdbserver marked as
XFAIL on top of tree.
Added build_gdbremote_A_packet test helper to construct a gdbremote A
launch packet from a list of args.
llvm-svn: 207568
TestLldbGdbServer now supports both lldb-gdbserver (llgs) and
debugserver tests. Similar to the dsym/dwarf tests, they allow
running the same underlying gdb remote protocol tests against
lldb-gdbserver and debugserver. This will help make sure the
protocol-level tests for lldb-gdbserver faithfully represent
what debugserver does on OS X.
Switched back gdb remote protocol test logging to warning
and above (accidentally submitted it at debug level in a
recent commit).
llvm-svn: 207395
Adds try/except blocks around clean-up code. Prevents a race between gdb
remote kill command reception by llgs (which leads llgs to shut down)
and the pexpect server kill (which can fail if the kill command handling
completes first). Warnings are emitted on the logger for any clean-up
code that fails.
llvm-svn: 207273
optional path prior to the file base name.
On Linux x86_64 (Ubuntu 12.04) I am sometimes getting a full path
on the stderr.txt. This changes the test for target.error-path and
target.output-path settings to ignore any optional directory before
the expected file base name.
llvm-svn: 207272
currently associated with a given thread, on relevant targets.
Change the queue detection code to verify that the queues
associated with all live threads are included in the list.
<rdar://problem/16411314>
llvm-svn: 207160
lldbgdbserverutils.py has a new expect_lldb_gdbserver_replay() method
that plays back gdb remote send/receive packets. These packets are the
log lines that come from running the 'log enable gdb-remote packets',
either from the lldb-gdbserver side or the lldb side. There's a flag
to flip which side is the send (lldb-gdbserver input or lldb-gdbserver
output).
This first checkin tests the initial gdbremote handshake, the ability
to turn on the no-ack mode communication style, thread suffix support,
and list threads in stop reply support. The last two are marked xfail
as top of tree does not yet support these.
--This line, and those below, will be ignored--
M test/tools/lldb-gdbserver/TestLldbGdbServer.py
M test/tools/lldb-gdbserver/lldbgdbserverutils.py
llvm-svn: 206930
Since these tests pass on (at least some) other platforms, change the
decorators to @expectedFailureDwarwin. Tested on FreeBSD with Clang 3.4
and libc++.
rdar://9980907
rdar://15367233
llvm-svn: 206895
Our build is still getting this test to fail with the presence of const in
'(Foo &const) y = 0x' and '(Foo &&const) z = 0x'. This change simply changes
the match substrings to ignore the portion after the final '&' and before the
closing ')'. This should cover the presence (or absence) of the const qualifier.
llvm-svn: 206762
The underlying issue was actually a Clang bug, now fixed. The test now
reports XPASS for me locally and on the buildbot.
llvm.org/pr17183 (LLDB)
llvm.org/pr18950 (Clang)
llvm-svn: 206761
Perhaps these should be @expectedFailureDarwin instead of
@unittest2.expectedFailure (applying to all hosts); I'm not aware of
the details in the rdars.
Just add a comment for now, for the benefit of anyone investigating
FreeBSD test issues in the future.
rdar://9980907
rdar://15367233
llvm-svn: 206760
The additional "const" breaks the FreeBSD buildbot, and does not appear
to be due to a LLVM or Clang change. Revert the change while
investigating further.
This reverts revision 206619.
llvm-svn: 206751
The lldb-gdbserver tests are skipped if the lldb-gdbserver exe cannot be found (currently only built for Linux and FreeBSD). The lldb-gdbserver exe is found by the LLDB_EXEC environment variable, using the same dir as the lldb exe, and then replacing lldb with lldb-gdbserver.
llvm-svn: 206731
Enable data formatters to see-through pointers/references to typedefs
For instance, if Foo is a typedef to Bar, and there is a formatter for any/all of Bar*, Bar&, Bar&&, then Foo*, Foo&, and Foo&& should pick these up if Foo-specific formatters don't exist
llvm-svn: 205939
Calling mutex_lock from one thread and then mutex_unlock from another is
not permitted. Replace the awkward mutex usage with a mutex and
condition variable.
llvm.org/pr18061
llvm-svn: 205900
Since dosep.ty started invoking multiple tests in parallel, the FreeBSD
buildbot occasionally has a failure due to os.mkdir returning EEXIST.
Silently ignore that exception, but reraise any other.
llvm-svn: 205246
These changes were written by Greg Clayton, Jim Ingham, Jason Molenda.
It builds cleanly against TOT llvm with xcodebuild. I updated the
cmake files by visual inspection but did not try a build. I haven't
built these sources on any non-Mac platforms - I don't think this
patch adds any code that requires darwin, but please let me know if
I missed something.
In debugserver, MachProcess.cpp and MachTask.cpp were renamed to
MachProcess.mm and MachTask.mm as they picked up some new Objective-C
code needed to launch processes when running on iOS.
llvm-svn: 205113
Also added 'import sys' on some tests that are using non-standard
unittest2.skipUnless blocks with code that is intended to do things
that we have more specializes @* attributes for. These skip
conditions were failing to execute due to missing import, causing
darwin-only tests to run on Linux regardless. Will file a bug for
that separately.
llvm-svn: 204747
"Running multithreaded with n threads (from LLDB_TEST_THREADS)" is
incorrect in the common case, because the thread count is now obtained
from a --threads option, or a default of multiprocessing.cpu_count().
I left the messages in for now as there are some intermittent issues
that happen while running tests multithreaded and it may help in
triaging those. We may wish to just remove them later on.
llvm-svn: 204725