Commit Graph

11639 Commits

Author SHA1 Message Date
Chaoren Lin bcd2786a6d Use skipIf instead of skipUnless in TestTerminal for better readability.
llvm-svn: 239220
2015-06-06 14:51:34 +00:00
Chaoren Lin 5d76b1b56e Fix TestAttachDenied and TestChangeProcessGroup for remote Windows to Android.
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
2015-06-06 00:25:50 +00:00
Chaoren Lin 05763f5752 Update TestGdbRemoteAbort and TestGdbRemoteSegFault to use `get_signal_number`.
Reviewers: clayborg, ovyalov

Reviewed By: ovyalov

Subscribers: lldb-commits

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

llvm-svn: 239201
2015-06-06 00:19:01 +00:00
Pavel Labath 83a4b3f225 Remove unused editline includes
LLDB included editline in a couple of places, not respecting LLDB_DISABLE_LIBEDIT. As far as I can tell, these includes are not used, so I am removing them.

llvm-svn: 239199
2015-06-05 23:14:14 +00:00
Chaoren Lin 55c1c3495d Fix TestNamespace and TestThreadJump for remote Windows to Android.
Summary:
Update DYLDRendezvous and SOEntry to use FileSpecs instead of storing paths as
strings, which caused incorrect comparison results due to denormalization.

Reviewers: clayborg, vharron, ovyalov

Reviewed By: ovyalov

Subscribers: jwolfe, emaste, tberghammer, lldb-commits

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

llvm-svn: 239195
2015-06-05 22:03:19 +00:00
Chaoren Lin bb2cc9cf56 Unique file names for TestStarted and TestFinished.
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
2015-06-05 21:08:24 +00:00
Siva Chandra 77f20fc8d3 [TestGdbRemoteAbort] Skip on API 16 Android devices
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
2015-06-05 19:54:49 +00:00
Ed Maste db6fd1ac25 Removed unused private fields in RegisterContextLinux_mips
llvm-svn: 239181
2015-06-05 18:50:33 +00:00
Siva Chandra 29e0392944 [lldbtest] Use netloc instead of hostname to look up Android device ID.
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
2015-06-05 18:07:10 +00:00
Ed Maste f6a1312f1b Improve OSType initialization in elf object file's arch_spec
Setting the OSType in the ArchSpec triple is needed to correctly setup
up the register context plugin. ArchSpec::SetArchitecture, for Mach-O
only, sets the OSType. For ELF it was left to the ObjectFileELF to fill
in the missing OSType.

This change moves the ObjectFileELF logic into ArchSpec.

A new optional 'os' parameter has been added to SetArchitecture.
For ELF, this value is the from the ELF header.e_ident[EI_OSABI].
The default value is 0 or ELFOSABI_NONE.

The real work of determining the OSType was done by the ObjectFileELF
helper function GetOsFromOSABI. This logic has been moved
SetArchitecture.

GetOsFromOSABI has been commented as being deprectated.  It is left in
to support asserts.

For ELF the vendor value returned from SetArchitecture should be
UnknownVendor.  An unneeded resetting in ObjectFileELF has been removed
and replaced with an assert.

This fixes a problem reading a core file on FreeBSD/ARM because the spec
triple was arm-unknown-unknown.

Patch by Tom Rix.

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

llvm-svn: 239148
2015-06-05 13:03:08 +00:00
Chaoren Lin 52cf8ecc23 Check before using platform specific attributes.
Summary: `os.uname` in TestUniversal and `os.geteuid` in TestTerminal.

Reviewers: clayborg, zturner

Subscribers: lldb-commits

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

llvm-svn: 239135
2015-06-05 06:28:43 +00:00
Sagar Thakur 0abe018c91 [lldb-server][MIPS] Read/Write FP registers in FR0 mode
Adding support for read/write FP registers in FR0 mode of mips.

Reviewers: clayborg, tberghammer, jaydeep
Subscribers: emaste, nitesh.jain, bhushan, mohit.bhakkad, lldb-commits
Differential Revision: http://reviews.llvm.org/D10242

llvm-svn: 239132
2015-06-05 05:47:54 +00:00
Oleksiy Vyalov 6002a31bb8 Fix error handling in AdbClient - PushFile and PullFile.
http://reviews.llvm.org/D10176

llvm-svn: 239130
2015-06-05 01:32:45 +00:00
Chaoren Lin 0c5a9c1476 Delegate path operations to FileSpec.
Summary:
- Added PrependPathComponent utility functions to FileSpec.
- Delegate path operations in ParseCompileUnit to FileSpec.
- Delegate path operations in ParseSupportFiles to FileSpec.

Reviewers: clayborg, vharron, ovyalov

Reviewed By: ovyalov

