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:
@@ -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
|
void
|
||||||
InspectorWindow::ExpressionEvaluated(ExpressionInfo* info, status_t result,
|
InspectorWindow::ExpressionEvaluated(ExpressionInfo* info, status_t result,
|
||||||
ExpressionResult* value)
|
ExpressionResult* value)
|
||||||
|
|||||||
@@ -53,6 +53,9 @@ public:
|
|||||||
|
|
||||||
// MemoryView::Listener
|
// MemoryView::Listener
|
||||||
virtual void TargetAddressChanged(target_addr_t address);
|
virtual void TargetAddressChanged(target_addr_t address);
|
||||||
|
virtual void HexModeChanged(int32 newMode);
|
||||||
|
virtual void EndianModeChanged(int32 newMode);
|
||||||
|
virtual void TextModeChanged(int32 newMode);
|
||||||
|
|
||||||
// ExpressionInfo::Listener
|
// ExpressionInfo::Listener
|
||||||
virtual void ExpressionEvaluated(ExpressionInfo* info,
|
virtual void ExpressionEvaluated(ExpressionInfo* info,
|
||||||
|
|||||||
@@ -132,6 +132,10 @@ public:
|
|||||||
|
|
||||||
virtual void TargetAddressChanged(target_addr_t address)
|
virtual void TargetAddressChanged(target_addr_t address)
|
||||||
= 0;
|
= 0;
|
||||||
|
|
||||||
|
virtual void HexModeChanged(int32 newMode) = 0;
|
||||||
|
virtual void TextModeChanged(int32 newMode) = 0;
|
||||||
|
virtual void EndianModeChanged(int32 newMode) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user