From 854b341612a905567ed990e5752f66d5b5a158ce Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Thu, 30 Oct 2014 11:28:23 -0400 Subject: [PATCH] Debugger: Minor tweak to expression window. - If the expression result is an integer, display it in both hex and decimal format. --- .../gui/team_window/ExpressionEvaluationWindow.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/apps/debugger/user_interface/gui/team_window/ExpressionEvaluationWindow.cpp b/src/apps/debugger/user_interface/gui/team_window/ExpressionEvaluationWindow.cpp index 8236450293..b9724e872e 100644 --- a/src/apps/debugger/user_interface/gui/team_window/ExpressionEvaluationWindow.cpp +++ b/src/apps/debugger/user_interface/gui/team_window/ExpressionEvaluationWindow.cpp @@ -254,9 +254,16 @@ ExpressionEvaluationWindow::MessageReceived(BMessage* message) } BString outputText; - if (value != NULL) - value->ToString(outputText); - else { + if (value != NULL) { + BVariant variantValue; + value->ToVariant(variantValue); + if (variantValue.TypeIsInteger(variantValue.Type())) { + value->ToString(outputText); + outputText.SetToFormat("%#" B_PRIx64 " (%s)", + variantValue.ToUInt64(), outputText.String()); + } else + value->ToString(outputText); + } else { status_t result; if (message->FindInt32("result", &result) != B_OK) result = B_ERROR;