When building the command-line for compilations during tests, append to
CFLAGS_EXTRAS and LD_EXTRAS to preserve switches set by the environment
(i.e. for cross compiling to test on another platform).
Test Plan:
TestCPP11EnumTypes.py passes testing from macosx -> linux remotely with cross
compiling args in CFLAGS_EXTRAS and LD_EXTRAS.
Differential Revision: http://reviews.llvm.org/D8942
llvm-svn: 235083
Summary:
If 'i' is an rvalue reference to an 'int', evaluating it with the
'expression' command will return an 'int' value and not an 'int &&'.
Before this patch, an 'int &&' type was expected.
Enabled the test for clang and gcc as all parts of the test now pass
when the testcase is compiled with them.
Test Plan: dotest.py -C <gcc|clang> -p TestRvalueReferences
Reviewers: spyffe, chaoren
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D9005
llvm-svn: 235036
Summary:
If the string is not formatted, these can happen when compiled with GCC:
1. If it is a null string "", then GCC completely removes the call to
printf even with -O0.
2. If the string is a single character string, say "\n" for example,
then GCC replaces the call to printf with a call to putchar.
3. If the string length is greater than 1, but is not formatted, then
GCC replaces the call to printf with a call to puts.
All the above will fail the test as we want a breakpoint on "printf" to
hit.
Test Plan: dotest.py -C gcc -p TestMiBreak
Reviewers: chying, ki.stfu
Reviewed By: ki.stfu
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D9025
llvm-svn: 235034
Summary:
This patch adds the comments which are included in LLDB disassembly, but are currently missing in MI, e.g.
^done,asm_insns=[...,{address="0x00000000004004ff",func-name="main",offset="18",size="2",inst="jmp 0x40050b ; <+30> at main.c:7"}]
instead of
^done,asm_insns=[...,{address="0x00000000004004ff",func-name="main",offset="18",size="2",inst="jmp 0x40050b"}]
Thanks, Ewan
Patch from ewan@codeplay.com
Reviewers: abidh, EwanCrawford
Subscribers: ted, lldb-commits, deepak2427
Differential Revision: http://reviews.llvm.org/D8964
llvm-svn: 235017
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
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
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
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
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
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
* 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
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
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
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
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
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
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
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