summaryrefslogtreecommitdiff
path: root/lldb/test/API/python_api/debugger/main.cpp
AgeCommit message (Collapse)Author
2021-02-08Reland "[lldb] Make CommandInterpreter's execution context the same as ↵Tatyana Krasnukha
debugger's one"
2020-12-17Revert "[lldb] Make CommandInterpreter's execution context the same as ↵Pavel Labath
debugger's one." This reverts commit a01b26fb51c710a3a8ef88cc83b0701461f5b9ab, because it breaks the "finish" command in some way -- the command does not terminate after it steps out, but continues running the target. The exact blast radius is not clear, but it at least affects the usage of the "finish" command in TestGuiBasicDebug.py. The error is *not* gui-related, as the same issue can be reproduced by running the same steps outside of the gui. There is some kind of a race going on, as the test fails only 20% of the time on the buildbot.
2020-12-12[lldb] Make CommandInterpreter's execution context the same as debugger's one.Tatyana Krasnukha
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 commands depends 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 overriden contexts to the stack, that makes nesting commands possible. Added test reproduces one of the issues. Without this fix, the last assertion fails because 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