aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/watchhandler.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <[email protected]>2012-08-21 13:39:53 +0200
committerhjk <[email protected]>2012-08-21 13:55:54 +0200
commita31e8b446e8ac7e151036b4aee8e6a757f9efdfd (patch)
tree2b1a6af7a0e4a7dcf33c1691be466e7cbe220d25 /src/plugins/debugger/watchhandler.cpp
parent128a3fb0b6875f7e1c0d7deb722fbb2d9c908af1 (diff)
CDB: Pass referenced address in separate GDBMI field.
Use 'origaddr' as gdb does. Do not append address to watch value if it is already contained in the value. Fixes the currently grayed-out 'Open memory editor at referenced address'. Change-Id: I6f7cf5b7984f93606ad4bb0872348f51c73f9117 Reviewed-by: hjk <[email protected]>
Diffstat (limited to 'src/plugins/debugger/watchhandler.cpp')
-rw-r--r--src/plugins/debugger/watchhandler.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp
index d9a2e7548a5..1805d6e5898 100644
--- a/src/plugins/debugger/watchhandler.cpp
+++ b/src/plugins/debugger/watchhandler.cpp
@@ -955,9 +955,14 @@ QString WatchModel::display(const WatchItem *item, int col) const
case 1:
result = removeInitialNamespace(
truncateValue(formattedValue(*item)));
+ // Append referencing address unless the value contains it.
if (item->referencingAddress) {
- result += QLatin1String(" @");
- result += QString::fromLatin1(item->hexReferencingAddress());
+ if (result.startsWith(QLatin1String("0x"))) {
+ result.prepend(QLatin1Char('@'));
+ } else {
+ result += QLatin1String(" @");
+ result += QString::fromLatin1(item->hexReferencingAddress());
+ }
}
break;
case 2: