Debugger: Extend MemoryView listener interface.
MemoryView::Listener: - Add extra hooks for notifying listener of internal mode changes. Implement accordingly in InspectorWindow.
This commit is contained in:
parent
68e78ff841
commit
76ada671ba
|
@ -391,6 +391,48 @@ InspectorWindow::TargetAddressChanged(target_addr_t address)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
InspectorWindow::HexModeChanged(int32 newMode)
|
||||
{
|
||||
AutoLocker<BLooper> lock(this);
|
||||
if (lock.IsLocked()) {
|
||||
BMenu* menu = fHexMode->Menu();
|
||||
if (newMode < 0 || newMode > menu->CountItems())
|
||||
return;
|
||||
BMenuItem* item = menu->ItemAt(newMode);
|
||||
item->SetMarked(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
InspectorWindow::EndianModeChanged(int32 newMode)
|
||||
{
|
||||
AutoLocker<BLooper> lock(this);
|
||||
if (lock.IsLocked()) {
|
||||
BMenu* menu = fEndianMode->Menu();
|
||||
if (newMode < 0 || newMode > menu->CountItems())
|
||||
return;
|
||||
BMenuItem* item = menu->ItemAt(newMode);
|
||||
item->SetMarked(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
InspectorWindow::TextModeChanged(int32 newMode)
|
||||
{
|
||||
AutoLocker<BLooper> lock(this);
|
||||
if (lock.IsLocked()) {
|
||||
BMenu* menu = fTextMode->Menu();
|
||||
if (newMode < 0 || newMode > menu->CountItems())
|
||||
return;
|
||||
BMenuItem* item = menu->ItemAt(newMode);
|
||||
item->SetMarked(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
InspectorWindow::ExpressionEvaluated(ExpressionInfo* info, status_t result,
|
||||
ExpressionResult* value)
|
||||
|
|
|
@ -53,6 +53,9 @@ public:
|
|||
|
||||
// MemoryView::Listener
|
||||
virtual void TargetAddressChanged(target_addr_t address);
|
||||
virtual void HexModeChanged(int32 newMode);
|
||||
virtual void EndianModeChanged(int32 newMode);
|
||||
virtual void TextModeChanged(int32 newMode);
|
||||
|
||||
// ExpressionInfo::Listener
|
||||
virtual void ExpressionEvaluated(ExpressionInfo* info,
|
||||
|
|
|
@ -132,6 +132,10 @@ public:
|
|||
|
||||
virtual void TargetAddressChanged(target_addr_t address)
|
||||
= 0;
|
||||
|
||||
virtual void HexModeChanged(int32 newMode) = 0;
|
||||
virtual void TextModeChanged(int32 newMode) = 0;
|
||||
virtual void EndianModeChanged(int32 newMode) = 0;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue