Commit Graph

11076 Commits

Author SHA1 Message Date
Ilia K 3c886e6efc Fix the ConvenienceVariablesCase tests after r234993
llvm-svn: 235010
2015-04-15 14:11:52 +00:00
Ilia K 725abcb889 Bug 23051 - Fix zombie processes after lldb-server tests
Summary:
This patch fixes the following bug: https://llvm.org/bugs/show_bug.cgi?id=23181
For some reason some lldb-server tests should be kicked using SIGHUP and SIGINT before termination, otherwise it will leave a zombie process.
I think the reason is that the lldb-server will terminate a slave process if it gets the SIGHUP/SIGINT and if so it should be fixed in lldb-server.

The solution is to terminate process like it does the pexpect (including the delayafterterminate interval).

Also this patch reverts the following commits:
* r234549 - Skip lldb-server tests according to bug 23181
* r234765 - Skip a few tests on OS X according to the bug 23181
* r234803 - Skip the TestGdbRemoteRegisterState.test_grp_register_save_restore_works_no_suffix_debugserver_dsym test on OS X according to the bug 23181

Test Plan:
```
$ ps | grep Z | grep a.out | wc -l
447
$ ./dosep.py --options "-v --executable $INSTALLDIR/bin/lldb"
[...]
$ ps | grep Z | grep a.out | wc -l
447
```

Reviewers: jasonmolenda, clayborg, tberghammer

Reviewed By: clayborg

Subscribers: lldb-commits, dawn, tberghammer, clayborg, jasonmolenda

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

llvm-svn: 235008
2015-04-15 13:35:49 +00:00
Ilia K 7c1d91d816 Add teardown hook to shutdown an inferior process
Summary: Add teardown hook to shutdown an inferior process

Reviewers: jasonmolenda, clayborg, tberghammer

Reviewed By: clayborg, tberghammer

Subscribers: lldb-commits, tberghammer, clayborg, jasonmolenda

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

llvm-svn: 235005
2015-04-15 13:08:35 +00:00
Pavel Labath bacc5fb4b6 Skip TestMiVar test case to get build green
bug report at <https://llvm.org/bugs/show_bug.cgi?id=23239>.

llvm-svn: 235002
2015-04-15 12:39:18 +00:00
Vince Harron 43d79053d7 Fixed remote failures in TestCPP11EnumTypes, probably others
Typically, LLGS only sends stdout/stderr notifications when the inferior
process is running.

Because LLGS reads stdout from the process in a separate thread, sometimes
these stdout notifications can be received after the server has sent a thread
stop message. The host isn't expecting stdout to be generated by the target
after a stop message and these messages interfere with the host's request/
response paradigm.

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

llvm-svn: 234995
2015-04-15 10:40:51 +00:00
Vince Harron 0f2b1aba15 Skip reverse connect test when running remotely
This use case is not supported and may be removed in the future if not
needed

llvm-svn: 234994
2015-04-15 10:39:17 +00:00
Vince Harron e0d8dbe55f TestConvenienceVariables - fixed a Linux problem
Test was waiting for wrong string on Linux.
It is still marked as XFAIL because of an intermittent failure.

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

llvm-svn: 234993
2015-04-15 10:36:39 +00:00
Vince Harron 7343ab44ee Exception registers aren't supported outside of Darwin
Updated test to match

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

llvm-svn: 234992
2015-04-15 10:31:42 +00:00
Tamas Berghammer d8c338d42f Add single stepping logic for linux arm
Linux arm don't support hardware stepping (neither mismatch
breakpoints). This patch implement signle stepping with doing a software
emulation of the next instruction and then setting a temporary
breakpoint at the address where the thread will stop next.

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

llvm-svn: 234987
2015-04-15 09:47:02 +00:00
Tamas Berghammer 63c8be9571 Fix breakpoint trap opcode detection for arm linux
llvm-svn: 234986
2015-04-15 09:38:48 +00:00
Tamas Berghammer 23fc4b00a9 Fix test makefile after r234949.
On non OSX architectures we don't need a space between the arch flag
(-m) and the value.

llvm-svn: 234985
2015-04-15 09:28:31 +00:00
Greg Clayton 50bd5a2dc6 Change SymbolVendor::GetCompileUnitAtIndex() and SymbolVendor::Dump() to make sure they are thread safe.
<rdar://problem/20263111>

