summaryrefslogtreecommitdiffstats
path: root/lldb/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Skip symlinks to the original file when searching for debug infoPavel Labath2015-02-251-1/+3
| | | | | | | | | | | | | | | | | | | | | | Summary: Symbols::LocateExecutableSymbolFile tries to locate the file in containing the debug info in a splitdebug configuration. It tries to skip over the original file in its search path, but it was easily fooled by symlinks. This changes the function to use llvm::sys::fs::equivalent, which can correctly compare symlinks. As a side effect, I had to fix one test because the address for the "abort" function resolves on my system to "__GI_abort" now. With the debug info, the libc on my system contains two symbols associated with the address of the abort function, and lldb prefers __GI_abort, possibly because the debug info is associated with it. It would be nice at some point to have it prefer the public symbol name. Reviewers: emaste, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7836 llvm-svn: 230476
* 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
* Fix CommandLineCompletionTestCase.test_watchpoint_xxx tests after r230408Ilia K2015-02-251-3/+13
| | | | llvm-svn: 230463
* When FileSpec::Resolve is given a bare file like "ls",Jason Molenda2015-02-251-0/+6
| | | | | | | | | | | and llvm::sys::fs::make_absolute prepends the current working directory to that path, leave the original bare file name unchanged if $cwd/ls doesn't exist. http://reviews.llvm.org/D7477 <rdar://problem/18775190> llvm-svn: 230451
* 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
* Disable file descriptor leak tests on python >=2.7.8Pavel Labath2015-02-231-3/+3
| | | | | | this version introduced an internal leak, which we cannot reasonably fix. llvm-svn: 230215
* Fix the test so it runs correctly when there are spaces in the path to the ↵Greg Clayton2015-02-211-1/+1
| | | | | | | | stdc++ library. <rdar://problem/19297312> llvm-svn: 230102
* Fix this test case so it runs correctly.Greg Clayton2015-02-211-3/+5
| | | | | | <rdar://problem/19286788> llvm-svn: 230101
* 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
* Rename the "glob arguments" feature to "shell expand arguments"Enrico Granata2015-02-208-3/+3
| | | | | | This should not bring any feature change, except changing names of things here and there llvm-svn: 230077
* 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
* Fixed TestProcessLaunch.py for remote targetsVince Harron2015-02-181-5/+12
| | | | | | Just needed to copy stdio redirect files to/from target llvm-svn: 229766
* Fixed remaining remote target failures in TestSettings.pyVince Harron2015-02-181-3/+5
| | | | | | | | needed to copy an output file back from remote target skipped test that expects host env vars to be inherited by target processes llvm-svn: 229764
* Fix SettingsCommandTestCase.test_set_error_output_pathVince Harron2015-02-181-2/+7
| | | | | | | | | | target.error-path (and output-path) were getting resolved on the local file system, which doesn't make any sense for remote targets So this patch prevents file paths from being resolved on the host system. llvm-svn: 229763
* Add decorator for failure setting prompt on FreeBSDEd Maste2015-02-181-0/+1
| | | | | | llvm.org/pr22611 llvm-svn: 229745
* 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 decorator for process launch w/ glob not working on FreeBSDEd Maste2015-02-181-0/+1
| | | | llvm-svn: 229738
* 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
* Add decorator for fd leak test failing on FreeBSDEd Maste2015-02-181-0/+3
| | | | | | | | | An fd leak comes from Python on FreeBSD FreeBSD ports PR: https://bugs.freebsd.org/197376 Python issue: https://bugs.python.org/issue23458 llvm-svn: 229704
* 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
* Fix TestAttachDenied.py remote execution on Linux.Oleksiy Vyalov2015-02-171-10/+16
| | | | | | http://reviews.llvm.org/D7659 llvm-svn: 229587
* Fix argdumper build in cmake (OS X) after r228636Ilia K2015-02-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previos version of this patch (see r229148) contained two errors: * make_symlink_darwin_debug passes 2 arguments into make_symlink, but it required 4 arguments (was fixed by r229159) * make_symlink doesn't work on OS X As a quick fix, the r229148 and the r229159 were reverted. Now these errors are fixed. Summary: This patch fixes the following tests on OS X: ``` FAIL: test_with_dsym (TestLaunchWithGlob.LaunchWithGlobTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/lldbtest.py", line 456, in wrapper return func(self, *args, **kwargs) File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/launch_with_glob/TestLaunchWithGlob.py", line 21, in test_with_dsym self.do_test () File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/launch_with_glob/TestLaunchWithGlob.py", line 42, in do_test self.runCmd("process launch -G true -w %s -- fi*.tx?" % (os.getcwd())) File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/lldbtest.py", line 1953, in runCmd msg if msg else CMD_MSG(cmd)) AssertionError: False is not True : Command 'process launch -G true -w /Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/launch_with_glob -- fi*.tx?' returns successfully Config=x86_64-clang ====================================================================== FAIL: test_with_dwarf (TestLaunchWithGlob.LaunchWithGlobTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/lldbtest.py", line 473, in wrapper return func(self, *args, **kwargs) File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/launch_with_glob/TestLaunchWithGlob.py", line 28, in test_with_dwarf self.do_test () File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/launch_with_glob/TestLaunchWithGlob.py", line 42, in do_test self.runCmd("process launch -G true -w %s -- fi*.tx?" % (os.getcwd())) File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/lldbtest.py", line 1953, in runCmd msg if msg else CMD_MSG(cmd)) AssertionError: False is not True : Command 'process launch -G true -w /Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/launch_with_glob -- fi*.tx?' returns successfully ``` Reviewers: epertoso, emaste, abidh, clayborg, zturner Reviewed By: clayborg Subscribers: abidh, lldb-commits, emaste, epertoso, zturner, clayborg Differential Revision: http://reviews.llvm.org/D7550 llvm-svn: 229517
* Revert "Revert "I had recently added a new SBFrame::GetVariables() overload ↵Zachary Turner2015-02-171-4/+0
| | | | | | | | | | | with yet another bool argument"" Reverting this commit led to other failures which I did not see at first. This turned out to be an easy problem to fix, so I added SBVariablesOptions.cpp to the CMakeLists.txt. In the future please try to make sure new files are added to CMake. llvm-svn: 229516
* Revert "I had recently added a new SBFrame::GetVariables() overload with yet ↵Zachary Turner2015-02-171-0/+4
| | | | | | | | | | | | | | another bool argument" This reverts commit r228975. It was causing link errors on the Windows bots, since last Thursday. http://lab.llvm.org:8011/builders/lldb-x86-win7-msvc/builds/725 Conflicts: lldb.xcodeproj/project.pbxproj llvm-svn: 229514
* Handle trailing spaces on "settings set" command more correctlyPavel Labath2015-02-161-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently we have some settings which treat "\ " on settings set commands specially. E.g., it is a valid way of specifying an argument of " " to a target. However, this fails if "\ " is the last argument as CommandObjectSettingsSet strips trailing whitespace. This resulted in a surprising argument of "\" to the target. This patch disables the training whitespace removal at a global level. Instead, for each argument type we locally determine whether whitespace stripping makes sense. Currently, I strip whitespace for all simple object type except of regex and format-string, with the rationale that these two object types do their own complex parsing and we want to interfere with them as least as possible. Specifically, stripping the whitespace of a regex "\ " will result in a (surprising?) error "trailing backslash". Furthermore, the default value of dissasembly-format setting already contains a trailing space and there is no way for the user to type this in manually if we strip whitespace. Reviewers: clayborg, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7592 llvm-svn: 229382
* Rename MiStackTestCase tests according to "test_lldbmi_<command_name>" formatIlia K2015-02-161-4/+4
| | | | llvm-svn: 229380
* Fix TestRegisters on remote target.Chaoren Lin2015-02-161-6/+1
| | | | | | | | | | | | | | | | | | Summary: Using spawnSubprocess instead of forkSubprocess, so that the subprocess spawns on the target and not the host. Requires http://reviews.llvm.org/D7660 for cleanup. Test Plan: TestRegisters.py passing. Reviewers: ovyalov, vharron, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7661 llvm-svn: 229357
* Change the default disassembly format again. First attempt atJason Molenda2015-02-132-3/+3
| | | | | | | | | | | | | | | | changing it was in r219544 - after living on that for a few months, I wanted to take another crack at this. The disassembly-format setting still exists and the old format can be user specified with a setting like ${current-pc-arrow}${addr-file-or-load}{ <${function.name-without-args}${function.concrete-only-addr-offset-no-padding}>}: This patch was discussed in http://reviews.llvm.org/D7578 <rdar://problem/19726421> llvm-svn: 229186
* Fix build: revert r229148 "Fix argdumper build in cmake (OS X) after ↵Ilia K2015-02-131-0/+1
| | | | | | r228636" and r229159 "Fix build: make_symlink_darwin_debug passes 2 arguments into make_symlink, but it requires 4 arguments" llvm-svn: 229166
* Fix argdumper build in cmake (OS X) after r228636Ilia K2015-02-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch fixes the following tests on OS X: ``` FAIL: test_with_dsym (TestLaunchWithGlob.LaunchWithGlobTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/lldbtest.py", line 456, in wrapper return func(self, *args, **kwargs) File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/launch_with_glob/TestLaunchWithGlob.py", line 21, in test_with_dsym self.do_test () File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/launch_with_glob/TestLaunchWithGlob.py", line 42, in do_test self.runCmd("process launch -G true -w %s -- fi*.tx?" % (os.getcwd())) File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/lldbtest.py", line 1953, in runCmd msg if msg else CMD_MSG(cmd)) AssertionError: False is not True : Command 'process launch -G true -w /Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/launch_with_glob -- fi*.tx?' returns successfully Config=x86_64-clang ====================================================================== FAIL: test_with_dwarf (TestLaunchWithGlob.LaunchWithGlobTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/lldbtest.py", line 473, in wrapper return func(self, *args, **kwargs) File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/launch_with_glob/TestLaunchWithGlob.py", line 28, in test_with_dwarf self.do_test () File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/launch_with_glob/TestLaunchWithGlob.py", line 42, in do_test self.runCmd("process launch -G true -w %s -- fi*.tx?" % (os.getcwd())) File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/lldbtest.py", line 1953, in runCmd msg if msg else CMD_MSG(cmd)) AssertionError: False is not True : Command 'process launch -G true -w /Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/launch_with_glob -- fi*.tx?' returns successfully ``` Reviewers: epertoso, emaste, abidh, clayborg, zturner Reviewed By: clayborg Subscribers: abidh, lldb-commits, emaste, epertoso, zturner, clayborg Differential Revision: http://reviews.llvm.org/D7550 llvm-svn: 229148
* Fix TestProcessIO.py when run against a remote targetVince Harron2015-02-131-15/+22
| | | | | | | | | | | | | Fixed test case to copy redirected stdout/stderr files from remote target to host llgs wasn't bothering to put the pty master file handle in the right place if stdout/stderr were redirected to a file. It is still needed for stdin. Corrected some log message text llvm-svn: 229141
* 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
* Fix -data-read-memory-bytes command (MI)Ilia K2015-02-133-13/+43
| | | | | | | | | | | | | | | | | | | | | | Summary: * Add IsHexadecimalNumber method to CMIUtilString (MI) * Add number format (dec,hex,auto) to CMICmdArgValNumber (MI) * Fix -data-read-memory-bytes to pass address in hex format (MI) * Fix output begin/end/offset fields format in -data-read-memory-bytes * Fix CMICmdArgValNumber::ExtractNumber to extract 64bit value * + tests All tests passed on OS X Reviewers: abidh, zturner, clayborg Reviewed By: clayborg Subscribers: lldb-commits, zturner, clayborg, abidh Differential Revision: http://reviews.llvm.org/D7610 llvm-svn: 229132
* Add -exec-arguments commandIlia K2015-02-132-7/+30
| | | | | | | | | | | | | | | | | Summary: This patch adds -exec-arguments command for lldb-mi. -exec-arguments command allows to specify arguments for executable file in MI mode. Also it contains tests for that command. Btw, new added files was formatted by clang-format. Reviewers: abidh, zturner, clayborg Reviewed By: clayborg Subscribers: zturner, emaste, clayborg, jingham, lldb-commits Differential Revision: http://reviews.llvm.org/D6965 llvm-svn: 229110
* Fix for http://llvm.org/bugs/show_bug.cgi?id=21744Hafiz Abid Qadeer2015-02-135-14/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | GetVariableInfo () collected the values of the variable in a list. But it also tried to generate the name/value pairs for children. This caused generation of a wrong value string for may items. This function has been fixed to put value in the list only. The handling of --print-value related option has been moved to caller. GetVariableInfo2 and MIResponseFormVariableInfo3 have been removed. They were almost the duplicate of functions of similar names. I dont see any difference in the output of -stack-list-locals and -stack-list-arguments. So these functions just seemed unnecessary. Char variable was being printed as a string which caused garbage output. This has been fixed. Some misc. cleanup. Test cases have been added that check -stack-list-locals for struct, array and pointers. Modified other tests which depended on hard coded line numbers. Reviewed in http://reviews.llvm.org/D7589 llvm-svn: 229102
* I had recently added a new SBFrame::GetVariables() overload with yet another ↵Enrico Granata2015-02-121-4/+0
| | | | | | | | | | bool argument We talked about it internally - and came to the conclusion that it's time to have an options class This commit adds an SBVariablesOptions class and goes through all the required dance llvm-svn: 228975
* Add an -A option to "break set -p" to search all files for matches. Also ↵Jim Ingham2015-02-121-0/+19
| | | | | | | | | | | add the version of SBTarget::BreakpointCreateBySourceRegex that takes file spec lists to the Python interface, and add a test for this. <rdar://problem/19805037> llvm-svn: 228938
* Fix the test on Linux.Hafiz Abid Qadeer2015-02-121-1/+1
| | | | | | | The exception name that is thrown in Linux is different. I have |ed it to the already existing one. llvm-svn: 228932
* Re-add makefiles of inline testsPavel Labath2015-02-123-0/+11
| | | | llvm-svn: 228925
OpenPOWER on IntegriCloud