summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities
Commit message (Collapse)AuthorAgeFilesLines
* Fix Breakpoint::RemoveInvalidLocations to fix the exec testcase.Jim Ingham2018-01-121-3/+1
| | | | | | | | | | | | | | | | | RemoveInvalidLocations was clearing out the m_locations in the breakpoint by hand, and it wasn't also clearing the locations from the address->location map, which confused us when we went to update breakpoint locations. I also made Breakpoint::ModulesChanged check the Location's Section to make sure it hadn't been deleted. This shouldn't strictly be necessary, but if the DynamicLoaderPlugin doesn't do it's job right (I'm looking at you new Darwin DynamicLoader...) then it can end up leaving stale locations on rerun. It doesn't hurt to clean them up here as a backstop. <rdar://problem/36134350> llvm-svn: 322348
* Advanced guessing of rendezvous breakpoint (resubmit)Eugene Zemtsov2018-01-112-15/+14
| | | | | | | | | | | | | When rendezvous structure is not initialized we need to set up rendezvous breakpoint anyway. In this case the code will locate dynamic loader (interpreter) and look for known function names. This is r322209, but with fixed VDSO loading fixed. Bug: https://bugs.llvm.org/show_bug.cgi?id=25806 Differential Revision: https://reviews.llvm.org/D41533 llvm-svn: 322251
* Revert "Advanced guessing of rendezvous breakpoint"Eugene Zemtsov2018-01-102-14/+15
| | | | | | | This reverts commit r322209, because it broke TestNoreturnUnwind,TestInferiorAssert and TestNumThreads on i386. llvm-svn: 322229
* Advanced guessing of rendezvous breakpointEugene Zemtsov2018-01-102-15/+14
| | | | | | | | | | | When rendezvous structure is not initialized we need to set up rendezvous breakpoint anyway. In this case the code will locate dynamic loader (interpreter) and look for known function names. Bug: https://bugs.llvm.org/show_bug.cgi?id=25806 Differential Revision: https://reviews.llvm.org/D41533 llvm-svn: 322209
* Cut and paste error - I wasn't actually running both tests...Jim Ingham2018-01-091-1/+1
| | | | llvm-svn: 322054
* Change SBProcess::ReadCStringFromMemory() back to returningJason Molenda2017-12-221-1/+1
| | | | | | | | | an empty Python string object when it reads a 0-length string out of memory (and a successful SBError object). <rdar://problem/26186692> llvm-svn: 321338
* Temporarily XFAIL test/functionalities/exec while investiagting bot breakage.Adrian Prantl2017-12-191-0/+2
| | | | | | | | When building with cmake on green gragon or on ci.swift.org, this test fails. rdar://problem/36134350 llvm-svn: 321095
* These tests don't depend on debug info format.Jim Ingham2017-12-071-0/+2
| | | | | | Mark them as such. llvm-svn: 320077
* Add target.process.stop-on-exec setting, and obey it.Jim Ingham2017-12-051-12/+32
| | | | | | | | | | Also add a test. There should also be control for this in ProcessLaunchInfo and a "target launch" flag, but at least this will allow you to control it somehow. <rdar://problem/35842137> llvm-svn: 319731
* Makefile.rules: compile all tests with -fno-limit-debug-infoPavel Labath2017-12-0415-92/+0
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This flag is on by default for darwin and freebsd, but off for linux. Without it, clang will sometimes not emit debug info for types like std::string. Whether it does this, and which tests will fail because of that depends on the linux distro and c++ library version. A bunch of tests were already setting these flags manually, but here instead I take a whole sale approach and enable this flag for all tests. Any test which does not want to have this flag (right now we have one such test) can turn it off explicitly via CFLAGS_EXTRAS+=$(LIMIT_DEBUG_INFO_FLAGS) This fixes a bunch of data formatter tests on red-hat. Reviewers: davide, jankratochvil Subscribers: emaste, aprantl, krytarowski, JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D40717 llvm-svn: 319653
* Fix this test so that the breakpoints you set areJim Ingham2017-11-302-2/+6
| | | | | | | | unambiguously on one bit of code. On macOS these lines mapped to two distinct locations, and that was artificially throwing off the test. llvm-svn: 319472
* Add a test case for open bug 35480Pavel Labath2017-11-305-0/+82
| | | | | | | The test is about failing to hit breakpoints in global constructors in shared libraries. llvm-svn: 319443
* Fix floating point register write on new x86 linux kernelsPavel Labath2017-11-281-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: New linux kernels (on systems that support the XSAVES instruction) will not update the inferior registers unless the corresponding flag in the XSAVE header is set. Normally this flag will be set in our image of the XSAVE area (since we obtained it from the kernel), but if the inferior has never used the corresponding register set, the respective flag can be clear. This fixes the issue by making sure we explicitly set the flags corresponding to the registers we modify. I don't try to precisely match the flags to set on each write, as the rules could get quite complicated -- I use a simpler over-approximation instead. This was already caught by test_fp_register_write, but that was only because the code that ran before main() did not use some of the register sets. Since nothing in this test relies on being stopped in main(), I modify the test to stop at the entry point instead, so we can be sure the inferior did not have a chance to access these registers. Reviewers: clayborg, valentinagiusti Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D40434 llvm-svn: 319161
* Implement core dump debugging for PPC64lePavel Labath2017-11-163-0/+8
| | | | | | | | | | | | | | | Summary: Implement core dump debugging for PPC64le. Reviewers: labath Reviewed By: labath Subscribers: JDevlieghere, krytarowski, clayborg, labath, lbianc, nemanjai, gut, anajuliapc, mgorny, kbarton, lldb-commits Differential Revision: https://reviews.llvm.org/D39681 Patch by Alexandre Yukio Yamashita <alexandre.yamashita@eldorado.org.br> llvm-svn: 318399
* Add a data formatter for libc++ std::bitsetPavel Labath2017-11-143-0/+72
| | | | | | | | | | Reviewers: jingham, EricWF Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D39966 llvm-svn: 318145
* Xfail TestConcurrentTwoWatchpointsOneSignal on armPavel Labath2017-11-081-0/+1
| | | | | | | r317561 exposed an interesting bug (pr35228) in handling of simultaneous watchpoint hits. Disabling the test until we can get that fixed. llvm-svn: 317683
* "Fix" concurrent events test for armPavel Labath2017-11-0721-22/+2
| | | | | | | | | | | | | | | | | | | | | | | | Summary: The test incremented an atomic varible to trigger the watchpoint event. On arm64 this compiled to a ldaxr/stlxr loop, with the watchpoint being triggered in the middle of the loop. Hitting the watchpoint resets the exclusive monitor, and forces the process to loop one more time, hitting the watchpoint again, etc. While it would be nice if the debugger was able to resume from this situation, this is not trivial, and is not what this test is about. Therefore, I propose to change this to a simple store to a normal variable (which should still trip the watchpoint everywhere, but without atomic loops) and file a bug to investigate the possibilities of handling the watchpoints in atomic loops in a more reasonable way. Reviewers: clayborg Subscribers: aemerson, kristof.beyls, lldb-commits Differential Revision: https://reviews.llvm.org/D39680 llvm-svn: 317561
* Xfail test_stack_info_in_minidump testPavel Labath2017-11-031-0/+1
| | | | | | | The test has been failing since we enabled the i386 ABI plugin on windows. See pr35193 for details. llvm-svn: 317326
* Fix classifications on two concurrent event testsPavel Labath2017-11-032-1/+1
| | | | | | | I have classified one as a watchpoint test even though it wasn't and vice versa. Fix that. llvm-svn: 317319
* Remove getCategories mechanism of specifying test categoriesPavel Labath2017-11-027-15/+5
| | | | | | | | | | | | | | | | | | Summary: This mechanism was mostly redundant with the file-based .categories mechanism, and it was interfering with it, as any test which implemented a getCategories method would not inherit the filesystem categories. This patch removes it. The existing categories are preserved either by adding a .categories file, or using the @add_test_categories decorator. Reviewers: jingham, clayborg, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D39515 llvm-svn: 317277
* Remove android watchpoint xfailsPavel Labath2017-11-0216-55/+0
| | | | | | | | Now that the wathpoint tests have their own category, we can easily skip them on devices which don't have watchpoint support. Therefore, we don't need an android xfail on each of these tests. llvm-svn: 317276
* Add data formatter for libc++ std::queuePavel Labath2017-11-013-0/+60
| | | | | | | | | | | | | | Summary: std::queue is just a fancy wrapper around another container, so all we need to do is to delegate to the it. Reviewers: jingham, EricWF Subscribers: srhines, mgorny, lldb-commits, eugene Differential Revision: https://reviews.llvm.org/D35666 llvm-svn: 317099
* Add data formatter for libc++ std::tuplePavel Labath2017-11-013-0/+68
| | | | | | | | | | Reviewers: jingham, EricWF Subscribers: srhines, eugene, lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D35615 llvm-svn: 317095
* Add a "watchpoint" test category and annotate tests appropriatelyPavel Labath2017-10-3122-0/+22
| | | | | | | | | | | Most of the watchpoint tests are organized into subtrees, so we can use the file-based .categories approach to annotate them. The exception are the concurrent_events tests, which needed to be annotated on a per-test basis. The motivation behind this is to provide an easy way to disable watchpoint tests on systems where the watchpoint functionality is not present/unreliable. llvm-svn: 317004
* Add data formatter for libc++'s forward_listPavel Labath2017-10-313-0/+66
| | | | | | | | | | | | | | | Summary: This adds a data formatter for the implementation of forward_list in libc++. I've refactored the existing std::list data formatter a bit to enable more sharing of code (mainly the loop detection stuff). Reviewers: jingham, EricWF Subscribers: srhines, eugene, lldb-commits Differential Revision: https://reviews.llvm.org/D35556 llvm-svn: 316992
* Fix TestMinidump for r316673Pavel Labath2017-10-261-8/+8
| | | | | | | | | The test was asserting that we can only find one frame in the minidump. Now that we have the default unwind plan from the ABI plugin, we are able to find 5 more frames using the frame pointer chaining. Correct the expectation in the test. llvm-svn: 316688
* Implement interactive command interruptionLeonard Mosescu2017-10-052-1/+4
| | | | | | | | | | | | | | | | | | | The core of this change is the new CommandInterpreter::m_command_state, which models the state transitions for interactive commands, including an "interrupted" state transition. In general, command interruption requires cooperation from the code executing the command, which needs to poll for interruption requests through CommandInterpreter::WasInterrupted(). CommandInterpreter::PrintCommandOutput() implements an optionally interruptible printing of the command output, which for large outputs was likely the longest blocking part. (ex. target modules dump symtab on a complex binary could take 10+ minutes) Differential Revision: https://reviews.llvm.org/D37923 llvm-svn: 315037
* Move install_name_tool to a separate make target.Jason Molenda2017-10-021-1/+3
| | | | llvm-svn: 314731
* Fix Android remote debugging tests running on WindowsEugene Zemtsov2017-09-291-1/+4
| | | | | | Use make based OS check, instad of relying on shell. llvm-svn: 314488
* Add support for running the lldb testsuite against an apple watchJason Molenda2017-09-275-7/+8
| | | | | | | | running watchos. These tests cannot run on normal customer devices, but I hope to some day have a public facing bot running against a device. llvm-svn: 314355
* Remove the details of the libstdc++ implementation that wereJason Molenda2017-09-252-17/+1
| | | | | | | | | in TestDataFormatterSkipSummary.py - I'm building this test with the default c++ library. Skip TestMTCSimple.py when running for i386. llvm-svn: 314155
* Initial patchset to get the testsuite running against armv7 and arm64 iOS ↵Jason Molenda2017-09-2540-40/+134
| | | | | | | | | | | | | | | | | | | | | | | devices. Normal customer devices won't be able to run these tests, we're hoping to get a public facing bot set up at some point. Both devices pass the testsuite without any errors or failures. I have seen some instability with the armv7 test runs, I may submit additional patches to address this. arm64 looks good. I'll be watching the bots for the rest of today; if any problems are introduced by this patch I'll revert it - if anyone sees a problem with their bot that I don't see, please do the same. I know it's a rather large patch. One change I had to make specifically for iOS devices was that debugserver can't create files. There were several tests that launch the inferior process redirecting its output to a file, then they retrieve the file. They were not trying to test file redirection in these tests, so I rewrote those to write their output to a file directly. llvm-svn: 314132
* Revert "Initial patchset to get the testsuite running against armv7 and ↵Chris Bieneman2017-09-2530-123/+39
| | | | | | | | | | | | | arm64 iOS devices. Normal customer devices won't be able to run these devices, we're hoping to get a public facing bot set up at some point. Both devices pass the testsuite without any errors or failures." This patch has been causing LLDB test failures on ObjC tests. A test log may still be available here: http://lab.llvm.org:8080/green/view/LLDB/job/lldb/1650/ This reverts commit r314038. llvm-svn: 314122
* Initial patchset to get the testsuite running against armv7 and arm64 iOS ↵Jason Molenda2017-09-2230-39/+123
| | | | | | | | | | | | | | | | | | | | | | | devices. Normal customer devices won't be able to run these devices, we're hoping to get a public facing bot set up at some point. Both devices pass the testsuite without any errors or failures. I have seen some instability with the armv7 test runs, I may submit additional patches to address this. arm64 looks good. I'll be watching the bots for the rest of today; if any problems are introduced by this patch I'll revert it - if anyone sees a problem with their bot that I don't see, please do the same. I know it's a rather large patch. One change I had to make specifically for iOS devices was that debugserver can't create files. There were several tests that launch the inferior process redirecting its output to a file, then they retrieve the file. They were not trying to test file redirection in these tests, so I rewrote those to write their output to a file directly. llvm-svn: 314038
* Revert this patch; I was emailing with Eugene and they have some other ↵Jason Molenda2017-09-2130-123/+39
| | | | | | | | | changes going in today and don't want the two changes to confuse the situation with the build bots. I'll commit tomorrow once they're known good. llvm-svn: 313934
* Initial patchset to get the testsuite running against armv7 and arm64 iOS ↵Jason Molenda2017-09-2130-39/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | devices. Normal customer devices won't be able to run these devices, we're hoping to get a public facing bot set up at some point. There will be some smaller follow-on patches. The changes to tools/lldb-server are verbose and I'm not thrilled with having to skip all of these tests manually. There are a few places where I'm making the assumption that "armv7", "armv7k", "arm64" means it's an ios device, and I need to review & clean these up with an OS check as well. (Android will show up as "arm" and "aarch64" so by pure luck they shouldn't cause problems, but it's not an assumption I want to rely on). I'll be watching the bots for the rest of today; if any problems are introduced by this patch I'll revert it - if anyone sees a problem with their bot that I don't see, please do the same. I know it's a rather large patch. One change I had to make specifically for iOS devices was that debugserver can't create files. There were several tests that launch the inferior process redirecting its output to a file, then they retrieve the file. They were not trying to test file redirection in these tests, so I rewrote those to write their output to a file directly. llvm-svn: 313932
* Re-land r313210 - Fix for bug 34532 - A few rough corners related to ↵Adrian McCarthy2017-09-192-3/+66
| | | | | | | | | | | | | | | | | | | | | | | | post-mortem debugging (core/minidump) The main change is to avoid setting the process state as running when debugging core/minidumps (details in the bug). Also included a few small, related fixes around how the errors propagate in this case. Fixed the FreeBSD/Windows break: the intention was to keep Process::WillResume() and Process::DoResume() "in-sync", but this had the unfortunate consequence of breaking Process sub-classes which don't override WillResume(). The safer approach is to keep Process::WillResume() untouched and only override it in the minidump and core implementations. patch by lemo Bug: https://bugs.llvm.org/show_bug.cgi?id=34532 Differential Revision: https://reviews.llvm.org/D37651 llvm-svn: 313655
* Revert "Fix for bug 34532 - A few rough corners related to post-mortem ↵Adrian McCarthy2017-09-182-66/+3
| | | | | | | | | | debugging (core/minidump)" Broke Windows and FreeBSD (at least). This reverts commit 628ca7052b4a5dbace0f6205409113e12c8a78fa. llvm-svn: 313540
* Wire up the breakpoint name help string.Jim Ingham2017-09-151-5/+22
| | | | llvm-svn: 313327
* Make breakpoint names real entities.Jim Ingham2017-09-143-21/+230
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When introduced, breakpoint names were just tags that you could apply to breakpoints that would allow you to refer to a breakpoint when you couldn't capture the ID, or to refer to a collection of breakpoints. This change makes the names independent holders of breakpoint options that you can then apply to breakpoints when you add the name to the breakpoint. It adds the "breakpoint name configure" command to set up or reconfigure breakpoint names. There is also full support for then in the SB API, including a new SBBreakpointName class. The connection between the name and the breakpoints sharing the name remains live, so if you reconfigure the name, all the breakpoint options all change as well. This allows a quick way to share complex breakpoint behavior among a bunch of breakpoints, and a convenient way to iterate on the set. You can also create a name from a breakpoint, allowing a quick way to copy options from one breakpoint to another. I also added the ability to make hidden and delete/disable protected names. When applied to a breakpoint, you will only be able to list, delete or disable that breakpoint if you refer to it explicitly by ID. This feature will allow GUI's that need to use breakpoints for their own purposes to keep their breakpoints from getting accidentally disabled or deleted. <rdar://problem/22094452> llvm-svn: 313292
* Commands are -d to break modify, not -C.Jim Ingham2017-09-141-1/+1
| | | | | | | | The auto-continue test was using the new (better) name for providing commands (-C) but I haven't checked in that change yet. Put the test back to the old way for now. llvm-svn: 313221
* Forgot to svn add the test cases for breakpoint auto-continue flag.Jim Ingham2017-09-133-0/+129
| | | | | | Adding that now. llvm-svn: 313216
* Fix for bug 34532 - A few rough corners related to post-mortem debugging ↵Adrian McCarthy2017-09-132-3/+66
| | | | | | | | | | | | | | | | | | (core/minidump) The main change is to avoid setting the process state as running when debugging core/minidumps (details in the bug). Also included a few small, related fixes around how the errors propagate in this case. patch by lemo Bug: https://bugs.llvm.org/show_bug.cgi?id=34532 Differential Revision: https://reviews.llvm.org/D37651 llvm-svn: 313210
* Fix test_attach_to_process_from_different_dir_by_id test on WindowsEugene Zemtsov2017-09-131-3/+6
| | | | | | | On Windows a process can't delete its own current direcotry, that's why the test needs to return to the original direcotry before removing newdir. llvm-svn: 313113
* Add test case for attach-by-pid from different cwdEd Maste2017-09-031-0/+24
| | | | | | | | | This was failing on FreeBSD prior to r312430. Patch by Vignesh Balu. Differential Revision: https://reviews.llvm.org/D32522 llvm-svn: 312431
* test: fix missed testSaleem Abdulrasool2017-08-231-1/+1
| | | | | | | I had built without python bindings and did not find this in the grep output. Adjust the test output for the printing format update. llvm-svn: 311582
* Process: fix FXSAVE on x86Saleem Abdulrasool2017-08-231-1/+1
| | | | | | | | | The FXSAVE member `ftw` (FPU Tag Word) was given the wrong size (8-bit) instead of the correct width (16-bit) as per the x87 Programmer's Manual. Adjust this to ensure that we print out the complete value for the register. llvm-svn: 311579
* remove FreeBSD xfail decorator from TestExitDuringBreakEd Maste2017-08-101-3/+0
| | | | | | | | This test passes for me on FreeBSD 10 and 12(-CURRENT). llvm.org/pr18190 llvm-svn: 310624
* Report inferior signals as signals, not exceptions, on FreeBSDEd Maste2017-08-103-13/+4
| | | | | | | | | | | | | | | | | | | | | This is the FreeBSD equivalent of r238549. This serves 2 purposes: * LLDB should handle inferior process signals SIGSEGV/SIGILL/SIGBUS/ SIGFPE the way it is suppose to be handled. Prior to this fix these signals will neither create a coredump, nor exit from the debugger or work for signal handling scenario. * eInvalidCrashReason need not report "unknown crash reason" if we have a valid si_signo llvm.org/pr23699 Patch by Karnajit Wangkhem Differential Revision: https://reviews.llvm.org/D35223 llvm-svn: 310591
* Fix PlatformPythonTestCase.test_platform_list for the build botsVadim Macagon2017-08-091-6/+12
| | | | llvm-svn: 310488
OpenPOWER on IntegriCloud