When the module path for `command script import` is invalid, echo the path.We were just emitting "invalid module" w/o saying which module. That'snot particularly helpful.Differential Revision:
When the module path for `command script import` is invalid, echo the path.We were just emitting "invalid module" w/o saying which module. That'snot particularly helpful.Differential Revision: https://reviews.llvm.org/D129338
show more ...
Fix TestCommandScript.py for Arm/WindowsTestCommandScript.py fails on Arm/Windows due following issues:https://llvm.org/pr56288https://llvm.org/pr56292LLDB fails to skip prologue and also step
Fix TestCommandScript.py for Arm/WindowsTestCommandScript.py fails on Arm/Windows due following issues:https://llvm.org/pr56288https://llvm.org/pr56292LLDB fails to skip prologue and also step over library function ornodebug functions fails due to PDB/DWARF mismatch.This patch replace function breakpoint with line breakpoint so that wecan expect LLDB to stop on desired line. Also replace dwarf with PDBdebug info for this test only.
[lldb][tests] Automatically call compute_mydir (NFC)Eliminate boilerplate of having each test manually assign to `mydir` by calling`compute_mydir` in lldbtest.py.Differential Revision: https://r
[lldb][tests] Automatically call compute_mydir (NFC)Eliminate boilerplate of having each test manually assign to `mydir` by calling`compute_mydir` in lldbtest.py.Differential Revision: https://reviews.llvm.org/D128077
[lldb/python] Fix dangling Event and CommandReturnObject referencesUnlike the rest of our SB objects, SBEvent and SBCommandReturnObjecthave the ability to hold non-owning pointers to their non-SB
[lldb/python] Fix dangling Event and CommandReturnObject referencesUnlike the rest of our SB objects, SBEvent and SBCommandReturnObjecthave the ability to hold non-owning pointers to their non-SBcounterparts. This makes it hard to ensure the SB objects do not becomedangling once their backing object goes away.While we could make these two objects behave like others, that wouldrequire plubming even more shared pointers through our internal code(Event objects are mostly prepared for it, CommandReturnObject are not).Doing so seems unnecessarily disruptive, given that (unlike for some ofthe other objects) I don't see any good reason why would someone want tohold onto these objects after the function terminates.For that reason, this patch implements a different approach -- the SBobjects will still hold non-owning pointers, but they will be reset tothe empty/default state as soon as the function terminates. This pythoncode will not crash if the user decides to store these objects -- butthe objects themselves will be useless/empty.Differential Revision: https://reviews.llvm.org/D116162
[lldb/python] Fix (some) dangling pointers in our glue codeThis starts to fix the other half of the lifetime problems in this code-- dangling references. SB objects created on the stack will go aw
[lldb/python] Fix (some) dangling pointers in our glue codeThis starts to fix the other half of the lifetime problems in this code-- dangling references. SB objects created on the stack will go awaywhen the function returns, which is a problem if the python code theywere meant for stashes a reference to them somewhere. Most of the timethis goes by unnoticed, as the code rarely has a reason to store these,but in case it does, we shouldn't respond by crashing.This patch fixes the management for a couple of SB objects (Debugger,Frame, Thread). The SB objects are now created on the heap, andtheir ownership is immediately passed on to SWIG, which will ensure theyare destroyed when the last python reference goes away. I will handlethe other objects in separate patches.I include one test which demonstrates the lifetime issue for SBDebugger.Strictly speaking, one should create a test case for each of theseobjects and each of the contexts they are being used. That would requirefiguring out how to persist (and later access) each of these objects.Some of those may involve a lot of hoop-jumping (we can run python codefrom within a frame-format string). I don't think that isnecessary/worth it since the new wrapper functions make it very hard toget this wrong.Differential Revision: https://reviews.llvm.org/D115925
Add a "command container" hierarchy to allow users to add container nodes.The point is to allow users with a related set of script based commandsto organize their commands in a hierarchy in the co
Add a "command container" hierarchy to allow users to add container nodes.The point is to allow users with a related set of script based commandsto organize their commands in a hierarchy in the command set, rather thanhaving to have only top-level commands.Differential Revision: https://reviews.llvm.org/D110298
[lldb] Remove support for replaying the test suite from a reproducerThis patch removes the infrastructure to replay the test suite from areproducer, as well as the modifications made to the indivi
[lldb] Remove support for replaying the test suite from a reproducerThis patch removes the infrastructure to replay the test suite from areproducer, as well as the modifications made to the individual tests.
[lldb/Reproducers] Differentiate active and passive replay unexpected packet.
[lldb/Test] Add skipIfReproducer for tests that diverge during replayAdd the skipIfReproducer decorator to the remaining tests that fail toreplay because the GDB remote packets diverge during repl
[lldb/Test] Add skipIfReproducer for tests that diverge during replayAdd the skipIfReproducer decorator to the remaining tests that fail toreplay because the GDB remote packets diverge during replay. This is*not* expected and should be fixed, but figuring out exactly what causedthe divergence has proven pretty difficult to track down.I've marked these tests as skipped for now so we can get clean resultsand detect new regressions. I have no evidence to believe that thesefailures have the same root cause, so I've not assigned them a PR.
[lldb] Remove license headers from all test source filesSummary:Around a third of our test sources have LLVM license headers. This patch removes those headers from all testsources and also fixes
[lldb] Remove license headers from all test source filesSummary:Around a third of our test sources have LLVM license headers. This patch removes those headers from all testsources and also fixes any tests that depended on the length of the license header.The reasons for this are:* A few tests verify line numbers and will start failing if the number of lines in the LLVM license header changes. Once I landed my patch for valid SourceLocations in debug info we will probably have even more tests that verify line numbers.* No other LLVM project is putting license headers in its test files to my knowledge.* They make the test sources much more verbose than they have to be. Several tests have longer license headers than the actual test source.For the record, the following tests had their line numbers changed to pass with the removal of the license header: lldb-api :: functionalities/breakpoint/breakpoint_by_line_and_column/TestBreakpointByLineAndColumn.py lldb-shell :: Reproducer/TestGDBRemoteRepro.test lldb-shell :: Reproducer/TestMultipleTargets.test lldb-shell :: Reproducer/TestReuseDirectory.test lldb-shell :: ExecControl/StopHook/stop-hook-threads.test lldb-shell :: ExecControl/StopHook/stop-hook.test lldb-api :: lang/objc/exceptions/TestObjCExceptions.pyReviewers: #lldb, espindola, JDevlieghereReviewed By: #lldb, JDevlieghereSubscribers: emaste, aprantl, arphaman, JDevlieghere, lldb-commitsTags: #lldbDifferential Revision: https://reviews.llvm.org/D74839
[lldb][test] Remove symlink for API tests.Summary: Moves lldbsuite tests to lldb/test/API.This is a largely mechanical change, moved with the following steps:```rm lldb/test/API/testcasesmkdi
[lldb][test] Remove symlink for API tests.Summary: Moves lldbsuite tests to lldb/test/API.This is a largely mechanical change, moved with the following steps:```rm lldb/test/API/testcasesmkdir -p lldb/test/API/{test_runner/test,tools/lldb-{server,vscode}}mv lldb/packages/Python/lldbsuite/test/test_runner/test lldb/test/API/test_runnerfor d in $(find lldb/packages/Python/lldbsuite/test/* -maxdepth 0 -type d | egrep -v "make|plugins|test_runner|tools"); do mv $d lldb/test/API; donefor d in $(find lldb/packages/Python/lldbsuite/test/tools/lldb-vscode -maxdepth 1 -mindepth 1 | grep -v ".py"); do mv $d lldb/test/API/tools/lldb-vscode; donefor d in $(find lldb/packages/Python/lldbsuite/test/tools/lldb-server -maxdepth 1 -mindepth 1 | egrep -v "gdbremote_testcase.py|lldbgdbserverutils.py|socket_packet_pump.py"); do mv $d lldb/test/API/tools/lldb-server; done```lldb/packages/Python/lldbsuite/__init__.py and lldb/test/API/lit.cfg.py were also updated with the new directory structure.Reviewers: labath, JDevlieghereTags: #lldbDifferential Revision: https://reviews.llvm.org/D71151