ExceptionConfigWindow -> BreakConditionConfigWindow.
Stop on image load removed from BreakpointsView, pending adding it to BreakConditionConfigWindow with some additional options.
This commit is contained in:
parent
9cb70c69b6
commit
ef2d649d76
@ -242,10 +242,10 @@ Application Debugger :
|
|||||||
TeamsListView.cpp
|
TeamsListView.cpp
|
||||||
|
|
||||||
# user_interface/gui/team_window
|
# user_interface/gui/team_window
|
||||||
|
BreakConditionConfigWindow.cpp
|
||||||
BreakpointListView.cpp
|
BreakpointListView.cpp
|
||||||
BreakpointsView.cpp
|
BreakpointsView.cpp
|
||||||
ConsoleOutputView.cpp
|
ConsoleOutputView.cpp
|
||||||
ExceptionConfigWindow.cpp
|
|
||||||
ImageFunctionsView.cpp
|
ImageFunctionsView.cpp
|
||||||
ImageListView.cpp
|
ImageListView.cpp
|
||||||
RegistersView.cpp
|
RegistersView.cpp
|
||||||
|
@ -54,8 +54,8 @@ enum {
|
|||||||
MSG_TEAM_RESTART_REQUESTED = 'trrq',
|
MSG_TEAM_RESTART_REQUESTED = 'trrq',
|
||||||
MSG_SHOW_TEAMS_WINDOW = 'stsw',
|
MSG_SHOW_TEAMS_WINDOW = 'stsw',
|
||||||
MSG_TEAMS_WINDOW_CLOSED = 'tswc',
|
MSG_TEAMS_WINDOW_CLOSED = 'tswc',
|
||||||
MSG_SHOW_EXCEPTION_CONFIG_WINDOW = 'secw',
|
MSG_SHOW_BREAK_CONDITION_CONFIG_WINDOW = 'sbcc',
|
||||||
MSG_EXCEPTION_CONFIG_WINDOW_CLOSED = 'ecwc',
|
MSG_BREAK_CONDITION_CONFIG_WINDOW_CLOSED = 'bccw',
|
||||||
MSG_START_NEW_TEAM = 'sttt',
|
MSG_START_NEW_TEAM = 'sttt',
|
||||||
MSG_DEBUG_THIS_TEAM = 'dbtt',
|
MSG_DEBUG_THIS_TEAM = 'dbtt',
|
||||||
MSG_SHOW_INSPECTOR_WINDOW = 'sirw',
|
MSG_SHOW_INSPECTOR_WINDOW = 'sirw',
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* Copyright 2013, Rene Gollent, rene@gollent.com.
|
* Copyright 2013, Rene Gollent, rene@gollent.com.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
#include "ExceptionConfigWindow.h"
|
#include "BreakConditionConfigWindow.h"
|
||||||
|
|
||||||
#include <Button.h>
|
#include <Button.h>
|
||||||
#include <CheckBox.h>
|
#include <CheckBox.h>
|
||||||
@ -24,10 +24,10 @@ enum {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
ExceptionConfigWindow::ExceptionConfigWindow(::Team* team,
|
BreakConditionConfigWindow::BreakConditionConfigWindow(::Team* team,
|
||||||
UserInterfaceListener* listener, BHandler* target)
|
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),
|
B_AUTO_UPDATE_SIZE_LIMITS | B_CLOSE_ON_ESCAPE),
|
||||||
fTeam(team),
|
fTeam(team),
|
||||||
fListener(listener),
|
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*
|
BreakConditionConfigWindow*
|
||||||
ExceptionConfigWindow::Create(::Team* team,
|
BreakConditionConfigWindow::Create(::Team* team,
|
||||||
UserInterfaceListener* listener, BHandler* target)
|
UserInterfaceListener* listener, BHandler* target)
|
||||||
{
|
{
|
||||||
ExceptionConfigWindow* self = new ExceptionConfigWindow(team, listener,
|
BreakConditionConfigWindow* self = new BreakConditionConfigWindow(
|
||||||
target);
|
team, listener, target);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
self->_Init();
|
self->_Init();
|
||||||
@ -64,7 +64,7 @@ ExceptionConfigWindow::Create(::Team* team,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ExceptionConfigWindow::MessageReceived(BMessage* message)
|
BreakConditionConfigWindow::MessageReceived(BMessage* message)
|
||||||
{
|
{
|
||||||
switch (message->what) {
|
switch (message->what) {
|
||||||
case MSG_STOP_ON_THROWN_EXCEPTION_CHANGED:
|
case MSG_STOP_ON_THROWN_EXCEPTION_CHANGED:
|
||||||
@ -87,7 +87,7 @@ ExceptionConfigWindow::MessageReceived(BMessage* message)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ExceptionConfigWindow::Show()
|
BreakConditionConfigWindow::Show()
|
||||||
{
|
{
|
||||||
CenterOnScreen();
|
CenterOnScreen();
|
||||||
BWindow::Show();
|
BWindow::Show();
|
||||||
@ -95,7 +95,7 @@ ExceptionConfigWindow::Show()
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ExceptionConfigWindow::_Init()
|
BreakConditionConfigWindow::_Init()
|
||||||
{
|
{
|
||||||
BLayoutBuilder::Group<>(this, B_VERTICAL)
|
BLayoutBuilder::Group<>(this, B_VERTICAL)
|
||||||
.SetInsets(B_USE_DEFAULT_SPACING)
|
.SetInsets(B_USE_DEFAULT_SPACING)
|
||||||
@ -140,7 +140,7 @@ ExceptionConfigWindow::_Init()
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ExceptionConfigWindow::_UpdateThrownBreakpoints(bool enable)
|
BreakConditionConfigWindow::_UpdateThrownBreakpoints(bool enable)
|
||||||
{
|
{
|
||||||
AutoLocker< ::Team> teamLocker(fTeam);
|
AutoLocker< ::Team> teamLocker(fTeam);
|
||||||
for (ImageList::ConstIterator it = fTeam->Images().GetIterator();
|
for (ImageList::ConstIterator it = fTeam->Images().GetIterator();
|
||||||
@ -161,7 +161,7 @@ ExceptionConfigWindow::_UpdateThrownBreakpoints(bool enable)
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
ExceptionConfigWindow::_FindExceptionFunction(ImageDebugInfo* info,
|
BreakConditionConfigWindow::_FindExceptionFunction(ImageDebugInfo* info,
|
||||||
target_addr_t& _foundAddress) const
|
target_addr_t& _foundAddress) const
|
||||||
{
|
{
|
||||||
if (info != NULL) {
|
if (info != NULL) {
|
@ -2,8 +2,8 @@
|
|||||||
* Copyright 2013, Rene Gollent, rene@gollent.com.
|
* Copyright 2013, Rene Gollent, rene@gollent.com.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
#ifndef EXCEPTION_CONFIG_WINDOW_H
|
#ifndef BREAK_CONDITION_CONFIG_WINDOW_H
|
||||||
#define EXCEPTION_CONFIG_WINDOW_H
|
#define BREAK_CONDITION_CONFIG_WINDOW_H
|
||||||
|
|
||||||
|
|
||||||
#include <Window.h>
|
#include <Window.h>
|
||||||
@ -18,15 +18,15 @@ class Team;
|
|||||||
class UserInterfaceListener;
|
class UserInterfaceListener;
|
||||||
|
|
||||||
|
|
||||||
class ExceptionConfigWindow : public BWindow {
|
class BreakConditionConfigWindow : public BWindow {
|
||||||
public:
|
public:
|
||||||
ExceptionConfigWindow(::Team* team,
|
BreakConditionConfigWindow(::Team* team,
|
||||||
UserInterfaceListener* listener,
|
UserInterfaceListener* listener,
|
||||||
BHandler* target);
|
BHandler* target);
|
||||||
|
|
||||||
~ExceptionConfigWindow();
|
~BreakConditionConfigWindow();
|
||||||
|
|
||||||
static ExceptionConfigWindow* Create(::Team* team,
|
static BreakConditionConfigWindow* Create(::Team* team,
|
||||||
UserInterfaceListener* listener,
|
UserInterfaceListener* listener,
|
||||||
BHandler* target);
|
BHandler* target);
|
||||||
// throws
|
// throws
|
||||||
@ -52,4 +52,4 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif // EXCEPTION_CONFIG_WINDOW_H
|
#endif // BREAK_CONDITION_CONFIG_WINDOW_H
|
@ -32,7 +32,6 @@ BreakpointsView::BreakpointsView(Team* team, Listener* listener)
|
|||||||
fConfigureExceptionsButton(NULL),
|
fConfigureExceptionsButton(NULL),
|
||||||
fToggleBreakpointButton(NULL),
|
fToggleBreakpointButton(NULL),
|
||||||
fRemoveBreakpointButton(NULL),
|
fRemoveBreakpointButton(NULL),
|
||||||
fStopOnImageLoadCheckBox(NULL),
|
|
||||||
fListener(listener)
|
fListener(listener)
|
||||||
{
|
{
|
||||||
SetName("Breakpoints");
|
SetName("Breakpoints");
|
||||||
@ -97,13 +96,6 @@ BreakpointsView::MessageReceived(BMessage* message)
|
|||||||
_HandleBreakpointAction(message->what);
|
_HandleBreakpointAction(message->what);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MSG_STOP_ON_IMAGE_LOAD:
|
|
||||||
{
|
|
||||||
fListener->SetStopOnImageLoadRequested(
|
|
||||||
fStopOnImageLoadCheckBox->Value() == B_CONTROL_ON);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
BGroupView::MessageReceived(message);
|
BGroupView::MessageReceived(message);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -116,7 +108,6 @@ BreakpointsView::AttachedToWindow()
|
|||||||
fConfigureExceptionsButton->SetTarget(Window());
|
fConfigureExceptionsButton->SetTarget(Window());
|
||||||
fToggleBreakpointButton->SetTarget(this);
|
fToggleBreakpointButton->SetTarget(this);
|
||||||
fRemoveBreakpointButton->SetTarget(this);
|
fRemoveBreakpointButton->SetTarget(this);
|
||||||
fStopOnImageLoadCheckBox->SetTarget(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -162,22 +153,16 @@ BreakpointsView::_Init()
|
|||||||
.AddGroup(B_HORIZONTAL, B_USE_SMALL_SPACING)
|
.AddGroup(B_HORIZONTAL, B_USE_SMALL_SPACING)
|
||||||
.SetInsets(B_USE_SMALL_SPACING)
|
.SetInsets(B_USE_SMALL_SPACING)
|
||||||
.AddGlue()
|
.AddGlue()
|
||||||
.Add(fStopOnImageLoadCheckBox = new BCheckBox(
|
|
||||||
"Stop on image load"))
|
|
||||||
.AddStrut(5)
|
|
||||||
.Add(fConfigureExceptionsButton = new BButton(
|
.Add(fConfigureExceptionsButton = new BButton(
|
||||||
"Configure exceptions" B_UTF8_ELLIPSIS))
|
"Configure break conditions" B_UTF8_ELLIPSIS))
|
||||||
.Add(fRemoveBreakpointButton = new BButton("Remove"))
|
.Add(fRemoveBreakpointButton = new BButton("Remove"))
|
||||||
.Add(fToggleBreakpointButton = new BButton("Toggle"))
|
.Add(fToggleBreakpointButton = new BButton("Toggle"))
|
||||||
.End();
|
.End();
|
||||||
|
|
||||||
fConfigureExceptionsButton->SetMessage(
|
fConfigureExceptionsButton->SetMessage(
|
||||||
new BMessage(MSG_SHOW_EXCEPTION_CONFIG_WINDOW));
|
new BMessage(MSG_SHOW_BREAK_CONDITION_CONFIG_WINDOW));
|
||||||
fToggleBreakpointButton->SetMessage(new BMessage(MSG_ENABLE_BREAKPOINT));
|
fToggleBreakpointButton->SetMessage(new BMessage(MSG_ENABLE_BREAKPOINT));
|
||||||
fRemoveBreakpointButton->SetMessage(new BMessage(MSG_CLEAR_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();
|
_UpdateButtons();
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,6 @@ private:
|
|||||||
BButton* fConfigureExceptionsButton;
|
BButton* fConfigureExceptionsButton;
|
||||||
BButton* fToggleBreakpointButton;
|
BButton* fToggleBreakpointButton;
|
||||||
BButton* fRemoveBreakpointButton;
|
BButton* fRemoveBreakpointButton;
|
||||||
BCheckBox* fStopOnImageLoadCheckBox;
|
|
||||||
Listener* fListener;
|
Listener* fListener;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -81,8 +80,6 @@ public:
|
|||||||
bool enabled) = 0;
|
bool enabled) = 0;
|
||||||
virtual void ClearWatchpointRequested(
|
virtual void ClearWatchpointRequested(
|
||||||
Watchpoint* watchpoint) = 0;
|
Watchpoint* watchpoint) = 0;
|
||||||
|
|
||||||
virtual void SetStopOnImageLoadRequested(bool enabled) = 0;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
#include "ConsoleOutputView.h"
|
#include "ConsoleOutputView.h"
|
||||||
#include "CpuState.h"
|
#include "CpuState.h"
|
||||||
#include "DisassembledCode.h"
|
#include "DisassembledCode.h"
|
||||||
#include "ExceptionConfigWindow.h"
|
#include "BreakConditionConfigWindow.h"
|
||||||
#include "FileSourceCode.h"
|
#include "FileSourceCode.h"
|
||||||
#include "GuiSettingsUtils.h"
|
#include "GuiSettingsUtils.h"
|
||||||
#include "GuiTeamUiSettings.h"
|
#include "GuiTeamUiSettings.h"
|
||||||
@ -128,7 +128,7 @@ TeamWindow::TeamWindow(::Team* team, UserInterfaceListener* listener)
|
|||||||
fImageSplitView(NULL),
|
fImageSplitView(NULL),
|
||||||
fThreadSplitView(NULL),
|
fThreadSplitView(NULL),
|
||||||
fConsoleSplitView(NULL),
|
fConsoleSplitView(NULL),
|
||||||
fExceptionConfigWindow(NULL),
|
fBreakConditionConfigWindow(NULL),
|
||||||
fInspectorWindow(NULL),
|
fInspectorWindow(NULL),
|
||||||
fFilePanel(NULL)
|
fFilePanel(NULL)
|
||||||
{
|
{
|
||||||
@ -318,25 +318,26 @@ TeamWindow::MessageReceived(BMessage* message)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
case MSG_SHOW_EXCEPTION_CONFIG_WINDOW:
|
case MSG_SHOW_BREAK_CONDITION_CONFIG_WINDOW:
|
||||||
{
|
{
|
||||||
if (fExceptionConfigWindow) {
|
if (fBreakConditionConfigWindow) {
|
||||||
fExceptionConfigWindow->Activate(true);
|
fBreakConditionConfigWindow->Activate(true);
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
fExceptionConfigWindow = ExceptionConfigWindow::Create(
|
fBreakConditionConfigWindow
|
||||||
|
= BreakConditionConfigWindow::Create(
|
||||||
fTeam, fListener, this);
|
fTeam, fListener, this);
|
||||||
if (fExceptionConfigWindow != NULL)
|
if (fBreakConditionConfigWindow != NULL)
|
||||||
fExceptionConfigWindow->Show();
|
fBreakConditionConfigWindow->Show();
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
// TODO: notify user
|
// TODO: notify user
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MSG_EXCEPTION_CONFIG_WINDOW_CLOSED:
|
case MSG_BREAK_CONDITION_CONFIG_WINDOW_CLOSED:
|
||||||
{
|
{
|
||||||
fExceptionConfigWindow = NULL;
|
fBreakConditionConfigWindow = NULL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MSG_SHOW_WATCH_VARIABLE_PROMPT:
|
case MSG_SHOW_WATCH_VARIABLE_PROMPT:
|
||||||
@ -768,13 +769,6 @@ TeamWindow::ClearWatchpointRequested(Watchpoint* watchpoint)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
TeamWindow::SetStopOnImageLoadRequested(bool enabled)
|
|
||||||
{
|
|
||||||
fListener->SetStopOnImageLoadRequested(enabled);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
TeamWindow::ValueNodeValueRequested(CpuState* cpuState,
|
TeamWindow::ValueNodeValueRequested(CpuState* cpuState,
|
||||||
ValueNodeContainer* container, ValueNode* valueNode)
|
ValueNodeContainer* container, ValueNode* valueNode)
|
||||||
|
@ -31,7 +31,7 @@ class BSplitView;
|
|||||||
class BStringView;
|
class BStringView;
|
||||||
class BTabView;
|
class BTabView;
|
||||||
class ConsoleOutputView;
|
class ConsoleOutputView;
|
||||||
class ExceptionConfigWindow;
|
class BreakConditionConfigWindow;
|
||||||
class Image;
|
class Image;
|
||||||
class InspectorWindow;
|
class InspectorWindow;
|
||||||
class RegistersView;
|
class RegistersView;
|
||||||
@ -104,8 +104,6 @@ private:
|
|||||||
virtual void ClearWatchpointRequested(
|
virtual void ClearWatchpointRequested(
|
||||||
Watchpoint* watchpoint);
|
Watchpoint* watchpoint);
|
||||||
|
|
||||||
virtual void SetStopOnImageLoadRequested(bool enabled);
|
|
||||||
|
|
||||||
|
|
||||||
// SourceView::Listener
|
// SourceView::Listener
|
||||||
virtual void SetBreakpointRequested(target_addr_t address,
|
virtual void SetBreakpointRequested(target_addr_t address,
|
||||||
@ -208,7 +206,7 @@ private:
|
|||||||
BSplitView* fImageSplitView;
|
BSplitView* fImageSplitView;
|
||||||
BSplitView* fThreadSplitView;
|
BSplitView* fThreadSplitView;
|
||||||
BSplitView* fConsoleSplitView;
|
BSplitView* fConsoleSplitView;
|
||||||
ExceptionConfigWindow* fExceptionConfigWindow;
|
BreakConditionConfigWindow* fBreakConditionConfigWindow;
|
||||||
InspectorWindow* fInspectorWindow;
|
InspectorWindow* fInspectorWindow;
|
||||||
GuiTeamUiSettings fUiSettings;
|
GuiTeamUiSettings fUiSettings;
|
||||||
BFilePanel* fFilePanel;
|
BFilePanel* fFilePanel;
|
||||||
|
Loading…
Reference in New Issue
Block a user