llvm-svn: 234951
2015-04-14 22:34:00 +00:00
Greg Clayton 931b107364 MacOSX needs a space between $(ARCHFLAG) and $(ARCH) otherwise we try to call clang with "-archx86_64" which doesn't work.
llvm-svn: 234949
2015-04-14 22:08:17 +00:00
Jason Molenda d2e46b19cb Remove unneeded include.
llvm-svn: 234945
2015-04-14 21:34:51 +00:00
Greg Clayton bef47e497f Fix printf warnings about a size mismatch on MacOSX.
llvm-svn: 234941
2015-04-14 20:58:08 +00:00
Greg Clayton 21667b64bc Remove unused functions that were causing warnings.
llvm-svn: 234940
2015-04-14 20:57:13 +00:00
Sean Callanan 26760a80fc Added some documentation for ForEachMacro.
llvm-svn: 234923
2015-04-14 18:50:05 +00:00
Sean Callanan b8bf6efa6e Added support to ClangUserExpression for importing
all the macros from the modules the user has loaded.
These macros are currently imported textually into
the expression's source code, which turns out not to
impose the horrific string processing overhead that
I thought it would, but I still plan to look into
performance improvements.

Also modified TestCModules to test that this works.

llvm-svn: 234922
2015-04-14 18:36:17 +00:00
Sean Callanan 507b588a34 Updated IRForTarget to change the way we generate
relocations.  We used to do GEP on a pointer to
the result type, which is wrong.  We should be doing
GEP on a pointer to char, which allows us to offset
correctly.

This fixes the C modules testcase, so it's no longer
ExpectFail.

llvm-svn: 234918
2015-04-14 18:17:35 +00:00
Ilia K bc929b80dc Fix handling of the executable arg which contains spaces (MI)
* Don't use the CMICmdArgValFile::GetFileNamePath for the CMIDriver::m_strCmdLineArgExecuteableFileNamePath
  because it wraps path with spaces into quotes what is already being done in CMIDriver::LocalDebugSessionStartupExecuteCommands
* Improve the MiSyntaxTestCase.test_lldbmi_specialchars test to catch this error
  ```
    $ bin/lldb-mi "~/p/ hello"
    (gdb)
    -file-exec-and-symbols "\"~/p/ hello\""
    ^error,msg="Command 'file-exec-and-symbols'. Target binary '\"~/p/ hello\"' is invalid. error: unable to find executable for '/"~/p/ hello/"'"
  ```

llvm-svn: 234888
2015-04-14 14:12:22 +00:00
Ilia K 5867a70057 Simplify some lldb-mi tests by using the Base.addTearDownHook()
llvm-svn: 234885
2015-04-14 13:48:49 +00:00
Oleksiy Vyalov f74503c5a6 Fix XCode build after r234870.
llvm-svn: 234877
2015-04-14 10:20:43 +00:00
Colin Riley ef20b08ff3 Additions to RenderScriptRuntime in prep for detection of RenderScript modules and moving of the command interpreter manipulation to after construction.
Differential Revision: http://reviews.llvm.org/D9001

llvm-svn: 234871
2015-04-14 07:39:24 +00:00
Omair Javaid 3f57216ca4 Adds Register Context Linux/POSIX for ARM Architecture
This patch is major step towards supporting lldb on ARM.
This adds all the required bits to support register manipulation on Linux Arm.
Also adds utility enumerations, definitions and register context classes for arm.

llvm-svn: 234870
2015-04-14 07:30:20 +00:00
Chaoren Lin 9cb8988b91 Remove gcc xfail for TestTargetWatchAddress.
llvm-svn: 234828
2015-04-14 00:51:57 +00:00
Chaoren Lin 239189ee6c Remove gcc xfail for TestWatchpointMultipleThreads.
llvm-svn: 234826
2015-04-14 00:40:41 +00:00
Siva Chandra ed62034df8 [TestPluginCommands] Add skipIfGcc at the right place.
Summary:
The decorator @expectedFailureGcc was at the wrong place skipping this
test all together. This patch removes it and adds skipIfGcc at the right
place.

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

Reviewers: chying, chaoren

Reviewed By: chaoren

Subscribers: lldb-commits

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

