summaryrefslogtreecommitdiff
path: root/Userland/DevTools/HackStudio/HackStudioWidget.cpp
diff options
context:
space:
mode:
authorItamar <itamar8910@gmail.com>2023-02-19 22:52:52 +0200
committerAndreas Kling <kling@serenityos.org>2023-02-24 19:09:27 +0100
commit47f5a3ea9afeaade0295022c7e01fdc54401ef9f (patch)
tree800bff0439556de2e760c1734dc624ea3040fcee /Userland/DevTools/HackStudio/HackStudioWidget.cpp
parent91224d47d20ab149ddf41e681ea6367c50123323 (diff)
downloadserenity-47f5a3ea9afeaade0295022c7e01fdc54401ef9f.zip
HackStudio: Add 'pause debuggee' button
This button sends a SIGSTOP to the debugged process, which pauses it. The debuggee can be resumed with the 'continue' button.
Diffstat (limited to 'Userland/DevTools/HackStudio/HackStudioWidget.cpp')
-rw-r--r--Userland/DevTools/HackStudio/HackStudioWidget.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/DevTools/HackStudio/HackStudioWidget.cpp b/Userland/DevTools/HackStudio/HackStudioWidget.cpp
index 71d9eb486c..aa8b5be432 100644
--- a/Userland/DevTools/HackStudio/HackStudioWidget.cpp
+++ b/Userland/DevTools/HackStudio/HackStudioWidget.cpp
@@ -1055,7 +1055,7 @@ void HackStudioWidget::initialize_debugger()
if (m_current_editor_in_execution)
m_current_editor_in_execution->editor().set_execution_position(source_position.value().line_number - 1);
m_debug_info_widget->update_state(*Debugger::the().session(), regs);
- m_debug_info_widget->set_debug_actions_enabled(true);
+ m_debug_info_widget->set_debug_actions_enabled(true, DebugInfoWidget::DebugActionsState::DebuggeeStopped);
m_disassembly_widget->update_state(*Debugger::the().session(), regs);
HackStudioWidget::reveal_action_tab(*m_debug_info_widget);
});
@@ -1065,7 +1065,7 @@ void HackStudioWidget::initialize_debugger()
},
[this]() {
GUI::Application::the()->event_loop().deferred_invoke([this] {
- m_debug_info_widget->set_debug_actions_enabled(false);
+ m_debug_info_widget->set_debug_actions_enabled(true, DebugInfoWidget::DebugActionsState::DebuggeeRunning);
if (m_current_editor_in_execution)
m_current_editor_in_execution->editor().clear_execution_position();
});
@@ -1073,7 +1073,7 @@ void HackStudioWidget::initialize_debugger()
},
[this]() {
GUI::Application::the()->event_loop().deferred_invoke([this] {
- m_debug_info_widget->set_debug_actions_enabled(false);
+ m_debug_info_widget->set_debug_actions_enabled(false, {});
if (m_current_editor_in_execution)
m_current_editor_in_execution->editor().clear_execution_position();
m_debug_info_widget->program_stopped();