diff --git a/src/apps/debugger/Jamfile b/src/apps/debugger/Jamfile index ed049c81f8..aaf52c569b 100644 --- a/src/apps/debugger/Jamfile +++ b/src/apps/debugger/Jamfile @@ -242,10 +242,10 @@ Application Debugger : TeamsListView.cpp # user_interface/gui/team_window + BreakConditionConfigWindow.cpp BreakpointListView.cpp BreakpointsView.cpp ConsoleOutputView.cpp - ExceptionConfigWindow.cpp ImageFunctionsView.cpp ImageListView.cpp RegistersView.cpp diff --git a/src/apps/debugger/MessageCodes.h b/src/apps/debugger/MessageCodes.h index bf5284c58c..288eea8346 100644 --- a/src/apps/debugger/MessageCodes.h +++ b/src/apps/debugger/MessageCodes.h @@ -54,8 +54,8 @@ enum { MSG_TEAM_RESTART_REQUESTED = 'trrq', MSG_SHOW_TEAMS_WINDOW = 'stsw', MSG_TEAMS_WINDOW_CLOSED = 'tswc', - MSG_SHOW_EXCEPTION_CONFIG_WINDOW = 'secw', - MSG_EXCEPTION_CONFIG_WINDOW_CLOSED = 'ecwc', + MSG_SHOW_BREAK_CONDITION_CONFIG_WINDOW = 'sbcc', + MSG_BREAK_CONDITION_CONFIG_WINDOW_CLOSED = 'bccw', MSG_START_NEW_TEAM = 'sttt', MSG_DEBUG_THIS_TEAM = 'dbtt', MSG_SHOW_INSPECTOR_WINDOW = 'sirw', diff --git a/src/apps/debugger/user_interface/gui/team_window/ExceptionConfigWindow.cpp b/src/apps/debugger/user_interface/gui/team_window/BreakConditionConfigWindow.cpp similarity index 80% rename from src/apps/debugger/user_interface/gui/team_window/ExceptionConfigWindow.cpp rename to src/apps/debugger/user_interface/gui/team_window/BreakConditionConfigWindow.cpp index d0a01a1e04..1406d10553 100644 --- a/src/apps/debugger/user_interface/gui/team_window/ExceptionConfigWindow.cpp +++ b/src/apps/debugger/user_interface/gui/team_window/BreakConditionConfigWindow.cpp @@ -2,7 +2,7 @@ * Copyright 2013, Rene Gollent, rene@gollent.com. * Distributed under the terms of the MIT License. */ -#include "ExceptionConfigWindow.h" +#include "BreakConditionConfigWindow.h" #include #include @@ -24,10 +24,10 @@ enum { }; -ExceptionConfigWindow::ExceptionConfigWindow(::Team* team, +BreakConditionConfigWindow::BreakConditionConfigWindow(::Team* team, UserInterfaceListener* listener, BHandler* target) : - BWindow(BRect(), "Configure Exceptions", B_FLOATING_WINDOW, + BWindow(BRect(), "Configure break conditions", B_FLOATING_WINDOW, B_AUTO_UPDATE_SIZE_LIMITS | B_CLOSE_ON_ESCAPE), fTeam(team), fListener(listener), @@ -39,18 +39,18 @@ ExceptionConfigWindow::ExceptionConfigWindow(::Team* team, } -ExceptionConfigWindow::~ExceptionConfigWindow() +BreakConditionConfigWindow::~BreakConditionConfigWindow() { - BMessenger(fTarget).SendMessage(MSG_EXCEPTION_CONFIG_WINDOW_CLOSED); + BMessenger(fTarget).SendMessage(MSG_BREAK_CONDITION_CONFIG_WINDOW_CLOSED); } -ExceptionConfigWindow* -ExceptionConfigWindow::Create(::Team* team, +BreakConditionConfigWindow* +BreakConditionConfigWindow::Create(::Team* team, UserInterfaceListener* listener, BHandler* target) { - ExceptionConfigWindow* self = new ExceptionConfigWindow(team, listener, - target); + BreakConditionConfigWindow* self = new BreakConditionConfigWindow( + team, listener, target); try { self->_Init(); @@ -64,7 +64,7 @@ ExceptionConfigWindow::Create(::Team* team, } void -ExceptionConfigWindow::MessageReceived(BMessage* message) +BreakConditionConfigWindow::MessageReceived(BMessage* message) { switch (message->what) { case MSG_STOP_ON_THROWN_EXCEPTION_CHANGED: @@ -87,7 +87,7 @@ ExceptionConfigWindow::MessageReceived(BMessage* message) void -ExceptionConfigWindow::Show() +BreakConditionConfigWindow::Show() { CenterOnScreen(); BWindow::Show(); @@ -95,7 +95,7 @@ ExceptionConfigWindow::Show() void -ExceptionConfigWindow::_Init() +BreakConditionConfigWindow::_Init() { BLayoutBuilder::Group<>(this, B_VERTICAL) .SetInsets(B_USE_DEFAULT_SPACING) @@ -140,7 +140,7 @@ ExceptionConfigWindow::_Init() void -ExceptionConfigWindow::_UpdateThrownBreakpoints(bool enable) +BreakConditionConfigWindow::_UpdateThrownBreakpoints(bool enable) { AutoLocker< ::Team> teamLocker(fTeam); for (ImageList::ConstIterator it = fTeam->Images().GetIterator(); @@ -161,7 +161,7 @@ ExceptionConfigWindow::_UpdateThrownBreakpoints(bool enable) status_t -ExceptionConfigWindow::_FindExceptionFunction(ImageDebugInfo* info, +BreakConditionConfigWindow::_FindExceptionFunction(ImageDebugInfo* info, target_addr_t& _foundAddress) const { if (info != NULL) { diff --git a/src/apps/debugger/user_interface/gui/team_window/ExceptionConfigWindow.h b/src/apps/debugger/user_interface/gui/team_window/BreakConditionConfigWindow.h similarity index 73% rename from src/apps/debugger/user_interface/gui/team_window/ExceptionConfigWindow.h rename to src/apps/debugger/user_interface/gui/team_window/BreakConditionConfigWindow.h index 2fc15abe70..fc9eccd4ce 100644 --- a/src/apps/debugger/user_interface/gui/team_window/ExceptionConfigWindow.h +++ b/src/apps/debugger/user_interface/gui/team_window/BreakConditionConfigWindow.h @@ -2,8 +2,8 @@ * Copyright 2013, Rene Gollent, rene@gollent.com. * Distributed under the terms of the MIT License. */ -#ifndef EXCEPTION_CONFIG_WINDOW_H -#define EXCEPTION_CONFIG_WINDOW_H +#ifndef BREAK_CONDITION_CONFIG_WINDOW_H +#define BREAK_CONDITION_CONFIG_WINDOW_H #include @@ -18,15 +18,15 @@ class Team; class UserInterfaceListener; -class ExceptionConfigWindow : public BWindow { +class BreakConditionConfigWindow : public BWindow { public: - ExceptionConfigWindow(::Team* team, + BreakConditionConfigWindow(::Team* team, UserInterfaceListener* listener, BHandler* target); - ~ExceptionConfigWindow(); + ~BreakConditionConfigWindow(); - static ExceptionConfigWindow* Create(::Team* team, + static BreakConditionConfigWindow* Create(::Team* team, UserInterfaceListener* listener, BHandler* target); // throws @@ -52,4 +52,4 @@ private: }; -#endif // EXCEPTION_CONFIG_WINDOW_H +#endif // BREAK_CONDITION_CONFIG_WINDOW_H diff --git a/src/apps/debugger/user_interface/gui/team_window/BreakpointsView.cpp b/src/apps/debugger/user_interface/gui/team_window/BreakpointsView.cpp index 1f047cfb54..f1eaacbc92 100644 --- a/src/apps/debugger/user_interface/gui/team_window/BreakpointsView.cpp +++ b/src/apps/debugger/user_interface/gui/team_window/BreakpointsView.cpp @@ -32,7 +32,6 @@ BreakpointsView::BreakpointsView(Team* team, Listener* listener) fConfigureExceptionsButton(NULL), fToggleBreakpointButton(NULL), fRemoveBreakpointButton(NULL), - fStopOnImageLoadCheckBox(NULL), fListener(listener) { SetName("Breakpoints"); @@ -97,13 +96,6 @@ BreakpointsView::MessageReceived(BMessage* message) _HandleBreakpointAction(message->what); break; - case MSG_STOP_ON_IMAGE_LOAD: - { - fListener->SetStopOnImageLoadRequested( - fStopOnImageLoadCheckBox->Value() == B_CONTROL_ON); - break; - } - default: BGroupView::MessageReceived(message); break; } @@ -116,7 +108,6 @@ BreakpointsView::AttachedToWindow() fConfigureExceptionsButton->SetTarget(Window()); fToggleBreakpointButton->SetTarget(this); fRemoveBreakpointButton->SetTarget(this); - fStopOnImageLoadCheckBox->SetTarget(this); } @@ -162,22 +153,16 @@ BreakpointsView::_Init() .AddGroup(B_HORIZONTAL, B_USE_SMALL_SPACING) .SetInsets(B_USE_SMALL_SPACING) .AddGlue() - .Add(fStopOnImageLoadCheckBox = new BCheckBox( - "Stop on image load")) - .AddStrut(5) .Add(fConfigureExceptionsButton = new BButton( - "Configure exceptions" B_UTF8_ELLIPSIS)) + "Configure break conditions" B_UTF8_ELLIPSIS)) .Add(fRemoveBreakpointButton = new BButton("Remove")) .Add(fToggleBreakpointButton = new BButton("Toggle")) .End(); fConfigureExceptionsButton->SetMessage( - new BMessage(MSG_SHOW_EXCEPTION_CONFIG_WINDOW)); + new BMessage(MSG_SHOW_BREAK_CONDITION_CONFIG_WINDOW)); fToggleBreakpointButton->SetMessage(new BMessage(MSG_ENABLE_BREAKPOINT)); fRemoveBreakpointButton->SetMessage(new BMessage(MSG_CLEAR_BREAKPOINT)); - fStopOnImageLoadCheckBox->SetMessage(new BMessage(MSG_STOP_ON_IMAGE_LOAD)); - fStopOnImageLoadCheckBox->SetExplicitAlignment( - BAlignment(B_ALIGN_HORIZONTAL_UNSET, B_ALIGN_VERTICAL_CENTER)); _UpdateButtons(); } diff --git a/src/apps/debugger/user_interface/gui/team_window/BreakpointsView.h b/src/apps/debugger/user_interface/gui/team_window/BreakpointsView.h index 45504df0fe..ea10f93d69 100644 --- a/src/apps/debugger/user_interface/gui/team_window/BreakpointsView.h +++ b/src/apps/debugger/user_interface/gui/team_window/BreakpointsView.h @@ -58,7 +58,6 @@ private: BButton* fConfigureExceptionsButton; BButton* fToggleBreakpointButton; BButton* fRemoveBreakpointButton; - BCheckBox* fStopOnImageLoadCheckBox; Listener* fListener; }; @@ -81,8 +80,6 @@ public: bool enabled) = 0; virtual void ClearWatchpointRequested( Watchpoint* watchpoint) = 0; - - virtual void SetStopOnImageLoadRequested(bool enabled) = 0; }; diff --git a/src/apps/debugger/user_interface/gui/team_window/TeamWindow.cpp b/src/apps/debugger/user_interface/gui/team_window/TeamWindow.cpp index 99088fd88c..de8cda1b5a 100644 --- a/src/apps/debugger/user_interface/gui/team_window/TeamWindow.cpp +++ b/src/apps/debugger/user_interface/gui/team_window/TeamWindow.cpp @@ -33,7 +33,7 @@ #include "ConsoleOutputView.h" #include "CpuState.h" #include "DisassembledCode.h" -#include "ExceptionConfigWindow.h" +#include "BreakConditionConfigWindow.h" #include "FileSourceCode.h" #include "GuiSettingsUtils.h" #include "GuiTeamUiSettings.h" @@ -128,7 +128,7 @@ TeamWindow::TeamWindow(::Team* team, UserInterfaceListener* listener) fImageSplitView(NULL), fThreadSplitView(NULL), fConsoleSplitView(NULL), - fExceptionConfigWindow(NULL), + fBreakConditionConfigWindow(NULL), fInspectorWindow(NULL), fFilePanel(NULL) { @@ -318,25 +318,26 @@ TeamWindow::MessageReceived(BMessage* message) break; } - case MSG_SHOW_EXCEPTION_CONFIG_WINDOW: + case MSG_SHOW_BREAK_CONDITION_CONFIG_WINDOW: { - if (fExceptionConfigWindow) { - fExceptionConfigWindow->Activate(true); + if (fBreakConditionConfigWindow) { + fBreakConditionConfigWindow->Activate(true); } else { try { - fExceptionConfigWindow = ExceptionConfigWindow::Create( + fBreakConditionConfigWindow + = BreakConditionConfigWindow::Create( fTeam, fListener, this); - if (fExceptionConfigWindow != NULL) - fExceptionConfigWindow->Show(); + if (fBreakConditionConfigWindow != NULL) + fBreakConditionConfigWindow->Show(); } catch (...) { // TODO: notify user } } break; } - case MSG_EXCEPTION_CONFIG_WINDOW_CLOSED: + case MSG_BREAK_CONDITION_CONFIG_WINDOW_CLOSED: { - fExceptionConfigWindow = NULL; + fBreakConditionConfigWindow = NULL; break; } case MSG_SHOW_WATCH_VARIABLE_PROMPT: @@ -768,13 +769,6 @@ TeamWindow::ClearWatchpointRequested(Watchpoint* watchpoint) } -void -TeamWindow::SetStopOnImageLoadRequested(bool enabled) -{ - fListener->SetStopOnImageLoadRequested(enabled); -} - - void TeamWindow::ValueNodeValueRequested(CpuState* cpuState, ValueNodeContainer* container, ValueNode* valueNode) diff --git a/src/apps/debugger/user_interface/gui/team_window/TeamWindow.h b/src/apps/debugger/user_interface/gui/team_window/TeamWindow.h index 9db8453a02..3ce67366fd 100644 --- a/src/apps/debugger/user_interface/gui/team_window/TeamWindow.h +++ b/src/apps/debugger/user_interface/gui/team_window/TeamWindow.h @@ -31,7 +31,7 @@ class BSplitView; class BStringView; class BTabView; class ConsoleOutputView; -class ExceptionConfigWindow; +class BreakConditionConfigWindow; class Image; class InspectorWindow; class RegistersView; @@ -104,8 +104,6 @@ private: virtual void ClearWatchpointRequested( Watchpoint* watchpoint); - virtual void SetStopOnImageLoadRequested(bool enabled); - // SourceView::Listener virtual void SetBreakpointRequested(target_addr_t address, @@ -208,7 +206,7 @@ private: BSplitView* fImageSplitView; BSplitView* fThreadSplitView; BSplitView* fConsoleSplitView; - ExceptionConfigWindow* fExceptionConfigWindow; + BreakConditionConfigWindow* fBreakConditionConfigWindow; InspectorWindow* fInspectorWindow; GuiTeamUiSettings fUiSettings; BFilePanel* fFilePanel;