llvm-svn: 234821
2015-04-14 00:13:28 +00:00
Ilia K 653457831b Skip the TestGdbRemoteRegisterState.test_grp_register_save_restore_works_no_suffix_debugserver_dsym test on OS X according to the bug 23181
llvm-svn: 234803
2015-04-13 22:07:13 +00:00
Adrian McCarthy 54700b05c7 Skip libc++ data formmatting tests on Windows. libc++ hasn't been ported to windows yet.
llvm-svn: 234794
2015-04-13 20:33:05 +00:00
Greg Clayton 6292b30bab Be sure to complete base classes when importing them.
llvm-svn: 234771
2015-04-13 18:32:54 +00:00
Chaoren Lin f4a92bda49 Missing `-lpthread` causes gcc test failure.
Summary:
`-lpthread` was removed for `g++ -std=c++11` on Linux due to llvm.org/pr21553,
but the original issue doesn't seem to be reproducible anymore. Even if it were,
it had nothing to do with compiling inferiors.

Reviewers: sbest, sivachandra, chying

Subscribers: lldb-commits

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

llvm-svn: 234770
2015-04-13 18:21:31 +00:00
Ilia K 038363370f Skip a few tests on OS X according to the bug 23181
llvm-svn: 234765
2015-04-13 17:21:58 +00:00
Ilia K 2ecf23bc5d Fix CMICmnStreamStdout::WritePriv which causes a stack overflow (MI)
This includes:
* Remove IDS_STDOUT_ERR_NOT_ALL_DATA_WRITTEN enum value
* Remove IDS_STDOUT_ERR_NOT_ALL_DATA_WRITTEN mapped string in CMICmnResources::ms_pResourceId2TextData
* Fix a stack overflow which happens when fputs() fails:
  ```
    [...]
    frame #21153: 0x00000001045db6f0 lldb-mi`CMICmnStreamStderr::WritePriv(CMIUtilString const&, CMIUtilString const&, bool) + 416
    frame #21154: 0x00000001045db529 lldb-mi`CMICmnStreamStderr::Write(CMIUtilString const&, bool) + 265
    frame #21155: 0x00000001045c6a27 lldb-mi`CMICmnBase::SetErrorDescription(CMIUtilString const&) const + 215
    frame #21156: 0x00000001045db6f0 lldb-mi`CMICmnStreamStderr::WritePriv(CMIUtilString const&, CMIUtilString const&, bool) + 416
    frame #21157: 0x00000001045db529 lldb-mi`CMICmnStreamStderr::Write(CMIUtilString const&, bool) + 265
    frame #21158: 0x00000001045c6a27 lldb-mi`CMICmnBase::SetErrorDescription(CMIUtilString const&) const + 215
    frame #21159: 0x00000001045db6f0 lldb-mi`CMICmnStreamStderr::WritePriv(CMIUtilString const&, CMIUtilString const&, bool) + 416
    frame #21160: 0x00000001045db529 lldb-mi`CMICmnStreamStderr::Write(CMIUtilString const&, bool) + 265
    frame #21161: 0x00000001045c6a27 lldb-mi`CMICmnBase::SetErrorDescription(CMIUtilString const&) const + 215
    frame #21162: 0x00000001045db6f0 lldb-mi`CMICmnStreamStderr::WritePriv(CMIUtilString const&, CMIUtilString const&, bool) + 416
    frame #21163: 0x00000001045db529 lldb-mi`CMICmnStreamStderr::Write(CMIUtilString const&, bool) + 265
    frame #21164: 0x00000001045c6a27 lldb-mi`CMICmnBase::SetErrorDescription(CMIUtilString const&) const + 215
    frame #21165: 0x00000001045dc540 lldb-mi`CMICmnStreamStdout::WritePriv(CMIUtilString const&, CMIUtilString const&, bool) + 416
    frame #21166: 0x00000001045de5fb lldb-mi`CMIDriver::DoMainLoop() + 939
    frame #21167: 0x00000001045e2334 lldb-mi`CMIDriverMgr::DriverMainLoop() + 36
    frame #21168: 0x00000001045e1a39 lldb-mi`main + 217
    frame #21169: 0x00007fff90f395c9 libdyld.dylib`start + 1
  ```

llvm-svn: 234751
2015-04-13 14:40:16 +00:00
Colin Riley 189598ed4c fixing msvc build (format string z is not supported)
llvm-svn: 234708
2015-04-12 22:05:58 +00:00
Zachary Turner dd50f7421c Making linking against Python simpler on Windows.
This patch deprecates the three Python CMake variables in favor of
a single variable PYTHON_HOME which points to the root of a python
installation.  Since building Python doesn't output the files in
a structure that is compatible with the PYTHONHOME environment
variable, we also provide a script install_custom_python.py which
will copy the output of a custom python build to the correct
directory structure.

The supported workflow after this patch will be to build python
once for each configuration and architecture {Debug,Release} x {x86,x64}
and then run the script.  Then run CMake specifying -DPYTHON_HOME=<path>

The first time you do this will probably require you to delete your
CMake cache.

The old workflow is still supported during a transitionary period,
but a warning is printed at CMake time, and this will eventually
be removed.

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

llvm-svn: 234660
2015-04-10 22:58:56 +00:00
Greg Clayton eb72dc7d7d Allow the variable view to get synthetic values if they are available in "gui" mode.
llvm-svn: 234642
2015-04-10 21:34:10 +00:00
Greg Clayton bd5ae6b4de Cleanup virtual methods and mark them as "override" and remove "virtual".
Also fixed an issue with the GUI mode where tree items wouldn't be notified that they were selected. Now selecting a thread or stack frame in the Threads view will update all windows (source, variables, registers).

llvm-svn: 234640
2015-04-10 21:21:09 +00:00
Siva Chandra 18d1696d62 [TestFormatters, TestDataFormatterSynthVal] Mark as xfail.
Summary:
This is to get the bots to go green while a robust solution to fix these
tests is worked out.

Reviewers: chaoren, tberghammer, clayborg

Reviewed By: tberghammer, clayborg

Subscribers: lldb-commits

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

llvm-svn: 234625
2015-04-10 19:25:50 +00:00
Siva Chandra d7a2fc830f [TestAnonymous] Enable all tests for GCC
Summary:
Also added "_with_dsym" prefix to the dsym tests, and "_with_dwarf" to the dwarf tests.


Test Plan: dotest.py -C gcc -p TestAnonymous

Reviewers: chaoren

Reviewed By: chaoren

Subscribers: lldb-commits

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

llvm-svn: 234624
2015-04-10 19:24:48 +00:00
Oleksiy Vyalov cc81556831 Use llvm::sys::fs::create_directories to create new directory on Windows.
http://reviews.llvm.org/D8977

llvm-svn: 234610
2015-04-10 17:02:26 +00:00
Greg Clayton a625f7bcf4 Check in missing file.
llvm-svn: 234609
2015-04-10 16:48:37 +00:00
Adrian McCarthy 42b33806bf Add logging plugin for Windows
llvm-svn: 234607
2015-04-10 16:18:08 +00:00
Oleksiy Vyalov e17800c5ab Remove 'z' modifier from printf/sscanf operations in AdbClient - the modifier isn't supported by MS C++ compiler.
llvm-svn: 234562
2015-04-10 03:59:52 +00:00
Oleksiy Vyalov 4e1588c270 Wrap socket error handling with SetLastError and IsInterrupted internal functions which can properly treat Windows and POSIX errors.
http://reviews.llvm.org/D8939

llvm-svn: 234559
2015-04-10 02:31:37 +00:00
Enrico Granata bcbfa09f30 Fix a problem where 'process launch' was not correctly re-quoting arguments for the inferior process when handing them down for the actual launch
This covers most of rdar://20490076, but leaves one corner case still open - namely the case where we try to have arguments of the form foo\ bar (unquoted, but slashed) go through argdumper

llvm-svn: 234554
2015-04-10 01:55:57 +00:00
Ilia K bf105b2d2a Skip lldb-server tests according to bug 23181
llvm-svn: 234549
2015-04-10 00:04:59 +00:00
Enrico Granata 6070ea8125 Don't hardcode the name of the plugin - or it will get out of date, and this code will be broken
Thanks Greg!

llvm-svn: 234539
2015-04-09 21:52:19 +00:00
Enrico Granata 3ae82449e8 The dyld shared cache class table is not present in the iOS simulator, so do not actually warn to people when running under the simulator
rdar://20403987

llvm-svn: 234537
2015-04-09 21:33:57 +00:00
Chaoren Lin 589015b1e3 Fix printf format specifier to silence warning.
llvm-svn: 234531
2015-04-09 20:21:42 +00:00
Siva Chandra bba0eaae07 [ItaniumABILanguageRuntime] Remove an unneccesary 'typename' keyword.
Summary: This will get the windows bots going.

Test Plan: Build LLDB on Windows.

Reviewers: zturner

Subscribers: lldb-commits

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

llvm-svn: 234527
2015-04-09 19:51:56 +00:00