summaryrefslogtreecommitdiffstats
path: root/lldb/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Skip fdleak tests on androidTamas Berghammer2015-03-132-2/+20
| | | | | | | | | Android have more file descriptor opened by the shell what are inherited to the process (different ones on device and on emulator). Differential revision: http://reviews.llvm.org/D8299 llvm-svn: 232150
* 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
* Fix a bug in the data formatters where summary strings would not look into ↵Enrico Granata2015-03-121-2/+0
| | | | | | | | the non-synthetic value for child members if the ValueObject being formatted happened to have a synthetic value rdar://15630776 llvm-svn: 232114
* XFAIL TestAbbreviations on Linux, improve testVince Harron2015-03-121-1/+8
| | | | | | | | It was failing on gcc 4.8, only passing accidentally on clang 3.5 This patch improves the checking to make sure if fails in all cases and then XFAILS llvm-svn: 232092
* Test that software breakpoints aren't visible in disassemblyVince Harron2015-03-123-0/+93
| | | | | | | | | Linux lldb-server Handle_m doesn't properly replace software breakpoints with the original instructions. This test is added with expectedFailureLinux Differential Revision: http://reviews.llvm.org/D8191 llvm-svn: 232091
* Avoid a failing test case by fixing things so the compiler generates a line ↵Greg Clayton2015-03-121-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | table entry for line the very start of the printf() before any values have been loaded into registers. The issue was the previous code tried to stop on the following code in main.c: 21 // Stop here and set values 22 printf ("Val - %d Mine - %d, %d, %llu. Ptr - %d, %d, %llu\n", 23 val, 24 mine.first_val, mine.second_val, mine.third_val, 25 ptr->first_val, ptr->second_val, ptr->third_val); We we set a source regex breakpoint on "// Stop here and set values" we would set a breakpoint on line 22 as expected. The problem is the most recent clang compiler generates a line table like this 0x1000: main.c:23 // Loading of "val" into a register 0x1010: main.c:24 // Load mine.first_val, mine.second_val, mine.third_val values into registers or on the stack 0x1020: main.c:25 // Load ptr->first_val, ptr->second_val, ptr->third_val values into registers or on the stack 0x1030: main.c:22 // Call to printf In this test, we run to line 22, then we use python to modify the value of "val" and then continue to another breakpoint and try to read the STDOUT from the printf to verify the values changed correctly. With the above line table the value for "val" had already been loaded into a register so the string from printf would be incorrect. Doing an easy fix for now by changing the code to: 21 // Stop here and set values 22 printf ("Val - %d Mine - %d, %d, %llu. Ptr - %d, %d, %llu\n", val, 23 mine.first_val, mine.second_val, mine.third_val, 24 ptr->first_val, ptr->second_val, ptr->third_val); Now we get a line table entry for line 22 that is before any locals are read from the stack into registers. I need to follow up with the compiler guys and see if we can get a fix for this as anyone setting file + line breeakpoints might be very surprised to have code from lines below the current line already have had their code run. llvm-svn: 232068
* 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
* Limit the lenght of the file name of the log file for testsTamas Berghammer2015-03-121-2/+5
| | | | | | | | | | | If a test have very long name and the compiler specified with (a long) full path then the name of the log file name can exceed 255 characters. This change replace the full compiler path with just the compiler name if the prior would cause a too long file name. Differential revision: http://reviews.llvm.org/D8252 llvm-svn: 232024
* Fix ProcessIO test failuresPavel Labath2015-03-121-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: There was a race condition regarding the output of the inferior process. The reading of the output is performed on a separate thread, and there was no guarantee that the output will get eventually consumed. Because of that, it was happening that calling Process::GetSTDOUT was not returning anything even though the process was terminated and would definitely not produce any further output. This was usually happening only under very heavy system load, but it can be reproduced by placing an usleep in the stdio thread (Process::STDIOReadThreadBytesReceived). This patch addresses this by adding synchronization capabilities to the Communication thread. After calling Communication::SynchronizeWithReadThread one can be sure that all pending input has been processed by the read thread. This function is then called after every public event which stops the process to obtain the entire process output. Test Plan: TestProcessIO.py should now succeed every time instead of flaking in and out. Reviewers: clayborg, jingham Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8246 llvm-svn: 232023
* Add lldb-mi/lldb-server test folders to PATH before in dotest.pyIlia K2015-03-1216-71/+7
| | | | | | | | | | | | | | | | | 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
* Skip AsanTestCase and AsanTestReportDataCase on DarwinIlia K2015-03-123-8/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch skips tests which cause the following error: ``` 1: test_with_dsym (TestMemoryHistory.AsanTestCase) ... os command: make clean ; make MAKE_DSYM=YES ARCH=x86_64 CC="/Users/IliaK/p/llvm/build_ninja/bin/clang" with pid: 9475 stdout: rm -f "a.out" main.o main.d main.d.tmp rm -f -r "a.out.dSYM" /Users/IliaK/p/llvm/build_ninja/bin/clang -fsanitize=address -fsanitize-address-field-padding=1 -g -arch x86_64 -I/Users/IliaK/p/llvm/tools/lldb/test/make/../../include -c -o main.o main.c /Users/IliaK/p/llvm/build_ninja/bin/clang main.o -fsanitize=address -fsanitize-address-field-padding=1 -g -arch x86_64 -I/Users/IliaK/p/llvm/tools/lldb/test/make/../../include -o "a.out" stderr: clang: error: unknown argument: '-fsanitize-address-field-padding=1' clang: error: unsupported argument 'address' to option 'fsanitize=' ld: file not found: /Users/IliaK/p/llvm/build_ninja/bin/../lib/clang/3.7.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib clang-3.7: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [a.out] Error 1 retcode: 2 ERROR os command: make clean with pid: 9521 stdout: rm -f "a.out" main.o main.d main.d.tmp rm -f -r "a.out.dSYM" stderr: retcode: 0 Restore dir to: /Users/IliaK/p/llvm/tools/lldb ====================================================================== ERROR: test_with_dsym (TestMemoryHistory.AsanTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 612, in wrapper func(*args, **kwargs) File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 456, in wrapper return func(self, *args, **kwargs) File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/asan/TestMemoryHistory.py", line 24, in test_with_dsym self.buildDsym (None, compiler) File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 1496, in buildDsym if not module.buildDsym(self, architecture, compiler, dictionary, clean): File "/Users/IliaK/p/llvm/tools/lldb/test/plugins/builder_darwin.py", line 16, in buildDsym lldbtest.system(commands, sender=sender) File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 370, in system raise CalledProcessError(retcode, cmd) CalledProcessError: Command 'make clean ; make MAKE_DSYM=YES ARCH=x86_64 CC="/Users/IliaK/p/llvm/build_ninja/bin/clang" ' returned non-zero exit status 2 Config=x86_64-clang ---------------------------------------------------------------------- ``` Also this patch fixes findBuiltClang() by looking a clang in the build folder. BTW, another patch was made in October 2014, but it wasn't committed: http://reviews.llvm.org/D6272. Reviewers: abidh, zturner, emaste, jingham, jasonmolenda, granata.enrico, DougSnyder, clayborg Reviewed By: clayborg Subscribers: lldb-commits, DougSnyder, granata.enrico, jasonmolenda, jingham, emaste, zturner, abidh, clayborg Differential Revision: http://reviews.llvm.org/D7958 llvm-svn: 232016
* Refactor GdbRemote test cases to support remote platformsTamas Berghammer2015-03-117-118/+164
| | | | | | | | | | | 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
* Restore commented setTearDownCleanup in ↵Oleksiy Vyalov2015-03-101-1/+1
| | | | | | TestHelloWorld.test_with_dwarf_and_attach_to_process_with_id_api. llvm-svn: 231737
* Add Utility/ModuleCache class and integrate it with PlatformGDBRemoteServer ↵Oleksiy Vyalov2015-03-101-3/+1
| | | | | | | | - in order to allow modules caching from remote targets. http://reviews.llvm.org/D8037 llvm-svn: 231734
* Fix AttachDeniedTestCase on androidTamas Berghammer2015-03-091-1/+6
| | | | | | | Failure caused by a missing mkfifo command in the android OS. This fix replace mkfifo with "mknode p" command on android. llvm-svn: 231651
* 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
* Improve ValueObject::GetValueDidChange test; Add a comment for itIlia K2015-03-062-1/+16
| | | | | | | | | | | | | | Summary: This patch adds a few comments for GetValueDidChange and contains improvements for TestValueVarUpdate.py test which checks ValueObject::GetValueDidChange for complex types. Reviewers: zturner, granata.enrico, clayborg Reviewed By: clayborg Subscribers: jingham, lldb-commits, granata.enrico, zturner, clayborg Differential Revision: http://reviews.llvm.org/D8103 llvm-svn: 231526
* 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
* A few improvements to our vector types formatting story:Enrico Granata2015-03-062-6/+6
| | | | | | | | | - use a hardcoded formatter to match all vector types, and make it so that their element type is taken into account when doing default formatting - special case a vector of char to display byte values instead of characters by default Fixes the test failures Ilia was seeing llvm-svn: 231504
* Fix Radar10642615DataFormatterTestCase after r231449Ilia K2015-03-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: I'm not sure that this failure should be fixed by modifying this test. It seems strange for me that the only one type vUInt8 is printed with '0x' prefix. This patch fixes the following error: ``` ====================================================================== FAIL: test_with_dsym_and_run_command (Test-rdar-10642615.Radar10642615DataFormatterTestCase) Test data formatter commands. ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 456, in wrapper return func(self, *args, **kwargs) File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/data-formatter/rdar-10642615/Test-rdar-10642615.py", line 21, in test_with_dsym_and_run_command self.data_formatter_commands() File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/data-formatter/rdar-10642615/Test-rdar-10642615.py", line 68, in data_formatter_commands '(vBool32) valueBool32 = (0, 1, 0, 1)']) File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 2100, in expect msg if msg else EXP_MSG(str, exe)) AssertionError: False is not True : '(vUInt8) valueU8 = ('\x01', '\0', '\x04', '\0', '\0', '\x01', '\0', '\x04', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0')' returns expected result Config=x86_64-clang ====================================================================== FAIL: test_with_dwarf_and_run_command (Test-rdar-10642615.Radar10642615DataFormatterTestCase) Test data formatter commands. ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 473, in wrapper return func(self, *args, **kwargs) File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/data-formatter/rdar-10642615/Test-rdar-10642615.py", line 28, in test_with_dwarf_and_run_command self.data_formatter_commands() File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/data-formatter/rdar-10642615/Test-rdar-10642615.py", line 68, in data_formatter_commands '(vBool32) valueBool32 = (0, 1, 0, 1)']) File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 2100, in expect msg if msg else EXP_MSG(str, exe)) AssertionError: False is not True : '(vUInt8) valueU8 = ('\x01', '\0', '\x04', '\0', '\0', '\x01', '\0', '\x04', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0')' returns expected result Config=x86_64-clang ---------------------------------------------------------------------- ``` Reviewers: granata.enrico, zturner, clayborg Subscribers: clayborg, lldb-commits, zturner, granata.enrico Differential Revision: http://reviews.llvm.org/D8102 llvm-svn: 231490
* 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-0626-23/+23
| | | | | | | | 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
* Provide synthetic children for some vector typesEnrico Granata2015-03-063-0/+100
| | | | | | | | | | Unlike GDB, we tackle the problem of representing vector types in different styles by having a synthetic child provider that recognizes the format you're trying to apply to the variable, and coming up with the right type and number of child values to match that format This makes for a more compact representation and less visual noise Fixes rdar://5429347 llvm-svn: 231449
* XFAIL tests that are known to fail occasionally on LinuxVince Harron2015-03-058-0/+11
| | | | | | | | Trying to get the build green so we can notice new failures easier. Differential Revision: http://reviews.llvm.org/D8039 llvm-svn: 231407
* Fix expectation for TestPlatformCommand.test_shellTamas Berghammer2015-03-041-1/+4
| | | | | | | | | * Create expectation based on target platform * Add custom expectation for remote android target Differential revision: http://reviews.llvm.org/D8031 llvm-svn: 231232
* Accidental semicolon in python.Chaoren Lin2015-03-031-1/+1
| | | | llvm-svn: 231163
* Remove unnecessary platform specific code from TestGlobalVariables.Chaoren Lin2015-03-031-13/+1
| | | | llvm-svn: 231159
* [TestGlobalVariables] LD_LIBRARY_PATH should be process working directory.Chaoren Lin2015-03-031-2/+7
| | | | | | | | | | | | | | Summary: The inferior can load the library now, but the remote test is still failing because of a module loading problem in LLDB. Reviewers: ovyalov, sivachandra, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8038 llvm-svn: 231120
* Fix TestQuoting on remote targets.Chaoren Lin2015-03-031-0/+5
| | | | | | | | | | | | Summary: Needed to transfer stdout.txt to host before reading. Reviewers: ovyalov, clayborg Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D8023 llvm-svn: 231101
* 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
* Applying D7950 to four near copies of the file.Chaoren Lin2015-03-0210-171/+162
| | | | | | | | | | | | | | Summary: Using std::thread/random instead of pthread/rand. Two of them also suffered from the synchronization problem in D7916. Reviewers: clayborg, zturner, ki.stfu Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7991 llvm-svn: 230993
* [Windows] Fix getcwd() on Windows.Zachary Turner2015-03-021-0/+8
| | | | | | | | | | Windows doesn't define getcwd(), so this test executable failed to compile. Patch by Adrian McCarthy Differential Revision: http://reviews.llvm.org/D7962 llvm-svn: 230983
* Fix handling of backslashes in Args parsingPavel Labath2015-03-023-0/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Presently Args::SetCommandString allows quotes to be escaped with backslash. However, the backslash itself is not removed from the argument, nor there is a way to escape the backslash itself. This leads to surprising results: "a b" c" -> 'a b', 'c' # Here we actually have an unterminated quote, but that is ignored "a b\" c" -> 'a b\" c' # We try to escape the quote. That works but the backslash is not removed. "a b\\" c" -> 'a b\\" c' # Escaping the backslash has no effect. This change changes quote handling to be more shell-like: - single quotes and backquotes are literal and there is no way to escape the closing quote or anything else inside; - inside double quotes you can use backslash to escape the closing quote and another backslash - outside any quotes, you can use backslash to escape quotes, spaces and itself. This makes the parsing more consistent with what the user is familiar and increases the probability that pasting the command line from shell to the "process launch" command "just work". Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7855 llvm-svn: 230955
* Linux - debugging of local processes via lldb-gdbserverVince Harron2015-03-011-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of lldb calling the ptrace APIs directly, it launches an llgs instance and communicates with it via the remote debug protocol. This has two advantages. There is more code shared between the remote debugging code path and the local debugging code path. If a feature works in remote, it probably works locally and vice-versa. It makes us more architecturally similar to OSX (which also does local debugging via a connection to debugserver). This path is called LLGS local. We think that this configuration is now at parity with (or better than) local linux debugging. It is currently invoked if you have an environment variable defined "PLATFORM_LINUX_FORCE_LLGS_LOCAL" We would like to switch to LLGS local as the default path and only use the non-LLGS path if someone has an environment variable defined "PLATFORM_LINUX_DISABLE_LLGS_LOCAL" Later, if all goes well, we would like to remove non-LLGS local debugging support to simplify the codebase and avoid confusion. llvm-svn: 230919
* Temporarily XFAIL TestLaunchWithShellExpand to get the build greenVince Harron2015-02-281-0/+1
| | | | llvm-svn: 230832
* Use -fstandalone-debug for few tests to get around a Clang optimizationVince Harron2015-02-2811-0/+78
| | | | | | | | | | | | | | | | | | | clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD targets. Other targets do not, which causes several tests to fail. This flag enables FullDebugInfo for all targets. Fixes the following tests: TestCallStdStringFunction.py TestDataFormatterSkipSummary.py TestDataFormatterStdIterator.py TestDataFormatterStdList.py TestDataFormatterStdString.py TestSBValuePersist.py TestStringPrinter.py TestTypeCompletion.py llvm-svn: 230831
* Fixed pthread linking errors in test binariesVince Harron2015-02-284-0/+4
| | | | | | | | | | | Fixes these tests: TestBreakAfterJoin.py TestCreateDuringStep.py TestExitDuringBreak.py TestMultipleBreakpoints.py llvm-svn: 230828
* Convert TestWatchLocation to use C++11 library instead of pthread.Chaoren Lin2015-02-272-45/+45
| | | | | | | | | | Reviewers: clayborg, zturner, ki.stfu, abidh Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7950 llvm-svn: 230799
* Skip LaunchInTerminalTestCase test on remote systemsIlia K2015-02-271-2/+2
| | | | | | | | | | | | | | | | | | Summary: This ability was added by @jasonmolenda in [[ http://reviews.llvm.org/rL225748 | r225748 ]] but it was commented out because he hadn't test it. I tested it on OS X and now we can enable it legally. This change is made by @chying request. Reviewers: jasonmolenda, chying, clayborg Reviewed By: clayborg Subscribers: lldb-commits, chying, jasonmolenda, clayborg Differential Revision: http://reviews.llvm.org/D7930 llvm-svn: 230782
* Fixes http://reviews.llvm.org/rL230691Chaoren Lin2015-02-271-7/+4
| | | | | | | | | | | | Summary: OS X doesn't implement pthread barriers, using a simple atomic flag instead. Reviewers: ki.stfu Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7933 llvm-svn: 230739
* Add synchronization to TestWatchLocation.Chaoren Lin2015-02-261-0/+10
| | | | | | | | | | | | | | Summary: There was no guarantee that the three threads haven't already exited by the time the watchpoint is set. Reviewers: ovyalov Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7916 llvm-svn: 230691
* 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
* Remove use_pthread option from getBuildFlags in the test environmentTamas Berghammer2015-02-255-4/+6
| | | | | | | | | | | Removing the option to require the usage of pthread based on an argument of the getBuildFlags method in lldbtest.py because it can be specified by a variable in the makefile for the given test case. Using the variable in the makefile works in all supported platforms. Differential revision: http://reviews.llvm.org/D7861 llvm-svn: 230493
* Fix global makefiles for the tests to support androidTamas Berghammer2015-02-251-2/+9
| | | | | | | | | | | | Two changes are required to compile the tests for android * Disable the usage of -lpthread as it is included by default on android * Add -pie to the linker flags because android only support position independent executables Differential revision: http://reviews.llvm.org/D7856 llvm-svn: 230487
* Add option to set environment variables from dotest.pyTamas Berghammer2015-02-251-1/+10
| | | | | | | | | Setting environment variables are required when testing on a remote target requiring different flags then the ones specified on the host OS. Differential revision: http://reviews.llvm.org/D7854 llvm-svn: 230485
* Fix comment in test/tools/lldb-mi/main.cppIlia K2015-02-251-1/+1
| | | | llvm-svn: 230481
OpenPOWER on IntegriCloud