Commit Graph

10944 Commits

Author SHA1 Message Date
Robert Flack 8f4c4d535b Update sys.platform switched behavior in tests to use self.getPlatform (remote target platform)
Uses target platform when determining which platform specific behavior to use
or expect in tests. TestHelp.py was unchanged because this is asserting
behavior of the local lldb binary.

Test Plan:
Run tests on different remote os. Several previously failing tests now pass:
TestArrayTypes.py
TestInferiorChanged.py
TestInferiorCrashing.py
TestIvarProtocols.py
TestProcessIO.py
TestPublicAPIHeaders.py
TestRecursiveInferior.py

Differential Revision: http://reviews.llvm.org/D8747

llvm-svn: 233805
2015-04-01 13:26:16 +00:00
Tamas Berghammer 22f610714f Make TestBreakpointConditions aarch64 compatible
llvm-svn: 233800
2015-04-01 11:44:47 +00:00
Tamas Berghammer 553998de47 Add missing makefile got test case
llvm-svn: 233797
2015-04-01 10:48:10 +00:00
Tamas Berghammer 319c459335 Make Test11588 compatible with non x86/x86_64 architecture
llvm-svn: 233796
2015-04-01 10:45:44 +00:00
Tamas Berghammer 3c0d005732 Correctly detect sign-ness of wchar_t
The underlying type of wchar_t is not defined by the standard. This CL
add logic to correctly use the type specified for the current target
based on TargetInfo.

llvm-svn: 233795
2015-04-01 09:48:02 +00:00
Oleksiy Vyalov f9da94832f Fix ForwardPortWithAdb - update device_id variable if Android device has been found.
llvm-svn: 233780
2015-04-01 02:30:17 +00:00
Jason Molenda 7a5014b040 Add a call to SBDebugger:Destroy() at the end of the self-hosted
version of this script.  We picked up a bug at some point in March
where scripts that fail to call SBDebugger::Destroy() will crash
in the Debugger C++ dtor.  I want to track the change down which
introduced the change - but this script should be calling
SBDebugger::Destroy() in the first place, so do that.

llvm-svn: 233779
2015-04-01 02:09:04 +00:00
Chaoren Lin 0ddb72263f Implement Handle_QEnvironmentHexEncoded.
Reviewers: clayborg, ovyalov, chaoren

Reviewed By: chaoren

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D8689

llvm-svn: 233768
2015-03-31 22:37:59 +00:00
Zachary Turner aa7f12be7f Fix build error due to new plugin namespaces.
llvm-svn: 233762
2015-03-31 21:38:21 +00:00
Zachary Turner e6e2bb3842 Rework LLDB system initialization.
In an effort to reduce binary size for components not wishing to
link against all of LLDB, as well as a parallel effort to reduce
link dependencies on Python, this patch splits out the notion of
LLDB initialization into "full" and "common" initialization.

All code related to initializing the full LLDB suite lives directly
in API now.  Previously it was only referenced from API, but because
it was defined in lldbCore, it would get implicitly linked against
by everything including lldb-server, causing a considerable
increase in binary size.

By moving this to the API layer, it also creates a better layering
for the ongoing effort to make the embedded interpreter replacable
with one from a different language (or even be completely removeable).

One semantic change necessary to get this all working was to remove
the notion of a shared debugger refcount.  The debugger is either
initialized or uninitialized now, and calling Initialize() multiple
times will simply have no effect, while the first Terminate() will
now shut it down no matter how many times Initialize() was called.
This behaves nicely with all of our supported usage patterns though,
and allows us to fix a number of nasty hacks from before.

Differential Revision: http://reviews.llvm.org/D8462

llvm-svn: 233758
2015-03-31 21:03:22 +00:00
Greg Clayton 902716728c Make sure that "add-dsym" can't crash us when using it.
I am fixing this by:
1 - make sure we aren't trying to set the symbol file for a module to the same thing it already has and leaving it alone if it is the same
2 - keep all old symbol files around in the module in case there are any outstanding type references

<rdar://problem/18029116>

