jingham created this revision.
jingham added reviewers: labath, JDevlieghere, clayborg, jasonmolenda,
bulbazord.
Herald added a project: All.
jingham requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
I put up an RFC for debugger interruption
clayborg added inline comments.
Comment at: lldb/include/lldb/Core/Debugger.h:397-398
+ /// cooperative interruption. If this is non-zero, InterruptRequested will
+ /// return true. Interruptible operations are expected to query this
+ /// flag periodically, and interrupt wh
labath added a comment.
I kinda like this.
Comment at: lldb/include/lldb/Core/Debugger.h:563
+ // the previous IOHandler thread.
+ const HostThread SetIOHandlerThread(HostThread &new_thread);
`const` on a return value rarely makes sense. OTOH, `const` on th
jingham updated this revision to Diff 503136.
jingham added a comment.
Converted the test from using a lock to synchronize the command and test
threads to using barriers.
Changed the CommandInterpreter to print partial results when commands are
interrupted.
Fixed other review comments.
Reposit
jingham marked 5 inline comments as done.
jingham added inline comments.
Comment at:
lldb/test/API/python_api/was_interrupted/TestDebuggerInterruption.py:39
+def rendevous(self):
+# We smuggle out lock and event to the runner thread using thread
local data:
jingham updated this revision to Diff 503138.
jingham added a comment.
Forgot to address Pavel's const comment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145136/new/
https://reviews.llvm.org/D145136
Files:
lldb/include/lldb/API/SBCommandInte
jingham added inline comments.
Comment at: lldb/include/lldb/Core/Debugger.h:563
+ // the previous IOHandler thread.
+ const HostThread SetIOHandlerThread(HostThread &new_thread);
labath wrote:
> `const` on a return value rarely makes sense. OTOH, `const` on
jingham updated this revision to Diff 503143.
jingham added a comment.
Update the test comments for the new test method.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145136/new/
https://reviews.llvm.org/D145136
Files:
lldb/include/lldb/API/SBCo
bulbazord added a comment.
Small nits
Comment at: lldb/include/lldb/API/SBCommandInterpreter.h:251-253
+ /// Interrupts the command currently executing in the RunCommandInterpreter
+ /// thread.
+ bool InterruptCommand();
Some info on the return value would
clayborg added inline comments.
Comment at: lldb/include/lldb/API/SBDebugger.h:203
+ void CancelInterruptRequest();
+ bool InterruptRequested();
bulbazord wrote:
> Could this be marked `const` if the mutex was marked `mutable`?
We don't tend to mark things in
jingham updated this revision to Diff 503171.
jingham added a comment.
Fix up some comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145136/new/
https://reviews.llvm.org/D145136
Files:
lldb/include/lldb/API/SBCommandInterpreter.h
lldb/in
jingham added a comment.
polite ping... I think I've addressed all the concerns folks raised.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145136/new/
https://reviews.llvm.org/D145136
___
lldb-commits
JDevlieghere added inline comments.
Comment at: lldb/source/Core/Debugger.cpp:1220-1221
+return m_interrupt_requested != 0;
+ } else
+return GetCommandInterpreter().WasInterrupted();
+}
Nit: else-after-return.
Comment at: lldb/source/
bulbazord added inline comments.
Comment at: lldb/source/Core/Debugger.cpp:1973-1977
+HostThread &Debugger::SetIOHandlerThread(HostThread &new_thread) {
+ HostThread &old_host = m_io_handler_thread;
+ m_io_handler_thread = new_thread;
+ return old_host;
+}
JDe
JDevlieghere added inline comments.
Comment at: lldb/source/Core/Debugger.cpp:1973-1977
+HostThread &Debugger::SetIOHandlerThread(HostThread &new_thread) {
+ HostThread &old_host = m_io_handler_thread;
+ m_io_handler_thread = new_thread;
+ return old_host;
+}
jingham updated this revision to Diff 505645.
jingham added a comment.
Address Jonas' review comment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145136/new/
https://reviews.llvm.org/D145136
Files:
lldb/include/lldb/API/SBCommandInterpreter.h
JDevlieghere accepted this revision.
JDevlieghere added a comment.
This revision is now accepted and ready to land.
LGTM
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145136/new/
https://reviews.llvm.org/D145136
___
This revision was automatically updated to reflect the committed changes.
Closed by commit rGfe61b38258bf: Add a Debugger interruption mechanism in
conjunction with the (authored by jingham).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145136/new/
18 matches
Mail list logo