Subscribers: lldb-commits

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

llvm-svn: 239127
2015-06-05 00:28:06 +00:00
Siva Chandra 8af9166efe [TestChangeProcessGroup] Mark the test as xfail for Android API 16
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
2015-06-05 00:22:49 +00:00
Siva Chandra d772ef3d9f [TestGdbRemoteRegisterState] Do not flip ARM *psr register in the test
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
2015-06-04 22:04:04 +00:00
Bruce Mitchener bc46ec7da7 Fix doxygen warnings.
Summary:
Building the doxygen target presented some warnings which are now
addressed by this patch.

Test Plan: Ran doxygen build target and these warnings were no longer present.

Subscribers: lldb-commits

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

llvm-svn: 239055
2015-06-04 16:53:46 +00:00
Jason Molenda 294af5ce9c Make the function that parses the json packets in debugserver
a little more resilient to freely formatted json.  Greg's change
in r238279 made the json output from StructuredData unconditionally
pretty-printed and the spaces were confusing debugserver.

llvm-svn: 239013
2015-06-04 06:03:03 +00:00
Andrew Wilkins 7175f16cdb [lldb] Enable building with Cmake/BUILD_SHARED_LIBS
Summary:
Several changes to fix CMake builds of LLDB with the
BUILD_SHARED_LIBS setting on.

- Force all internal libraries to be built STATIC.
- Add additional library dependencies (pthread, dl,
  runtimedyld).
- modify finalisation of SWIG wrapper to symlink the
  "lib" dir into python/site-packages, so _lldb.so's
  RPATH resolves.

Test Plan: Verified one test case with "dotest.py".

Reviewers: sylvestre.ledru, zturner

Reviewed By: zturner

Subscribers: zturner, ted, tberghammer, emaste, lldb-commits

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

llvm-svn: 239007
2015-06-04 03:12:37 +00:00
Enrico Granata 600aee6b69 I make no claims that Mach ports work, but at least we should check the right thing
llvm-svn: 238984
2015-06-03 22:35:55 +00:00
Ed Maste 8eeb3e290d Skip test failing on FreeBSD buildbot due to pexepect issues
The pexpect exception is not handled by expectedFailureFreeBSD, so just
skip the test for now.

llvm.org/pr22784

llvm-svn: 238977
2015-06-03 21:21:40 +00:00
Ed Maste dc8dd07e17 XFAIL TestPlatformCommand test failing on the FreeBSD buildbot
llvm.org/pr23747

llvm-svn: 238976
2015-06-03 21:21:00 +00:00
Enrico Granata d595733617 Fix a bug where trying to Dump() a ValueObject would use the static/non-synthetic version of the value even if the ValueObject one actually called Dump() on turned out to be dynamic and/or synthetic
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
2015-06-03 20:43:54 +00:00
Sagar Thakur ce815e4588 [MIPS][lldb-server] Add 32-bit register context and read/write FP registers on mips64
- Added support for read/write FP registers in FR1 mode.
    - Added 32 bit register context for mips32.

Reviewers: clayborg, tberghammer, jaydeep
Subscribers: emaste, nitesh.jain, bhushan, mohit.bhakkad, lldb-commits
Differential Revision: http://reviews.llvm.org/D10029

llvm-svn: 238914
2015-06-03 10:14:24 +00:00
Greg Clayton b2e0c11982 Fixed "format-string" based settings so they can have quotes on them without leaving the quotes in the format string:
(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
2015-06-03 02:02:48 +00:00
Greg Clayton 23d54f4eac Fixed a deadlock that was slowing down processes when they shut down. A 3 second delay could occur sometimes when a process exits, now that delay is gone.
llvm-svn: 238893
2015-06-03 00:34:01 +00:00
Greg Clayton 5a27195b1a Fix LLDB so that it can correctly track down dependent shared libraries that use @rpath.
<rdar://problem/8371885>

llvm-svn: 238886
2015-06-02 22:43:29 +00:00
Chaoren Lin e79b472162 Update TestConcurrentEvents to use UnixSignals instead of python signals.
Reviewers: clayborg, ovyalov

Reviewed By: ovyalov

Subscribers: lldb-commits

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

llvm-svn: 238872
2015-06-02 21:54:22 +00:00
Greg Clayton 5e3f20d791 Fixed the logic to determine the TRIPLE_VERSION correctly when it isn't specified.
llvm-svn: 238871
2015-06-02 21:42:31 +00:00
Greg Clayton 315b88d0cf Added the ability for the "make" command to take a triple:
% 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
2015-06-02 21:38:10 +00:00
Jim Ingham acbea8fb37 Fix up some comments to be more explicit. Remove some long-commented out code.
llvm-svn: 238862
2015-06-02 20:26:13 +00:00
Oleksiy Vyalov 17701b5929 Fix PlatformAndroid::PutFile to support relative destination paths.
llvm-svn: 238860
2015-06-02 19:29:48 +00:00
Chaoren Lin c168c92b78 Use wildcard instead of relying on shell globbing.
Reviewers: clayborg, zturner

Subscribers: lldb-commits

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

llvm-svn: 238859
2015-06-02 19:07:26 +00:00
Chaoren Lin 264e542083 Check that debugger is valid before enumerating targets.
Reviewers: sivachandra

Subscribers: lldb-commits

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

llvm-svn: 238857
2015-06-02 18:31:57 +00:00
Ed Maste e1abaf870f TestGlobalVariables no longer fails on FreeBSD
It has passed since ~ r223393.

llvm.org/21599

llvm-svn: 238856
2015-06-02 18:29:42 +00:00
Chaoren Lin 677acee503 Use new get_signal_number utility function for tests.
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
2015-06-02 17:01:13 +00:00
Chaoren Lin f59d050968 Added utility function to get correct signal number from remote platform.
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
2015-06-02 16:46:28 +00:00
Chaoren Lin 7d76a13bf3 Fix OBJCOPY and AR for Android.
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
2015-06-02 16:43:19 +00:00
Tamas Berghammer 0b11db50dd Mark TestHelloWorld as XTIMEOUT for Linux
It is times out on the build bot ~10% of the times

llvm-svn: 238836
2015-06-02 14:45:25 +00:00
Ed Maste c5603ec44c Skip TestChangeProcessGroup on FreeBSD for now
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
2015-06-02 14:11:25 +00:00
Pavel Labath 8e9c266a77 Un-enable TestEvents test on linux
Test still seems to fail about 1/10 runs. Skipping the test, but it a more greppable fashion.

llvm-svn: 238826
2015-06-02 12:50:25 +00:00
Mohit K. Bhakkad d37be6374b [LLDB][MIPS] MIPS64 Branch instruction emulation for SW single stepping
Patch by Jaydeep Patil

Reviewers: clayborg, jasonmolenda
Subscribers: bhushan, mohit.bhakkad, sagar, lldb-commits.
Differential Revision: http://reviews.llvm.org/D10155

llvm-svn: 238820
2015-06-02 11:22:29 +00:00
Aidan Dodds 7f7b61dc53 Change use of keyword 'or' to '||' as keyword not supported by visual studio 2013.
llvm-svn: 238819
2015-06-02 11:20:44 +00:00
Pavel Labath e0f9708410 Enable TestEvents test on linux
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
2015-06-02 10:19:33 +00:00
Greg Clayton 81e2b6bbe7 Fix a race condition where 2 threads might try to call Process::SetExitStatus() at the same time.
The problem was the mutex was only protecting the setting of m_exit_string and m_exit_string, but this function relies on the m_private_state being set to eStateExited in order to prevent more than 1 client setting the exit status. We want to only allow the first caller to succeed.

On MacOSX we have a thread that reaps the process we are debugging, and we also have a thread that monitors the debugserver process. When a process exists, the ProcessGDBRemote::AsyncThread() would set the exit status to the correct value and then another thread would reap the debugserver process and they would often both end up in Process::SetExitStatus() at the same time. With the mutex at the top we allow all variables to be set and the m_private_state to be set to eStateExited _before_ the other thread (debugserver reaped) can try to set th exist status to -1 and "lost connection to debugserver" being set as the exit status.

This was probably an issue for lldb-server as well and could very well cleanup some tests that might have been expecting a specific exit status from the process being debugged.

llvm-svn: 238794
2015-06-01 23:14:09 +00:00
Adrian McCarthy 3ae7492b2d Fix TestJoinAfterBreak test on Windows
llvm-svn: 238787
2015-06-01 21:51:50 +00:00
Chaoren Lin 273aea894f Dump error if dotest itself fails and no tests were run.
Reviewers: zturner, clayborg

Subscribers: lldb-commits

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

llvm-svn: 238771
2015-06-01 19:06:01 +00:00
Oleksiy Vyalov dd5313a5cc Don't close handle returned by _get_osfhandle.
http://reviews.llvm.org/D9931

llvm-svn: 238770
2015-06-01 18:52:16 +00:00
Colin Riley 4640cde19b Additional RenderScript debug features.
Base framework for inspecting RenderScript runtime details and helpers for various runtime actions on x86 and arm targets.

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

llvm-svn: 238768
2015-06-01 18:23:41 +00:00
Chaoren Lin b79863c2cc Fix TestPaths.
Reviewers: vharron, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits

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

llvm-svn: 238767
2015-06-01 18:04:10 +00:00