[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
show more ...
[lldb] Fixup af921006d3792f for non-linux platforms
[lldb] Remove the global platform listThis patch moves the platform creation and selection logic into theper-debugger platform lists. I've tried to keep functional changes to aminimum -- the main
[lldb] Remove the global platform listThis patch moves the platform creation and selection logic into theper-debugger platform lists. I've tried to keep functional changes to aminimum -- the main (only) observable difference in this change is thatAPIs, which select a platform by name (e.g.,Debugger::SetCurrentPlatform) will not automatically pick up a platformassociated with another debugger (or no debugger at all).I've also added several tests for this functionality -- one of thepleasant consequences of the debugger isolation is that it is nowpossible to test the platform selection and creation logic.This is a product of the discussion at<https://discourse.llvm.org/t/multiple-platforms-with-the-same-name/59594>.Differential Revision: https://reviews.llvm.org/D120810
Revert "[lldb] Remove the global platform list"It makes module dependencies loopier.This reverts commits 49cffe3c7fab74252d4b6a073303c803dc1659f0 andffb9429b6f3c29ab4687b96fd85374924c98ad16.
[lldb] Fix TestDebuggerAPI on windows (broken by D120810)
[lldb] Replace asserts on .Success() with assertSuccess()Replace forms of `assertTrue(err.Success())` with `assertSuccess(err)` (added in D82759).* `assertSuccess` prints out the error's message
[lldb] Replace asserts on .Success() with assertSuccess()Replace forms of `assertTrue(err.Success())` with `assertSuccess(err)` (added in D82759).* `assertSuccess` prints out the error's message* `assertSuccess` expresses explicit higher level semantics, both to the reader and for test failure output* `assertSuccess` seems not to be well known, using it where possible will help spread knowledge* `assertSuccess` statements are more succinctDifferential Revision: https://reviews.llvm.org/D119616
[lldb/tests] Removed add_test_categories decorator for python API tests, NFCThere is a .categories file in the python_api directory that makes all nested testsbelong to the category "pyapi". The d
[lldb/tests] Removed add_test_categories decorator for python API tests, NFCThere is a .categories file in the python_api directory that makes all nested testsbelong to the category "pyapi". The decorator is unnecessary for these tests.
Reland "[lldb] Make CommandInterpreter's execution context the same as debugger's one"
Revert "[lldb] Use current execution context in SBDebugger"This reverts commit 754ab803b8dc659e3645d369d1b5d6d2f97be29e.As pointed out in https://reviews.llvm.org/D95761, this patch could lead to
Revert "[lldb] Use current execution context in SBDebugger"This reverts commit 754ab803b8dc659e3645d369d1b5d6d2f97be29e.As pointed out in https://reviews.llvm.org/D95761, this patch could lead tohaving the wrong execution context in some situations (thanks Jim!).D92164 is addressing the same issue and will replace this patch, so I'llrevert this one.
[lldb] Use current execution context in SBDebuggerUse `GetSelectedExecutionContext()` instead of`GetCommandInterpreter().GetExecutionContext()` in`SBDebugger::GetInternalVariableValue/SBDebugger:
[lldb] Use current execution context in SBDebuggerUse `GetSelectedExecutionContext()` instead of`GetCommandInterpreter().GetExecutionContext()` in`SBDebugger::GetInternalVariableValue/SBDebugger::SetInternalVariable`. Theexecution context in the command interpreter might be empty, if no commands hasbeen executed yet (it is updated only when handling commands or completions --e.g.https://github.com/llvm/llvm-project/blob/main/lldb/source/Interpreter/CommandInterpreter.cpp#L1855).Reviewed By: teemperorDifferential Revision: https://reviews.llvm.org/D95761
Revert "[lldb] Make CommandInterpreter's execution context the same as debugger's one."This reverts commit a01b26fb51c710a3a8ef88cc83b0701461f5b9ab, because itbreaks the "finish" command in some w
Revert "[lldb] Make CommandInterpreter's execution context the same as debugger's one."This reverts commit a01b26fb51c710a3a8ef88cc83b0701461f5b9ab, because itbreaks the "finish" command in some way -- the command does notterminate after it steps out, but continues running the target. Theexact blast radius is not clear, but it at least affects the usage ofthe "finish" command in TestGuiBasicDebug.py. The error is *not*gui-related, as the same issue can be reproduced by running the samesteps outside of the gui.There is some kind of a race going on, as the test fails only 20% of thetime on the buildbot.
[lldb] Make CommandInterpreter's execution context the same as debugger's one.Currently, the interpreter's context is not updated until a command is executed.This has resulted in the behavior of S
[lldb] Make CommandInterpreter's execution context the same as debugger's one.Currently, the interpreter's context is not updated until a command is executed.This has resulted in the behavior of SB-interface functions and some commandsdepends on previous user actions. The interpreter's context can stay uninitialized,point to a currently selected target, or point to one of previously selected targets.This patch removes any usages of CommandInterpreter::UpdateExecutionContext.CommandInterpreter::HandleCommand* functions still may override context temporarily,but now they always restore it before exiting. CommandInterpreter saves overridencontexts to the stack, that makes nesting commands possible.Added test reproduces one of the issues. Without this fix, the last assertion failsbecause interpreter's execution context is empty until running "target list", so,the value of the global property was updated instead of process's local instance.Differential Revision: https://reviews.llvm.org/D92164
[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