Add hooks for actually showing/managing exception config window.

This commit is contained in:
Rene Gollent
2013-06-15 14:51:16 -04:00
parent f4d95e0e19
commit 944297b82b
2 changed files with 26 additions and 1 deletions
@@ -1,6 +1,6 @@
/* /*
* Copyright 2009-2012, Ingo Weinhold, [email protected]. * Copyright 2009-2012, Ingo Weinhold, [email protected].
* Copyright 2010-2012, Rene Gollent, [email protected]. * Copyright 2010-2013, Rene Gollent, [email protected].
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
*/ */
@@ -31,6 +31,7 @@
#include "Breakpoint.h" #include "Breakpoint.h"
#include "CpuState.h" #include "CpuState.h"
#include "DisassembledCode.h" #include "DisassembledCode.h"
#include "ExceptionConfigWindow.h"
#include "FileSourceCode.h" #include "FileSourceCode.h"
#include "GuiSettingsUtils.h" #include "GuiSettingsUtils.h"
#include "GuiTeamUiSettings.h" #include "GuiTeamUiSettings.h"
@@ -115,6 +116,7 @@ TeamWindow::TeamWindow(::Team* team, UserInterfaceListener* listener)
fStepOverButton(NULL), fStepOverButton(NULL),
fStepIntoButton(NULL), fStepIntoButton(NULL),
fStepOutButton(NULL), fStepOutButton(NULL),
fExceptionConfigWindow(NULL),
fInspectorWindow(NULL), fInspectorWindow(NULL),
fFilePanel(NULL) fFilePanel(NULL)
{ {
@@ -301,6 +303,27 @@ TeamWindow::MessageReceived(BMessage* message)
break; break;
} }
case MSG_SHOW_EXCEPTION_CONFIG_WINDOW:
{
if (fExceptionConfigWindow) {
fExceptionConfigWindow->Activate(true);
} else {
try {
fExceptionConfigWindow = ExceptionConfigWindow::Create(
fTeam, fListener, this);
if (fExceptionConfigWindow != NULL)
fExceptionConfigWindow->Show();
} catch (...) {
// TODO: notify user
}
}
break;
}
case MSG_EXCEPTION_CONFIG_WINDOW_CLOSED:
{
fExceptionConfigWindow = NULL;
break;
}
case MSG_SHOW_WATCH_VARIABLE_PROMPT: case MSG_SHOW_WATCH_VARIABLE_PROMPT:
{ {
target_addr_t address; target_addr_t address;
@@ -29,6 +29,7 @@ class BMenuBar;
class BSplitView; class BSplitView;
class BStringView; class BStringView;
class BTabView; class BTabView;
class ExceptionConfigWindow;
class Image; class Image;
class InspectorWindow; class InspectorWindow;
class RegistersView; class RegistersView;
@@ -195,6 +196,7 @@ private:
BSplitView* fSourceSplitView; BSplitView* fSourceSplitView;
BSplitView* fImageSplitView; BSplitView* fImageSplitView;
BSplitView* fThreadSplitView; BSplitView* fThreadSplitView;
ExceptionConfigWindow* fExceptionConfigWindow;
InspectorWindow* fInspectorWindow; InspectorWindow* fInspectorWindow;
GuiTeamUiSettings fUiSettings; GuiTeamUiSettings fUiSettings;
BFilePanel* fFilePanel; BFilePanel* fFilePanel;