From 544a66de684d83002ae308114d3e71f519418b38 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Sun, 15 Jul 2012 14:26:18 -0400 Subject: [PATCH] Extend MSG_SHOW_INSPECTOR_WINDOW to allow specifying an initial address. --- .../gui/team_window/TeamWindow.cpp | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/src/apps/debugger/user_interface/gui/team_window/TeamWindow.cpp b/src/apps/debugger/user_interface/gui/team_window/TeamWindow.cpp index 61636f8531..e4363313d2 100644 --- a/src/apps/debugger/user_interface/gui/team_window/TeamWindow.cpp +++ b/src/apps/debugger/user_interface/gui/team_window/TeamWindow.cpp @@ -218,20 +218,26 @@ TeamWindow::MessageReceived(BMessage* message) { if (fInspectorWindow) { fInspectorWindow->Activate(true); - break; + } else { + try { + fInspectorWindow = InspectorWindow::Create(fTeam, + fListener, this); + if (fInspectorWindow != NULL) { + BMessage settings; + fInspectorWindow->LoadSettings(fUISettings); + fInspectorWindow->Show(); + } + } catch (...) { + // TODO: notify user + } } - try { - fInspectorWindow = InspectorWindow::Create(fTeam, fListener, - this); - if (fInspectorWindow != NULL) { - BMessage settings; - fInspectorWindow->LoadSettings(fUISettings); - fInspectorWindow->Show(); - } - } catch (...) { - // TODO: notify user - } + target_addr_t address; + if (message->FindUInt64("address", &address) == B_OK) { + BMessage addressMessage(MSG_INSPECT_ADDRESS); + addressMessage.AddUInt64("address", address); + fInspectorWindow->PostMessage(&addressMessage); + } break; } case MSG_INSPECTOR_WINDOW_CLOSED: