[Lldb-commits] [PATCH] D145136: Add a Debugger interruption mechanism in parallel to the Command Interpreter interruption

2023-03-01 Thread Jim Ingham via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D145136: Add a Debugger interruption mechanism in parallel to the Command Interpreter interruption

2023-03-02 Thread Greg Clayton via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D145136: Add a Debugger interruption mechanism in parallel to the Command Interpreter interruption

2023-03-06 Thread Pavel Labath via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D145136: Add a Debugger interruption mechanism in parallel to the Command Interpreter interruption

2023-03-07 Thread Jim Ingham via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D145136: Add a Debugger interruption mechanism in parallel to the Command Interpreter interruption

2023-03-07 Thread Jim Ingham via Phabricator via lldb-commits
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:

[Lldb-commits] [PATCH] D145136: Add a Debugger interruption mechanism in parallel to the Command Interpreter interruption

2023-03-07 Thread Jim Ingham via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D145136: Add a Debugger interruption mechanism in parallel to the Command Interpreter interruption

2023-03-07 Thread Jim Ingham via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D145136: Add a Debugger interruption mechanism in parallel to the Command Interpreter interruption

2023-03-07 Thread Jim Ingham via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D145136: Add a Debugger interruption mechanism in parallel to the Command Interpreter interruption

2023-03-07 Thread Alex Langford via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D145136: Add a Debugger interruption mechanism in parallel to the Command Interpreter interruption

2023-03-07 Thread Greg Clayton via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D145136: Add a Debugger interruption mechanism in parallel to the Command Interpreter interruption

2023-03-07 Thread Jim Ingham via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D145136: Add a Debugger interruption mechanism in parallel to the Command Interpreter interruption

2023-03-14 Thread Jim Ingham via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D145136: Add a Debugger interruption mechanism in parallel to the Command Interpreter interruption

2023-03-15 Thread Jonas Devlieghere via Phabricator via 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/

[Lldb-commits] [PATCH] D145136: Add a Debugger interruption mechanism in parallel to the Command Interpreter interruption

2023-03-15 Thread Alex Langford via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D145136: Add a Debugger interruption mechanism in parallel to the Command Interpreter interruption

2023-03-15 Thread Jonas Devlieghere via Phabricator via lldb-commits
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; +}

[Lldb-commits] [PATCH] D145136: Add a Debugger interruption mechanism in parallel to the Command Interpreter interruption

2023-03-15 Thread Jim Ingham via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D145136: Add a Debugger interruption mechanism in parallel to the Command Interpreter interruption

2023-03-15 Thread Jonas Devlieghere via Phabricator via lldb-commits
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 ___

[Lldb-commits] [PATCH] D145136: Add a Debugger interruption mechanism in parallel to the Command Interpreter interruption

2023-03-15 Thread Jim Ingham via Phabricator via lldb-commits
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/