llvm-svn: 233757
2015-03-31 21:01:48 +00:00
Greg Clayton 1988ac60a6 Silence a compiler warning about "bAsyncMode" possibly being used uninitialized.
llvm-svn: 233754
2015-03-31 20:55:50 +00:00
Vince Harron 091a95d412 TestPrintStackTraces - made XFAIL more precise
Works with x86_64 inferior, fails w/i386 inferior - updated test to
reflect

llvm-svn: 233717
2015-03-31 17:45:54 +00:00
Vince Harron 3d2979ee2f Enabled a bunch of tests on Linux
Removed expectedFailureLinux from failures that I was unable to
reproduce, updated and improved some other comments near XFAIL tests

Differential Revision: http://reviews.llvm.org/D8676

llvm-svn: 233716
2015-03-31 17:44:37 +00:00
Greg Clayton 581186ce39 Fix DynamicLoaderMacOSXDYLD to deal with new shared cache changes.
<rdar://problem/20357466>

llvm-svn: 233714
2015-03-31 17:02:36 +00:00
Ed Maste bf441f4ffa Fix FreeBSD test runs after r233311
On FreeBSD LLDB's triple ends up as e.g. "x86_64-unknown-freebsd10.1"
but getPlatform() consumers expect just the name with no version
number.

llvm-svn: 233705
2015-03-31 16:37:10 +00:00
Hafiz Abid Qadeer 0e1f11ffe0 Changed a function to static.
A temp object was being created to call StripOffFileName. This function
is not dependent on class members so I am making it static.
No regression on testsuite on Linux.

llvm-svn: 233703
2015-03-31 16:30:29 +00:00
Mohit K. Bhakkad 09ba1a323e [LLDB][MIPS] Read/Write register for MIPS64
Patch by Sagar Thakur

Reviewers: clayborg, tberghammer.

Subscribers: jaydeep, bhushan, mohit.bhakkad, llvm-commits.

Differential Revision: http://reviews.llvm.org/D8695

llvm-svn: 233685
2015-03-31 12:01:27 +00:00
Tamas Berghammer dccbfaf917 Fix type detection for 'char' variables
A char can have signed and unsigned encoding but previously lldb always
assumed it is signed. This CL adds a logic to detect the encoding of
'char' types based on the default encoding on the target architecture.
It fixes variable printing and expression evaluation on architectures
where 'char' is signed by default.

Differential revision: http://reviews.llvm.org/D8636

