summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
Commit message (Collapse)AuthorAgeFilesLines
* Fixed TestObjCMethods2/i386 by separating out the portions that require ObjC V2.Sean Callanan2016-09-291-13/+17
| | | | llvm-svn: 282787
* This test will not work in i386 mode because we don't create interesting ↵Enrico Granata2016-09-291-0/+1
| | | | | | | | types from the ObjC runtime "Fixes" rdar://28501616 llvm-svn: 282774
* Fix an issue where libc++ changed the type information we get for ↵Enrico Granata2016-09-282-10/+10
| | | | | | | | std::map::iterator, rendering LLDB unable to display elements vended by an iterator Fixes <rdar://problem/28237521> llvm-svn: 282648
* Add the ability for the task port to change when a process execs.Greg Clayton2016-09-281-1/+0
| | | | | | <rdar://problem/28476369> llvm-svn: 282632
* use assertEquals in TestSBTypeClassMembersTodd Fiala2016-09-281-26/+33
| | | | | | | | This change replaces the self.assertTrue() calls with self.assertEquals() so that test failures get more context on failure values. llvm-svn: 282628
* convert TestFatArchives.py over to no-debug-info testTodd Fiala2016-09-271-11/+4
| | | | | | | | | | We only use the .o-style debug info here regardless, so having it run all three debuginfo styles was a waste. This also strips out the custom build function and uses the TestBase.build() method. llvm-svn: 282508
* xfail TestExec.py on macOSTodd Fiala2016-09-271-0/+1
| | | | | | | Tracked by: rdar://28476369 llvm-svn: 282496
* added Linux support for test timeout samplingTodd Fiala2016-09-262-16/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the Linux counterpart to the sampling support I added on the macOS side. This change also introduces zip-file compression if the size of the sample output is greater than 10 KB. The Linux side can be quite large and the textual content is averaging over a 10x compression factor on tests that I force to time out. When compression takes place, the filename becomes: {session_dir}/{TestFilename.py}-{pid}.sample.zip This support relies on the linux 'perf' tool. If it isn't present, the behavior is to ignore pre-kill processing of the timed out test process. Note calling the perf tool under the timeout command appears to nuke the profiled process. This was causing the timeout kill logic to fail due to the process having disappeared. I modified the kill logic to catch the case of the process not existing, and I have it ignore the kill request in that case. Any other exception is still raised. Reviewers: labath Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D24890 llvm-svn: 282436
* Added a setting that enables saving all .o files from a given JIT expression.Sean Callanan2016-09-263-0/+76
| | | | | | | | This allows debugging of the JIT and other analyses of the internals of the expression parser. I've also added a testcase that verifies that the setting works correctly when off and on. llvm-svn: 282434
* Fix serialization of Python breakpoint commands.Jim Ingham2016-09-262-3/+3
| | | | | | | | | | | CommandData breakpoint commands didn't know whether they were Python or Command line commands, so they couldn't serialize & deserialize themselves properly. Fix that. I also changed the "breakpoint list" command to note in the output when the commands are Python commands. Fortunately only one test was relying on this explicit bit of text output. llvm-svn: 282432
* Remove ancient icc decoratorsPavel Labath2016-09-264-12/+0
| | | | | | | Nobody is running the test suite with icc, so we have no idea if they pass. But the bug they link to has definitely been fixed. llvm-svn: 282408
* Remove an ancient XFAIL from TestBuiltinTrapPavel Labath2016-09-261-6/+0
| | | | | | | in refers to gcc-4.6. Hopefully noone is using that anymore, and I think there is a good chance it was fixed anyway. llvm-svn: 282406
* Allow for tests to be disabled at runtimeFrancis Ricci2016-09-234-1/+93
| | | | | | | | | | | | | | | | Summary: The current implementation of the test suite allows the user to run a certain subset of tests using '-p', but does not allow the inverse, where a user wants to run all but some number of known failing tests. Implement this functionality. Reviewers: labath, zturner, tfiala Subscribers: jingham, sas, lldb-commits Differential Revision: https://reviews.llvm.org/D24629 llvm-svn: 282298
* add hook for calling platform-dependent pre-kill action on a timed out testTodd Fiala2016-09-232-27/+142
| | | | | | | differential review: https://reviews.llvm.org/D24850 reviewers: clayborg, labath llvm-svn: 282258
* Add the ability to append breakpoints to the save file.Jim Ingham2016-09-221-3/+57
| | | | llvm-svn: 282212
* Add the ability to deserialize only breakpoints matching a given name.Jim Ingham2016-09-221-1/+34
| | | | | | Also tests for this and the ThreadSpec serialization. llvm-svn: 282207
* Fix parsing expressions to evaluate with spaces and optional args (MI)Ilia K2016-09-221-5/+14
| | | | | | | | | | | | | | | | | | | | | Summary: When extracting options for long options (starting with `--`), the use of `MIUtilString::SplitConsiderQuotes` to split all the arguments was being conditioned on the option type to be expected. This was wrong as this caused other options to be parsed incorrectly since it was not taking into account the presence of quotes. Patch by Ed Munoz <edmunoz@microsoft.com> Reviewers: edmunoz, ki.stfu Subscribers: ki.stfu, lldb-commits Projects: #lldb Differential Revision: https://reviews.llvm.org/D24202 llvm-svn: 282135
* add stop column highlighting supportTodd Fiala2016-09-214-14/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces optional marking of the column within a source line where a thread is stopped. This marking will show up when the source code for a thread stop is displayed, when the debug info knows the column information, and if the optional column marking is enabled. There are two separate methods for handling the marking of the stop column: * via ANSI terminal codes, which are added inline to the source line display. The default ANSI mark-up is to underline the column. * via a pure text-based caret that is added in the appropriate column in a newly-inserted blank line underneath the source line in question. There are some new options that control how this all works. * settings set stop-show-column This takes one of 4 values: * ansi-or-caret: use the ANSI terminal code mechanism if LLDB is running with color enabled; if not, use the caret-based, pure text method (see the "caret" mode below). * ansi: only use the ANSI terminal code mechanism to highlight the stop line. If LLDB is running with color disabled, no stop column marking will occur. * caret: only use the pure text caret method, which introduces a newly-inserted line underneath the current line, where the only character in the new line is a caret that highlights the stop column in question. * none: no stop column marking will be attempted. * settings set stop-show-column-ansi-prefix This is a text format that indicates the ANSI formatting code to insert into the stream immediately preceding the column where the stop column character will be marked up. It defaults to ${ansi.underline}; however, it can contain any valid LLDB format codes, e.g. ${ansi.fg.red}${ansi.bold}${ansi.underline} * settings set stop-show-column-ansi-suffix This is the text format that specifies the ANSI terminal codes to end the markup that was started with the prefix described above. It defaults to: ${ansi.normal}. This should be sufficient for the common cases. Significant leg-work was done by Adrian Prantl. (Thanks, Adrian!) differential review: https://reviews.llvm.org/D20835 reviewers: clayborg, jingham llvm-svn: 282105
* Probably should add the breakpoint names test directory as well...Jim Ingham2016-09-213-0/+200
| | | | llvm-svn: 282103
* Add some more tests for breakpoint serialization.Jim Ingham2016-09-201-45/+99
| | | | | | | | | | Serialize breakpoint names & the hardware_requested attributes. Also added a few missing affordances to SBBreakpoint whose absence writing the tests pointed out. <rdar://problem/12611863> llvm-svn: 282036
* add availability check to DarwinLog event testsTodd Fiala2016-09-161-0/+13
| | | | | | | | | | The pexpect-based tests properly checked for the stub reporting DarwinLog support. The event-based ones did not. This is fixed here. Swift CI bots are not currently building debugserver on macOS, so they don't have the DarwinLog support even when they pass the macOS 10.12 check. llvm-svn: 281696
* First tests for serializing breakpoints.Jim Ingham2016-09-163-0/+206
| | | | | | Plus a few bug fixes I found along the way. llvm-svn: 281690
* Fix TestSymbolContextTwoFiles on Android after rL281595Tamas Berghammer2016-09-151-1/+1
| | | | llvm-svn: 281601
* Add support for DW_AT_ranges_base attributeTamas Berghammer2016-09-154-19/+71
| | | | | | | | | | | | | It is a new attribute emitted by clang as a GNU extension and will be part of Dwarf5. The purpose of the attribute is to specify a compile unit level base value for all DW_AT_ranges to reduce the number of relocations have to be done by the linker. Fixes (at least partially): https://llvm.org/pr28826 Differential revision: https://reviews.llvm.org/D24514 llvm-svn: 281595
* Force c++14 when running tests on Windows.Zachary Turner2016-09-131-0/+1
| | | | | | | | | VS 2015 and higher begin making use of c++14 in their standard library headers. As such, -std=c++11 makes it so you can't compile trivial programs. Bump this to -std=c++14 when this situation is detected. llvm-svn: 281420
* TestQueues could error out because the one second sleep main.c wasJason Molenda2016-09-132-3/+6
| | | | | | | | using to enqueue all the jobs wasn't enough time on a slow/overloaded system. Instead use a global to indicate when all the work has been enqueued, let's see if this makes the CIs work more reliably. llvm-svn: 281418
* Reduce the number of simultaneous debug sessions to 10 and removeJason Molenda2016-09-132-2/+1
| | | | | | | | | | | | | the expectedFlakeyDarwin annotation. I've been running this test in isolation on my macOS Sierra system and haven't seen a failure in 20-30 runs. The number of simultaneous debug sessions that it spins up could be a problem when the testbots are running under load, so I'm reducing this from 20 simultaneous debug sessions to see if we can get enough stability to leave this enabled. llvm-svn: 281291
* xfail TestQueues.py and TestDarwinLogFilterMatchMessage.pyTodd Fiala2016-09-122-0/+9
| | | | | | | | | | | | | | It looks like the message-content-retrieval aspect of DarwinLog support is flaky, not just the regex match against it. Slightly less frequently than the regex matching, I am seeing the direct string-match variant of log-message-content matching also fail. Tracked by: llvm.org/pr30299 rdar://28237450 llvm-svn: 281251
* Add MiSyntaxTestCase.test_lldbmi_output_grammar test (MI)Ilia K2016-09-121-0/+101
| | | | | | | | | | | | Summary: This patch adds a new test and fixes extra new-line before exit Reviewers: abidh Subscribers: ki.stfu, dawn, lldb-commits, abidh Differential Revision: https://reviews.llvm.org/D9740 llvm-svn: 281199
* xfail DarwinLog "filter message by regex" testsTodd Fiala2016-09-091-0/+10
| | | | | | | | | | These tests are not working reliably. I'm marking them xfail until I resolve the issue. Tracked by: llvm.org/pr30299 llvm-svn: 281058
* [LLDB][MIPS] Fix TestEhFrameUnwind.py for MIPSNitesh Jain2016-09-091-3/+29
| | | | | | | | | | Reviewers: clayborg, labath Subscribers: jaydeep, bhushan, slthakur, lldb-commits Differential Revision: https://reviews.llvm.org/D24122 llvm-svn: 281031
* [LLDB][MIPS] Fix TestLldbGdbServer.py failureNitesh Jain2016-09-091-1/+3
| | | | | Subscribers: jaydeep, bhushan, slthakur, lldb-commits llvm-svn: 281026
* Fix for rL280668, Intel(R) Memory Protection Extensions (Intel(R) MPX) support.Valentina Giusti2016-09-087-4/+172
| | | | | | | | | | | | Summary: Signed-off-by: Valentina Giusti <valentina.giusti@intel.com> Reviewers: dvlahovski, granata.enrico, clayborg, labath Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D24255 llvm-svn: 280942
* Fix test breakage in r280919Pavel Labath2016-09-081-1/+5
| | | | | | | | | | | It turns out that self.dbg.GetSelectedPlatform().GetTriple() is not a good way to get the triple of the process, as it returns the incorrect triple in case of a 32-bit process running on a 64-bit platform. Instead, go the long way round and ask the stub for the process triple. This fixes the test for i386. llvm-svn: 280922
* gdb-remote: Add jModulesInfo packetPavel Labath2016-09-081-0/+39
| | | | | | | | | | | | | | | | | | | | | Summary: This adds the jModulesInfo packet, which is the equivalent of qModulesInfo, but it enables us to query multiple modules at once. This makes a significant speed improvement in case the application has many (over a hundred) modules, and the communication link has a non-negligible latency. This functionality is accessed by ProcessGdbRemote::PrefetchModuleSpecs(), which does the caching. GetModuleSpecs() is modified to first consult the cache before asking the remote stub. PrefetchModuleSpecs is currently only called from POSIX-DYLD dynamic loader plugin, after it reads the list of modules from the inferior memory, but other uses are possible. This decreases the attach time to an android application by about 40%. Reviewers: clayborg Subscribers: tberghammer, lldb-commits, danalbert Differential Revision: https://reviews.llvm.org/D24236 llvm-svn: 280919
* Revert "Fix tests on Windows."Zachary Turner2016-09-061-2/+2
| | | | | | | | This reverts commit 9b757b6e3946311802972409f38c6cefbea917b3. This seems to cause strange breakages about on Ubuntu. llvm-svn: 280763
* Fix tests on Windows.Zachary Turner2016-09-061-2/+2
| | | | | | | | | This wasn't actually a problem with the reformat, but rather a problem with Visual Studio 2015 Update 3, which uses some c++14 features in its standard libraries. So we had to change -std=c++11 to -std=c++14. llvm-svn: 280759
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-06635-13635/+23752
| | | | | | | | | | | | | | | | | | | | | | | *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
* Revert "Intel(R) Memory Protection Extensions (Intel(R) MPX) support."Dimitar Vlahovski2016-09-067-156/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit rL280668 because the register tests fail on i386 Linux. I investigated a little bit what causes the failure - there are missing registers when running 'register read -a'. This is the output I got at the bottom: """ ... Memory Protection Extensions: bnd0 = {0x0000000000000000 0x0000000000000000} bnd1 = {0x0000000000000000 0x0000000000000000} bnd2 = {0x0000000000000000 0x0000000000000000} bnd3 = {0x0000000000000000 0x0000000000000000} unknown: 2 registers were unavailable. """ Also looking at the packets exchanged between the client and server: """ ... history[308] tid=0x7338 < 19> send packet: $qRegisterInfo4a#d7 history[309] tid=0x7338 < 130> read packet: $name:bnd0;bitsize:128;offset:1032;encoding:vector;format:vector-uint64;set:Memory Protection Extensions;ehframe:101;dwarf:101;#48 history[310] tid=0x7338 < 19> send packet: $qRegisterInfo4b#d8 history[311] tid=0x7338 < 130> read packet: $name:bnd1;bitsize:128;offset:1048;encoding:vector;format:vector-uint64;set:Memory Protection Extensions;ehframe:102;dwarf:102;#52 history[312] tid=0x7338 < 19> send packet: $qRegisterInfo4c#d9 history[313] tid=0x7338 < 130> read packet: $name:bnd2;bitsize:128;offset:1064;encoding:vector;format:vector-uint64;set:Memory Protection Extensions;ehframe:103;dwarf:103;#53 history[314] tid=0x7338 < 19> send packet: $qRegisterInfo4d#da history[315] tid=0x7338 < 130> read packet: $name:bnd3;bitsize:128;offset:1080;encoding:vector;format:vector-uint64;set:Memory Protection Extensions;ehframe:104;dwarf:104;#54 history[316] tid=0x7338 < 19> send packet: $qRegisterInfo4e#db history[317] tid=0x7338 < 76> read packet: $name:bndcfgu;bitsize:64;offset:1096;encoding:vector;format:vector-uint8;#99 history[318] tid=0x7338 < 19> send packet: $qRegisterInfo4f#dc history[319] tid=0x7338 < 78> read packet: $name:bndstatus;bitsize:64;offset:1104;encoding:vector;format:vector-uint8;#8e ... """ The bndcfgu and bndstatus registers don't have the 'Memory Protections Extension' set. I looked at the code and it seems that that is set correctly. So I'm not sure what's the problem or where does it come from. Also there is a second failure related to something like this in the tests: """ registerSet.GetName().lower() """ For some reason the registerSet.GetName() returns None. llvm-svn: 280703
* Added the "frame diagnose" command and use its output to make crash info better.Sean Callanan2016-09-0627-0/+466
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When a process stops due to a crash, we get the crashing instruction and the crashing memory location (if there is one). From the user's perspective it is often unclear what the reason for the crash is in a symbolic sense. To address this, I have added new fuctionality to StackFrame to parse the disassembly and reconstruct the sequence of dereferneces and offsets that were applied to a known variable (or fuction retrn value) to obtain the invalid pointer. This makes use of enhancements in the disassembler, as well as new information provided by the DWARF expression infrastructure, and is exposed through a "frame diagnose" command. It is also used to provide symbolic information, when available, in the event of a crash. The algorithm is very rudimentary, and it needs a bunch of work, including - better parsing for assembly, preferably with help from LLVM - support for non-Apple platforms - cleanup of the algorithm core, preferably to make it all work in terms of Operands instead of register/offset pairs - improvement of the GetExpressioPath() logic to make prettier expression paths, and - better handling of vtables. I welcome all suggestios, improvements, and testcases. llvm-svn: 280692
* remove dependence of TestGdbRemoteExitCode.py on parent directory sourceTodd Fiala2016-09-053-4/+391
| | | | | | | | | | | | As Pavel pointed out in a comment on llvm.org/pr30271, the VPATH I was using here to eliminate duplication of a .cpp file had a side effect of attempting to pull in a .o/.obj file from that same parent dir, where other tests can be running in parallel. This is no good. For now, I have removed the VPATH, which should address llvm.org/pr30271. I have also removed the XFAIL. llvm-svn: 280675
* Intel(R) Memory Protection Extensions (Intel(R) MPX) support.Valentina Giusti2016-09-057-4/+156
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: The Intel(R) Memory Protection Extensions (Intel(R) MPX) associates pointers to bounds, against which the software can check memory references to prevent out of bound memory access. This patch allows accessing the MPX registers: * bnd0-3: 128-bit registers to hold the bound values, * bndcfgu, bndstatus: 64-bit configuration registers, This patch also adds read/write tests for the MPX registers in the register command tests and adds a new subdirectory for MPX specific tests. Signed-off-by: Valentina Giusti <valentina.giusti@intel.com> Reviewers: labath, granata.enrico, lldb-commits, clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D24187 llvm-svn: 280668
* Add default_packet_timeout key to the new TestGdbRemoteHostInfo testPavel Labath2016-09-051-1/+2
| | | | | | android targets use this key, so the test should recognize it. llvm-svn: 280652
* XFAIL TestGdbRemoteExitCode failing testsTodd Fiala2016-09-041-0/+2
| | | | | | | Tracked by: llvm.org/pr30271 llvm-svn: 280606
* [NFC] Darwin llgs support from Week of CodeTodd Fiala2016-09-047-96/+300
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code represents the Week of Code work I did on bringing up lldb-server LLGS support for Darwin. It does not include the Xcode project changes needed, as we don't want to throw that switch until more support is implemented (i.e. this change is inert, no build systems use it yet. I've verified on Ubuntu 16.04, macOS Xcode and macOS cmake builds). This change does some minimal refactoring of code that is shared with the Linux LLGS portion, moving it from NativeProcessLinux into NativeProcessProtocol. That code is also used by NativeProcessDarwin. Current state on Darwin: * Process launching is implemented. (Attach is not). Launching on devices has not yet been tested (FBS/BKS might need a bit of work). * Inferior waitpid monitoring and communication of exit status via MainLoop callback is implemented. * Memory read/write, breakpoints, thread register context, etc. are not yet implemented. This impacts process stop/resume, as the initial launch suspended immediately starts the process up and running because it doesn't know it is supposed to remain stopped. * I implemented the equivalent of MachThreadList as NativeThreadListDarwin, in anticipation that we might want to factor out common parts into NativeThreadList{Protocol} and share some code here. After writing it, though, the fallout from merging Mach Task/Process into a single concept plus some other minor changes makes the whole NativeThreadListDarwin concept nothing more than dead weight. I am likely going to get rid of this class and just manage it directly in NativeProcessDarwin, much like I did for NativeProcessLinux. * There is a stub-out call for starting a STDIO thread. That will go away and adopt the MainLoop pselect-based IOObject reading. I am developing the fully-integrated changes in the following repo, which contains the necessary Xcode bits and the glue that enables lldb-debugserver on a macOS system: https://github.com/tfiala/lldb/tree/llgs-darwin This change also breaks out a few of the lldb-server tests into their own directory, and adds some $qHostInfo tests (not sure why I didn't write those tests back when I initially implemented that on the Linux side). llvm-svn: 280604
* Reapply "Make Scalar::GetValue more consistent"Pavel Labath2016-09-021-1/+0
| | | | | | | | this is a resubmission of r280476. The problem with the original commit was that it was printing out all numbers as signed, which was wrong for unsigned numbers with the MSB set. Fix that and add a unit test covering that case. llvm-svn: 280480
* Revert "Make Scalar::GetValue more consistent"Pavel Labath2016-09-021-0/+1
| | | | | | | This reverts commit r280476 as it breaks several tests on i386. I was fixing an 32-bit breakage, and I did not run the 32-bit test suite before submitting, oops. llvm-svn: 280478
* Bump up TestCallWithTimeout timeoutPavel Labath2016-09-021-2/+2
| | | | | | Still a bit flaky on remote targets. Trying a larger bump this time. :/ llvm-svn: 280477
* Make Scalar::GetValue more consistentPavel Labath2016-09-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | Summary: It seems the original intention of the function was printing signed values in decimal format, and unsigned values in hex (without the leading "0x"). However, signed and unsigned long were exchanged, which lead to amusing test failures in TestMemoryFind.py. Instead of just switching the two, I think we should just print everything in decimal here, as the current behaviour is very confusing (especially when one does not request printing of types). Nothing seems to depend on this behaviour except and we already have a way for the user to request the format he wants when printing values for most commands (which presumably does not go through this function). I also add a unit tests for the function in question. Reviewers: clayborg, granata.enrico Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D24126 llvm-svn: 280476
* Change the formula for tagged NSIndexPath data formattingEnrico Granata2016-09-013-0/+110
| | | | | | Fixes rdar://25192935 llvm-svn: 280389
OpenPOWER on IntegriCloud