From f0cbaf453c3c1dab6a0d0c1e4f8e47176f6e7f34 Mon Sep 17 00:00:00 2001 From: Itamar Date: Fri, 8 May 2020 10:35:14 +0300 Subject: [PATCH] HackStudio: Close the debug tab when debugged program exits --- DevTools/HackStudio/DebugInfoWidget.h | 1 + DevTools/HackStudio/main.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/DevTools/HackStudio/DebugInfoWidget.h b/DevTools/HackStudio/DebugInfoWidget.h index 83fad11d8c..ca3c7e65b0 100644 --- a/DevTools/HackStudio/DebugInfoWidget.h +++ b/DevTools/HackStudio/DebugInfoWidget.h @@ -61,6 +61,7 @@ public: virtual ~DebugInfoWidget() override {} void update_variables(const PtraceRegisters&); + void program_stopped(); private: explicit DebugInfoWidget(); diff --git a/DevTools/HackStudio/main.cpp b/DevTools/HackStudio/main.cpp index b9dbc7ad85..7d44a12ad4 100644 --- a/DevTools/HackStudio/main.cpp +++ b/DevTools/HackStudio/main.cpp @@ -631,6 +631,8 @@ int main(int argc, char** argv) }, [&]() { dbg() << "Program exited"; + debug_info_widget.program_stopped(); + hide_action_tabs(); Core::EventLoop::main().post_event(*g_window, make([=](auto&) { GUI::MessageBox::show("Program Exited", "Debugger", GUI::MessageBox::Type::Information, GUI::MessageBox::InputType::OK, g_window); }));