summaryrefslogtreecommitdiffstats
path: root/lldb/test/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* [TestMiExec] Fix the test for GCC after r233336.Siva Chandra2015-03-271-2/+2
| | | | | | | | | | | | Test Plan: dotest.py -C gcc p TestMiExec Reviewers: vharron Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8664 llvm-svn: 233382
* Fix AVX register detectionTamas Berghammer2015-03-251-3/+3
| | | | | | * Use target triple instead of host platform llvm-svn: 233194
* xfail tests that failed with clang-3.7, gcc4.8.2 and on i386 to get buildbot ↵Ying Chen2015-03-252-0/+4
| | | | | | | | | | | | | | | | | | green Summary: -Refer to bug https://buganizer.corp.google.com/issues/19893563 -Test log http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/1145 Test Plan: Run tests with different compiler and archs locally Reviewers: sivachandra, ovyalov, chaoren, vharron Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8573 llvm-svn: 233157
* Add -gdb-show and target-async option in -gdb-show command (MI)Ilia K2015-03-241-0/+121
| | | | | | | | | | | | | | | | | | | | | Summary: This path adds -gdb-show command with 1 option: target-async. Also it adds tests for -gdb-set and -gdb-show commands. All tests pass on OS X. Test Plan: ./dotest.py -v --executable $BUILDDIR/bin/lldb -f MiGdbSetShowTestCase Reviewers: clayborg, abidh Reviewed By: clayborg, abidh Subscribers: lldb-commits, clayborg, abidh Differential Revision: http://reviews.llvm.org/D8566 llvm-svn: 233114
* Add support for CLI commands in lldb-miIlia K2015-03-241-0/+211
| | | | | | | | | | | | | | | | | | | Summary: This patch adds support for CLI command in lldb-mi. It's useful ability which also was implemented in gdb. All tests pass on OS X. Test Plan: ./dotest.py -v --executable $BUILDDIR/bin/lldb tools/lldb-mi/interpreter/ Reviewers: ted, clayborg, abidh Reviewed By: clayborg, abidh Subscribers: jingham, lldb-commits, ted, clayborg, abidh Differential Revision: http://reviews.llvm.org/D8483 llvm-svn: 233112
* Skip SetSID test cases on remote platformTamas Berghammer2015-03-241-0/+6
| | | | | | | | | | On remote platform --setsid option is not used and currently it is also impossible to get the sid of an lldb-platform instance running on a remote target. Differential revision: http://reviews.llvm.org/D8317 llvm-svn: 233081
* Don't clobber CFLAGS_EXTRAS in tests.Robert Flack2015-03-242-2/+2
| | | | | | | | | | | | | | | | | To run tests against a different target platform many extra compiler flags are needed to specify sysroot, include dirs, etc. The environment variable CFLAGS_EXTRAS seems suited for this purpose except that several Makefiles clobber the current flags. This change modifies all of these to add to CFLAGS_EXTRAS instead. Test Plan: Verify no regressions in ninja check-lldb. Run tests using CFLAGS_EXTRAS to specify cross compilation flags for a different target running lldb-server platform. Differential Revision: http://reviews.llvm.org/D8559 llvm-svn: 233066
* Fix ninja check-lldbPavel Labath2015-03-201-1/+2
| | | | | | | | | | | | | Ninja apparently has issues with commands writing nul characters '\0' to stdout. When it encounters a nul character, the rest of the output is skipped (I will file a bug with ninja about that). This breaks the linux buildbot since it parses the ninja check-lldb output to get a list of failures. Recently, we have started outputting nul characters in lldb-server tests. This is probably a bug in itself, but I am not addressing that now. This is just a workaround commit, which prevents the nul characters from appearing in the output, and gets the buildbot operational again. llvm-svn: 232805
* expose 64 bit addresses through MIIlia K2015-03-191-1/+1
| | | | | | | | | | | | | | | | | Summary: This changes all reporting of addresses from lldb-mi to be 64 bit capable. There could have been cases where a 64 bit address was getting truncated to 32 bit format. Patch from chuckr@microsoft.com Reviewers: abidh, ChuckR Reviewed By: abidh Subscribers: paulmaybee, ki.stfu, zturner, lldb-commits Differential Revision: http://reviews.llvm.org/D8238 llvm-svn: 232736
* Fix -break-insert for system functions (MI)Ilia K2015-03-193-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: # Fix -break-insert for system functions # Fix MiExecTestCase to use -break-insert instead of CLI "b" # Improve MiBreakTestCase: now it uses printf() instead of in-house function All tests pass on OS X. Test Plan: ``` $ bin/lldb-mi --interpreter (gdb) -file-exec-and-symbols ~/p/hello ^done (gdb) =shlibs-added,shlib-info=[num="1",name="hello",dyld-addr="-",reason="dyld",path="/Users/IliaK/p/hello",loaded_addr="-",dsym-objpath="/Users/IliaK/p/hello.dSYM/Contents/Resources/DWARF/hello"] -break-insert -f printf ^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0xffffffff",func="??",file="??",fullname="??/??",line="0",pending=["printf"],times="0",original-location="printf"} (gdb) =breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0xffffffff",func="??",file="??",fullname="??/??",line="0",pending=["printf"],times="0",original-location="printf"} -exec-run ^running ... *stopped,reason="breakpoint-hit",disp="del",bkptno="1",frame={addr="0x7fff8a476910",func="printf",args=[],file="??",fullname="??",line="-1"},thread-id="1",stopped-threads="all" (gdb) ``` Reviewers: abidh, clayborg Reviewed By: clayborg Subscribers: lldb-commits, clayborg, abidh Differential Revision: http://reviews.llvm.org/D8412 llvm-svn: 232734
* XFAIL flaky testsVince Harron2015-03-172-0/+3
| | | | llvm-svn: 232441
* Enabling the lldb-mi tests on Linux.Hafiz Abid Qadeer2015-03-165-24/+0
| | | | | | | | | I think the issue that caused the random failure has been fixed. So I am enabling the tests again on Linux. There are still some tests that are skipped on Linux due to different output. Those will be handled separately. Tested with dotest.py and with "make check-lldb" and there was no MI related failure. llvm-svn: 232380
* Fix the test for gcc.Hafiz Abid Qadeer2015-03-161-9/+9
| | | | | | | | | | | | | Following 3 changes were made. 1. Test was assuming that function name will have () in the end. I dont know why lldb is generating function name like this but it looks like a bug. For this test, I have removed it. 2. Step instruction test was assuming that function call will not be the first instruction in the range of the line. This assumption failed with gcc. So I had fixed this. 3. Some minor adjustments with the line number. Test with bot gcc and clang and all tests pass. This test is still very fragile. We should be removing hardcoded line number. llvm-svn: 232372
* Skip additional lldb-mi tests that failed on FreeBSDEd Maste2015-03-142-0/+3
| | | | llvm-svn: 232243
* Forward adb port for reverse connect test casesTamas Berghammer2015-03-132-5/+12
| | | | | | | | | | | The test cases in TestStubReverseConnect are using a socket connection from python to lldb-server running on a remote target. To enable the socket connection an adb port forwarding have to be set up when the remote target is android. Differential revision: http://reviews.llvm.org/D8319 llvm-svn: 232170
* Don't require AVX registers if the target CPU doesn't have themVince Harron2015-03-131-8/+24
| | | | | | | | TestLldbGdbServer was failing because it always assumed AVX is available on x86_64 Linux. This patch checks the target before asserting that AVX registers are available. llvm-svn: 232137
* Add low-frame/high-frame options to -stack-list-arguments (MI)Ilia K2015-03-121-10/+37
| | | | | | | | | | | | | | | | | Summary: Add low-frame/high-frame options to -stack-list-arguments All tests pass on OS X. Reviewers: clayborg, abidh Reviewed By: abidh Subscribers: lldb-commits, clayborg, abidh Differential Revision: http://reviews.llvm.org/D8282 llvm-svn: 232048
* Add lldb-mi/lldb-server test folders to PATH before in dotest.pyIlia K2015-03-1215-70/+0
| | | | | | | | | | | | | | | | | Summary: This patch allows not specify search path in each lldb-mi test. It makes tests easier. This fix was requested by vharron. All test pass on OS X. Reviewers: vharron, clayborg Subscribers: lldb-commits, vharron Differential Revision: http://reviews.llvm.org/D8207 llvm-svn: 232019
* Refactor GdbRemote test cases to support remote platformsTamas Berghammer2015-03-116-105/+145
| | | | | | | | | | | Previously these test cases execute lldb-server on the host and run the tests against it even if a remote platform was specified. With this CL these tests always test the communication with an lldb-server instance running on the target. Differential revision: http://reviews.llvm.org/D8202 llvm-svn: 231922
* Move MiInterpreterExecTestCase to test/tools/lldb-mi/interpreter folder (MI)Ilia K2015-03-113-0/+26
| | | | llvm-svn: 231918
* Skip all lldb-mi tests on LinuxVince Harron2015-03-085-0/+26
| | | | | | | lldb-mi tests have been failing for a while on the buildbots. Disabling until someone has a chance to fix. llvm-svn: 231602
* Fix -var-create and -var-update (MI)Ilia K2015-03-062-0/+92
| | | | | | | | | | | | | | | | | | | | | Summary: This patch includes: * Fix -var-create command for global/static variables * Fix -var-update command: remove m_strValueName/m_eVarInfoFormat/m_bValueChanged{Array,Composite,Normal}Type; clean CMICmdCmdVarUpdate::Execute and CMICmdCmdVarUpdate::Acknowledge; improve CMICmdCmdVarUpdate::MIFormResponse; Complete the value after -var-create using the CMICmdCmdVarCreate::CompleteSBValue to get SBValue::GetValueDidChange work. * Add non-constant version of CMICmnLLDBDebugSessionInfoVarObj::GetValue * Add MiVarTestCase.test_lldbmi_var_update test All tests pass on OS X. Reviewers: abidh, emaste, clayborg Reviewed By: clayborg Subscribers: lldb-commits, emaste, clayborg, abidh Differential Revision: http://reviews.llvm.org/D8110 llvm-svn: 231525
* Fix MiSignalTestCase.test_lldbmi_stopped_when_stopatentry_remote test after ↵Ilia K2015-03-061-2/+1
| | | | | | r231479 llvm-svn: 231489
* Rename test/tools/lldb-gdbserver to test/tools/lldb-serverRobert Flack2015-03-0624-21/+21
| | | | | | | | As requested in http://reviews.llvm.org/D7545 this change moves test/tools/lldb-gdbserver to test/tools/lldb-server ot match the name of the target being tested. Differential Revision: http://reviews.llvm.org/D8061 llvm-svn: 231479
* Fix and enable some tests on Linux (MI)Ilia K2015-03-034-24/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Fix and enable some lldb-mi tests on Linux: Fixed: # MiExecInterpreterTestCase.test_lldbmi_thread_step_in # MiExecTestCase.test_lldbmi_exec_step # MiStackTestCase.test_lldbmi_stack_info_frame tests. Also I enabled the following tests on Linux: # MiExecTestCase.test_lldbmi_exec_step_instruction # MiSignalTestCase.test_lldbmi_stopped_when_interrupted All test pass on OS X and Linux. Reviewers: abidh, vharron, clayborg Reviewed By: clayborg Subscribers: vharron, lldb-commits, clayborg, abidh Differential Revision: http://reviews.llvm.org/D7987 llvm-svn: 231072
* Improve MiStackTestCase testsIlia K2015-03-031-2/+27
| | | | | | | | | | | | | | | | | Summary: Improve MiStackTestCase tests. All tests pass on OS X. Reviewers: clayborg, abidh Reviewed By: clayborg Subscribers: lldb-commits, clayborg, abidh Differential Revision: http://reviews.llvm.org/D8004 llvm-svn: 231071
* Allow to pass an executable file via lldb-mi arguments (MI)Ilia K2015-03-033-0/+155
| | | | | | | | | | | | | | | | | | | | Summary: # Allow to pass an executable file via lldb-mi arguments # Add tests # Fix (gdb) prompt in CMIDriver::LocalDebugSessionStartupExecuteCommands # Fix prompt in CMIDriver::InterpretCommandThisDriver: use the lldb-mi prompt instead of a hard-coded value. All tests pass on OS X. Reviewers: abidh, clayborg Reviewed By: clayborg Subscribers: lldb-commits, clayborg, abidh Differential Revision: http://reviews.llvm.org/D8001 llvm-svn: 231070
* Fix handling of double quotes (MI)Ilia K2015-02-262-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: * Clean CMICmdArgValString::Validate: now it's based on CMIUtilString::SplitConsiderQuotes method: A bit of introduction: # Command line is wrapped into CMICmdArgContext. # CMICmdArgSet is a set of arguments to be parsed. This class contains CMICmdArgContext as a private member. # MI command is class which is inhereted from CMICmdBase. It contains CMICmdArgSet as a private member. When command is executed CMICmdBase::ParseArgs() is called. This method adds args for parsing using CMICmdArgSet::Add(). Then CMICmdBase::ParseValidateCmdOptions() is called, which calls CMICmdArgSet::Validate(). Then it gets a number of arguments (using SplitConsiderQuotes().array_length) and for each arguments registered in ParseArgs() tries to validate it using CMICmdArgValBase::Validate(). Every user commands parses this string again (first time it was made in SplitConsiderQuotes) and in case of CMICmdArgValString it was made incorrectly. It searches the first and last quotes (but it should be first and next after first). Besides, it was splitted into 4 cases. I'm just using SplitConsiderQuotes directly, and I don't split them by hand again. Actually, I think we should do so in every CMICmdArgVal_XXX::Validate() method. * Enable MiInterpreterExecTestCase.test_lldbmi_target_create test * Fix MiExecTestCase.test_lldbmi_exec_arguments_set test All tests pass on OS X. Reviewers: abidh, emaste, zturner, clayborg Reviewed By: clayborg Subscribers: lldb-commits, zturner, emaste, clayborg, abidh Differential Revision: http://reviews.llvm.org/D7860 llvm-svn: 230654
* Fix process's output to stdout/stderr (MI)Ilia K2015-02-263-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: * Add CMIUtilString::Escape/Unescape methods (MI) * Fix process's output to stdout/stderr (MI): lldb-mi escapes process's output to show it in the following format: ``` ~"..." ``` But previously not all characters were escaped by CMICmnLLDBDebuggerHandleEvents::ConvertPrintfCtrlCodeToString and output of ``` printf("'\n` - it's \\n\x12\"\\\"") ``` looked like: ``` ~"'\r\n` - it's \n"\"" ``` This patch fixes it by using CMIUtilString::Escape method and now it looks like: ``` ~"'\r\n` - it's \\n\x12\"\\\"" ``` Reviewers: abidh, emaste, clayborg Reviewed By: clayborg Subscribers: zturner, lldb-commits, emaste, clayborg, abidh Differential Revision: http://reviews.llvm.org/D7858 llvm-svn: 230652
* Fix comment in test/tools/lldb-mi/main.cppIlia K2015-02-251-1/+1
| | | | llvm-svn: 230481
* Add extra acceptable characters to CMICmdArgValFile (MI)Ilia K2015-02-251-1/+0
| | | | | | | | | | | | | | | | | | | | | | Summary: Improve CMICmdArgValFile::IsValidChars to accept extra characters that can be in file name: ``` .'\"`@#$%^&*()_+-={}[]| ``` Enable MiSyntaxTestCase.test_lldbmi_specialchars test. All test pass on OS X. Reviewers: abidh, emaste, zturner, clayborg Reviewed By: clayborg Subscribers: lldb-commits, zturner, emaste, clayborg, abidh Differential Revision: http://reviews.llvm.org/D7859 llvm-svn: 230468
* Fix MiSignalTestCase.xxx_remote tests after r230466Ilia K2015-02-251-6/+2
| | | | llvm-svn: 230467
* Fix ImportError in lldb-mi tests on LinuxIlia K2015-02-257-0/+28
| | | | | | | | | | | | | | | | | | | | Summary: This patch fixes the following error: ``` File "/home/llvmbb/llvm-build-dir/lldb-x86_64-clang-ubuntu-14.04/llvm/tools/lldb/test/tools/lldb-mi/signal/TestMiSignal.py", line 5, in <module> import lldbmi_testcase ImportError: No module named lldbmi_testcase ``` Reviewers: vharron, abidh, clayborg Reviewed By: abidh, clayborg Subscribers: lldb-commits, vharron, clayborg, abidh Differential Revision: http://reviews.llvm.org/D7857 llvm-svn: 230466
* Add comment in MiSignalTestCase.test_lldbmi_stopped_when_stopatentry_local ↵Ilia K2015-02-241-1/+4
| | | | | | back and revert expecting string. llvm-svn: 230351
* Adjust an lldb-mi test to fix failure on Linux.Hafiz Abid Qadeer2015-02-241-1/+1
| | | | llvm-svn: 230347
* Add -exec-abort command (MI); Don't exit on eStateExitedIlia K2015-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add -exec-abort command + test. Also, I had fixed an error, when lldb-mi exits on eStateExited. With current patch we can re-run target: ``` -file-exec-and-symbols hello ^done -exec-run ^running *stopped,reason="breakpoint-hit"... -exec-abort ^done *stopped,reason="exited-normally"... <- program exits -exec-run <- run again ^running *stopped,reason="breakpoint-hit"... ``` All tests pass on OS X. Reviewers: zturner, emaste, abidh, clayborg Reviewed By: abidh, clayborg Subscribers: lldb-commits, emaste, zturner, clayborg, abidh Differential Revision: http://reviews.llvm.org/D7794 llvm-svn: 230321
* Fix MiSignalTestCase.test_lldbmi_stopped_when_stopatentry_xxx tests after ↵Ilia K2015-02-241-6/+3
| | | | | | r230237 llvm-svn: 230320
* Fix a problem where lldb-mi would not stop the debuggee after ↵Hafiz Abid Qadeer2015-02-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | -exec-interrupt command. Summary: This revision fixes a problem where lldb-mi would not stop the execution after exec-interrupt call. On Linux, SIGSTOP is used to stop the debuggee process. LLDB stopped the debuggee alright. But when lldb-mi received the notification of stopping with reason as SIGSTOP, it would resume the process. This was heppening in CMICmnLLDBDebuggerHandleEvents::HandleProcessEventStopSignal. This function aslo used hard coded numbers for signal istead of symbolic names. This revision changes code to treat SIGSTOP reason as SIGINT. Also used symbolic names for signals instead of numbers. Reviewers: ki.stfu, clayborg Reviewed By: ki.stfu, clayborg Subscribers: zturner, lldb-commits Differential Revision: http://reviews.llvm.org/D7783 llvm-svn: 230237
* Fix TestStubSetSID after unification in to a single lldb-server binary.Siva Chandra2015-02-201-2/+7
| | | | | | | | | | | | | | | | | | | Summary: lldb-server needs an explicit 'g' or 'p' argument now. Since lldb-server is started as a gdbserver in this test, 'g' should be passed to it explicitly. Test Plan: ./dotest.py -p TestStubSetSID Reviewers: flackr, ovyalov Reviewed By: ovyalov Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7801 llvm-svn: 230082
* Forgot to remove initialization of MiTestCaseBase.mydir in r230022Ilia K2015-02-201-1/+1
| | | | llvm-svn: 230025
* Refactor lldb-mi testsIlia K2015-02-2036-543/+664
| | | | | | | | | | | | | | | | | | | Summary: This patch includes following changes: * split lldb-mi tests into separate folders. It will make our life simpler because we can modify a test program of certain test and don't worry about other tests * a bit refactoring * fix comments * improve some tests Reviewers: emaste, clayborg, abidh Reviewed By: clayborg, abidh Subscribers: clayborg, lldb-commits, emaste, abidh Differential Revision: http://reviews.llvm.org/D7762 llvm-svn: 230022
* Add -symbol-list-lines command (MI)Ilia K2015-02-202-1/+61
| | | | | | | | | | | | | | | | | Summary: Add -symbol-list-lines command + test. All test passed on OS X. Reviewers: emaste, abidh, clayborg Reviewed By: clayborg Subscribers: lldb-commits, clayborg, abidh, emaste Differential Revision: http://reviews.llvm.org/D7768 llvm-svn: 230008
* Add -stack-select-frame command (MI)Ilia K2015-02-191-0/+56
| | | | | | | | | | | | | | | | | Summary: Add -stack-select-frame command + test. All tests pass on OS X. Reviewers: abidh, emaste, clayborg Reviewed By: clayborg Subscribers: lldb-commits, emaste, clayborg, abidh Differential Revision: http://reviews.llvm.org/D7765 llvm-svn: 229901
* Add -stack-info-frame command (MI)Ilia K2015-02-191-0/+28
| | | | | | | | | | | | | | | | | Summary: Add -stack-info-frame command + test. All tests pass on OS X. Reviewers: emaste, clayborg, abidh Reviewed By: abidh Subscribers: lldb-commits, clayborg, emaste, abidh Differential Revision: http://reviews.llvm.org/D7750 llvm-svn: 229857
* Add decorators for failing lldb-mi testsEd Maste2015-02-189-0/+58
| | | | | | | | | | | | Tests fail intermittently on FreeBSD and Linux, apparently due to threading race conditions in lldb-mi. See comments in http://reviews.llvm.org/D7529 and http://reviews.llvm.org/D7727 for more information. llvm.org/pr22411 llvm-svn: 229741
* Add decorators for failing lldb-mi testsEd Maste2015-02-184-0/+14
| | | | | | | | | | | | Tests fail intermittently on FreeBSD and Linux, apparently due to threading race conditions in lldb-mi. See comments in http://reviews.llvm.org/D7529 and http://reviews.llvm.org/D7727 for more information. llvm.org/pr22411 llvm-svn: 229737
* Merge lldb-platform and lldb-gdbserver into a single binaryTamas Berghammer2015-02-182-2/+2
| | | | | | | | | | | | | This commit merges lldb-platform and lldb-gdbserver into a single binary of the same size as each of the previous individual binaries. Execution mode is controlled by the first argument being either platform or gdbserver. Patch from: flackr <flackr@google.com> Differential revision: http://reviews.llvm.org/D7545 llvm-svn: 229683
* Rename MiStackTestCase tests according to "test_lldbmi_<command_name>" formatIlia K2015-02-161-4/+4
| | | | llvm-svn: 229380
* Add test that checks (gdb) prompt in case of unknown command (MI)Ilia K2015-02-131-0/+5
| | | | llvm-svn: 229139
* Fix test_lldbmi_prompt test by enabling ShowPrompt in CMICmnStreamStdin by ↵Ilia K2015-02-131-1/+0
| | | | | | default llvm-svn: 229137
OpenPOWER on IntegriCloud