Relocate "Stop on image load" option.
Rather than a menu item, it's now a checkbox located in the breakpoints tab.
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
#include <new>
|
#include <new>
|
||||||
|
|
||||||
#include <Button.h>
|
#include <Button.h>
|
||||||
|
#include <CheckBox.h>
|
||||||
#include <LayoutBuilder.h>
|
#include <LayoutBuilder.h>
|
||||||
|
|
||||||
#include <AutoLocker.h>
|
#include <AutoLocker.h>
|
||||||
@@ -31,6 +32,7 @@ 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");
|
||||||
@@ -95,6 +97,12 @@ 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:
|
default:
|
||||||
BGroupView::MessageReceived(message);
|
BGroupView::MessageReceived(message);
|
||||||
break;
|
break;
|
||||||
@@ -108,6 +116,7 @@ BreakpointsView::AttachedToWindow()
|
|||||||
fConfigureExceptionsButton->SetTarget(Window());
|
fConfigureExceptionsButton->SetTarget(Window());
|
||||||
fToggleBreakpointButton->SetTarget(this);
|
fToggleBreakpointButton->SetTarget(this);
|
||||||
fRemoveBreakpointButton->SetTarget(this);
|
fRemoveBreakpointButton->SetTarget(this);
|
||||||
|
fStopOnImageLoadCheckBox->SetTarget(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -153,6 +162,9 @@ 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 exceptions" B_UTF8_ELLIPSIS))
|
||||||
.Add(fRemoveBreakpointButton = new BButton("Remove"))
|
.Add(fRemoveBreakpointButton = new BButton("Remove"))
|
||||||
@@ -163,6 +175,9 @@ BreakpointsView::_Init()
|
|||||||
MSG_SHOW_EXCEPTION_CONFIG_WINDOW));
|
MSG_SHOW_EXCEPTION_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();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
|
|
||||||
class BButton;
|
class BButton;
|
||||||
|
class BCheckBox;
|
||||||
|
|
||||||
|
|
||||||
class BreakpointsView : public BGroupView,
|
class BreakpointsView : public BGroupView,
|
||||||
@@ -57,6 +58,7 @@ private:
|
|||||||
BButton* fConfigureExceptionsButton;
|
BButton* fConfigureExceptionsButton;
|
||||||
BButton* fToggleBreakpointButton;
|
BButton* fToggleBreakpointButton;
|
||||||
BButton* fRemoveBreakpointButton;
|
BButton* fRemoveBreakpointButton;
|
||||||
|
BCheckBox* fStopOnImageLoadCheckBox;
|
||||||
Listener* fListener;
|
Listener* fListener;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -79,6 +81,8 @@ 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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -234,16 +234,6 @@ void
|
|||||||
TeamWindow::MessageReceived(BMessage* message)
|
TeamWindow::MessageReceived(BMessage* message)
|
||||||
{
|
{
|
||||||
switch (message->what) {
|
switch (message->what) {
|
||||||
case MSG_STOP_ON_IMAGE_LOAD:
|
|
||||||
{
|
|
||||||
BMenuItem* item;
|
|
||||||
if (message->FindPointer("source", (void **)&item) != B_OK)
|
|
||||||
break;
|
|
||||||
bool enable = !item->IsMarked();
|
|
||||||
fListener->SetStopOnImageLoadRequested(enable);
|
|
||||||
item->SetMarked(enable);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case MSG_TEAM_RESTART_REQUESTED:
|
case MSG_TEAM_RESTART_REQUESTED:
|
||||||
{
|
{
|
||||||
fListener->TeamRestartRequested();
|
fListener->TeamRestartRequested();
|
||||||
@@ -778,6 +768,13 @@ 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)
|
||||||
@@ -975,10 +972,6 @@ TeamWindow::_Init()
|
|||||||
MSG_TEAM_RESTART_REQUESTED), 'R', B_SHIFT_KEY);
|
MSG_TEAM_RESTART_REQUESTED), 'R', B_SHIFT_KEY);
|
||||||
menu->AddItem(item);
|
menu->AddItem(item);
|
||||||
item->SetTarget(this);
|
item->SetTarget(this);
|
||||||
item = new BMenuItem("Stop on image load", new BMessage(
|
|
||||||
MSG_STOP_ON_IMAGE_LOAD));
|
|
||||||
item->SetTarget(this);
|
|
||||||
menu->AddItem(item);
|
|
||||||
item = new BMenuItem("Close", new BMessage(B_QUIT_REQUESTED),
|
item = new BMenuItem("Close", new BMessage(B_QUIT_REQUESTED),
|
||||||
'W');
|
'W');
|
||||||
menu->AddItem(item);
|
menu->AddItem(item);
|
||||||
|
|||||||
@@ -104,6 +104,8 @@ 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,
|
||||||
|
|||||||
Reference in New Issue
Block a user