Issue |
131944
|
Summary |
[lldb] Supporting interrupting a scripted command (e.g. python)
|
Labels |
lldb,
lldb-dap
|
Assignees |
|
Reporter |
ashgti
|
While looking into how we can support interrupting a command in lldb-dap I noticed that I **think** we cannot interrupt a script command from the SB API.
Looking at the `ScriptInterpreterPythonImpl::Interrupt()` function that tries to interrupt running python
https://github.com/llvm/llvm-project/blob/9ed772cecc23f5f5b060720399b010275bbb7457/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h#L37
This is only ever triggered from
https://github.com/llvm/llvm-project/blob/9ed772cecc23f5f5b060720399b010275bbb7457/lldb/source/Interpreter/CommandInterpreter.cpp#L3327
Which is only triggered ever called from the IOHandlerEditline or IOHandlerCursesGUI.
As far as I can tell, if you try `SBDebugger::RequestInterrupt()` or `SBCommandInterpreter::InterruptCommand()` it never tries to interrupt a running python script (e.g. if you have a script do `script import time; time.sleep(10);`).
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs