From d54431f7eb2abf30453d5590bca6993ce52ca8dd Mon Sep 17 00:00:00 2001 From: Mike Wrighton Date: Thu, 8 Aug 2013 11:10:18 -0500 Subject: [PATCH] Bug 376105 - "Add watchpoint (C/C++)" context menu option from memory view does not add an asterisk before the memory address value. Change-Id: If6658135a06f6d67a7306595a874938e96956a3d Signed-off-by: Mike Wrighton Reviewed-on: https://git.eclipse.org/r/15181 Reviewed-by: Marc Khouzam IP-Clean: Marc Khouzam Tested-by: Marc Khouzam --- .../src/org/eclipse/cdt/dsf/mi/service/MIBreakpoints.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpoints.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpoints.java index 277e2bda924..3b646900305 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpoints.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpoints.java @@ -7,6 +7,7 @@ * * Contributors: * Ericsson - Initial API and implementation + * Mike Wrighton (Mentor Graphics) - Formatting address for a watchpoint (Bug 376105) *******************************************************************************/ package org.eclipse.cdt.dsf.mi.service; @@ -736,6 +737,11 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints, I boolean isRead = (Boolean) getProperty(attributes, READ, false); boolean isWrite = (Boolean) getProperty(attributes, WRITE, false); + if (expression.length() > 0 && Character.isDigit(expression.charAt(0))) { + // If expression is an address, we need the '*' prefix. + expression = "*" + expression; //$NON-NLS-1$ + } + // The DataRequestMonitor for the add request DataRequestMonitor addWatchpointDRM = new DataRequestMonitor(getExecutor(), drm) {