llvm-svn: 233682
2015-03-31 10:21:50 +00:00
Tamas Berghammer 47b11c61ca Fix Windows build after r233679
llvm-svn: 233680
2015-03-31 10:11:04 +00:00
Tamas Berghammer db264a6d09 Move several plugin to its own namespace
Affected paths:
* Plugins/Platform/Android/*
* Plugins/Platform/Linux/*
* Plugins/Platform/gdb-server/*
* Plugins/Process/Linux/*
* Plugins/Process/gdb-remote/*

Differential revision: http://reviews.llvm.org/D8654

llvm-svn: 233679
2015-03-31 09:52:22 +00:00
Tamas Berghammer 96d1779e23 Create new test for expression evaluation where char type matters
char is a special type in C++ which can be signed/unsigned and have to
be distinguished both from "signed char" and from "unsigned char". This
test check for this behaviour during the expression evaluation with
different compiler settings.

Differential revision: http://reviews.llvm.org/D8657

llvm-svn: 233678
2015-03-31 09:48:53 +00:00
Chaoren Lin 0a0e760ffb Fix TestSendSignal.py for remote.
Summary: There is an extra eStateConnected before eStateRunning with remote.

Reviewers: clayborg, ovyalov

Reviewed By: clayborg, ovyalov

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D8714

llvm-svn: 233670
2015-03-31 04:26:34 +00:00
Chaoren Lin 2d6105cc68 Fix call to llvm::Target::createMCInstPrinter.
llvm-svn: 233655
2015-03-31 00:59:13 +00:00
Vince Harron 33aea9001a Increate backlog of lldb-platform's listener socket
lldb-platform's listener socket only had a backlog of one connection.
That means that if more than one client connected simultaneously, the
connection would be refused. The test suite can be run remotely with
dozens of threads connecting simultaneously. Raised this limit to 100
to effectively eliminate lost connections.

Test Plan:
run tests against a remote target

Differential Revision: http://reviews.llvm.org/D8696

llvm-svn: 233652
2015-03-31 00:27:10 +00:00
Vince Harron f1e6999cec Fix socket leak in lldb-server platform
lldb-server server process was holding on to a connection to every
client that connected. This continued until the process hit it's
file limit and exited.

lldb-server p --listen *:5432 --server

run remote tests against that server more than 1000 times

Differential Revision: http://reviews.llvm.org/D8697

llvm-svn: 233651
2015-03-31 00:24:51 +00:00
Chaoren Lin 3ccfed9fd7 Fix .gitignore to ignore symlinks.
llvm-svn: 233645
2015-03-31 00:03:00 +00:00
Adrian McCarthy e704c4ffd9 Work around lack of %zd printf format specifier in MSVC libs.
llvm-svn: 233569
2015-03-30 17:46:36 +00:00
Robert Flack 13c7ad9cd2 Replace sys.platform skips in tests with @skip decorators which check against remote platform.
Adds @skipIfPlatform and @skipUnlessPlatform decorators which will skip if /
unless the target platform is in the provided platform list.

Test Plan:
ninja check-lldb shows no regressions.
When running cross platform, tests which cannot run on the target platform are
skipped.

Differential Revision: http://reviews.llvm.org/D8665

llvm-svn: 233547
2015-03-30 14:12:17 +00:00
Tamas Berghammer ab6216d050 Fix check in TestNoreturnUnwind
llvm-svn: 233546
2015-03-30 14:05:37 +00:00
Tamas Berghammer de7867938b Fix TestGdbRemote* on remote linux
Differential revision: http://reviews.llvm.org/D8454

llvm-svn: 233531
2015-03-30 10:52:32 +00:00
Sylvestre Ledru ebda55986a Bug 23051 - Fix build failure on Freebsd with gcc 4.9.
Patch by Craig Rodrigues

llvm-svn: 233478
2015-03-28 10:13:47 +00:00
Akira Hatanaka afbac28bb3 Fix call to MCInstPrinter::printInst to pass MCSubtargetInfo.
The interface of this function was changed in r233411.

llvm-svn: 233429
2015-03-27 21:45:58 +00:00
Sean Callanan e802387476 Added a testcase that verifies that LLDB can load
Clang modules out of the Mac OS X SDK and use their
types/functions.

<rdar://problem/18802064>

llvm-svn: 233421
2015-03-27 21:21:22 +00:00
Adrian McCarthy b016b3cfea Fix lld command on Windows for many tests.
llvm-svn: 233416
2015-03-27 20:47:35 +00:00
David Blaikie dab893cb99 Fix -Wsign-compare warning
llvm-svn: 233408
2015-03-27 20:19:14 +00:00
Ed Maste a59d4db4f7 Move debug register output into __amd64__ (FreeBSD)
This debug register diagnostic is really only applicable to amd64 at
present.

llvm-svn: 233403
2015-03-27 20:11:37 +00:00
Siva Chandra bfbc7b9c41 [TestMiExec] Fix the test for GCC after r233336.
Test Plan: dotest.py -C gcc p TestMiExec

Reviewers: vharron

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D8664

llvm-svn: 233382
2015-03-27 16:00:51 +00:00
Tamas Berghammer 492519c884 Specify LLDB_REGNUM_GENERIC_ARG* registers for arm64
llvm-svn: 233369
2015-03-27 10:29:25 +00:00
Ying Chen 464d1e1439 Allow ExpectedFailure* decorators to work with optional arguments
-if the decorator functions called with optional arguments, return decorator to orignal method

llvm-svn: 233338
2015-03-27 00:26:52 +00:00
Siva Chandra 462722d135 [DWARF] Generate qualified names of functions if linkage names are missing.
Summary:
This is similar to the change introduced for variable DIEs in r233098. If the
linkage names of functions are missing in the DWARF, then their fully qualified
names (similar to the name that would be got by demangling their linkage name)
is generated using the decl context.

This change fixes TestNamespace when the test case is compiled with GCC, hence
it is enabled for GCC. The test and the test case are also enhanced to cover
variadic functions.

Test Plan: dotest.py -C <clang|gcc> -p TestNamespace

Reviewers: clayborg

Reviewed By: clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D8623

llvm-svn: 233336
2015-03-27 00:10:04 +00:00
Robert Flack a5bcb2ed8a Add/fix FreeBSD/arm64 files in xcode build from r233273.
llvm-svn: 233317
2015-03-26 21:02:03 +00:00
Zachary Turner e6d213a84a Fix a race condition in Target::Launch
When no hijack listener is set up, the global event listener will
try to pull events off the queue, racing with the event thread.
By always forcing a hijack listener, even when one was not given,
we guarantee that the listener always gets all events.

This was causing problems in synchronous mode with the process
stop event sometimes never being picked up and causing the debugger
to hang while processing a .lldbinit file.

Reviewed by: Jim Ingham
Differential Revision: http://reviews.llvm.org/D8562

llvm-svn: 233315
2015-03-26 20:41:14 +00:00
Robert Flack efa49c2665 Change expectedFailureOS and skipIfPlatform checks to be based on target platform when running test suite remotely.
Most expected OS failures or skipped tests are about the target platform on
which the test binary is being run, not the host platform launching the tests.
This changes expectedFailureOS and skipIfPlatform to check against the remote
platform when running remote tests.

Test Plan:
Run ./do_sep.py test suite against a remote target on a different platform and
verify that tests which should be excluded on the remote platform are excluded.

Differential Revision: http://reviews.llvm.org/D8611

llvm-svn: 233311
2015-03-26 19:34:26 +00:00
Zachary Turner 072964dc0d Fix the remaining two test failures caused by re-ordering of teardown.
Previously we were using teardown hooks in these two instances to
shutdown processes.  TestBase already deletes all targets in its
own teardown, which will kill processes, so these steps weren't
necessary.

llvm-svn: 233308
2015-03-26 18:59:56 +00:00
Zachary Turner 9581204ceb Fix test failures caused by order of initialization.
tear down hooks run as part of Base.tearDown().  Some of these
hooks rely on accessing the debugger instance.  So although it
looks awkward, we need to call "del self.dbg" after calling
Base.tearDown().

llvm-svn: 233306
2015-03-26 18:54:21 +00:00
Stephane Sezer ca05ae2bff Add an assertion for frame[0] being valid in CommandObjectThread.cpp.
Summary:
This should always be true but sometimes is not, during platform bring
up. As recommended by Jim Ingham, an assertion should be enough here to
help.
This addresses post commit comments in http://reviews.llvm.org/D8554.

Test Plan: Run unit tests.

Reviewers: jasonmolenda, emaste, jingham, clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D8574

llvm-svn: 233298
2015-03-26 17:47:34 +00:00
Adrian McCarthy c7fd5ff745 Fixing typo in tutorial as test commit.
llvm-svn: 233287
2015-03-26 16:53:34 +00:00
Zachary Turner 65fe1eb5f8 Tear down tests in reverse order from setting them up.
Tests derive from TestBase, which derives from Base.  In the
test setUp() methods, we always call TestBase.setUp() first and
then call implementation-specific setup.  Tear down needs to do
the reverse.

This was causing over 20 failures on Windows, and was the culprit
behind about 80% of the files not being cleaned up after test run.
TestBase.tearDown() is responsible for deleting all targets created
during the test run and without this step, on Windows files will
be locked and cannot be deleted.  But TestBase.tearDown() was
calling Base.tearDown() before its own cleanup (i.e. deleting the
targets) and in some cases one of the teardown hooks would be to
call make clean.  So make clean would be run before the targets
had been deleted, and fail to remove the files, and subsequently
result in a failed test as well.

llvm-svn: 233284
2015-03-26 16:43:25 +00:00
Zachary Turner aa4dabfd85 Add a --all command option to "target delete".
llvm-svn: 233283
2015-03-26 16:43:13 +00:00