summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Wrighton2013-08-08 12:10:18 (EDT)
committerMarc Khouzam2013-08-08 14:15:35 (EDT)
commitd54431f7eb2abf30453d5590bca6993ce52ca8dd (patch)
tree6f39d225d2b180bd67a255e3998a242c17a8dc05
parent0fafbd1f91a9db2f9746ac718488427de0afcff8 (diff)
downloadorg.eclipse.cdt-d54431f7eb2abf30453d5590bca6993ce52ca8dd.zip
org.eclipse.cdt-d54431f7eb2abf30453d5590bca6993ce52ca8dd.tar.gz
org.eclipse.cdt-d54431f7eb2abf30453d5590bca6993ce52ca8dd.tar.bz2
Bug 376105 - "Add watchpoint (C/C++)" context menu option from memoryrefs/changes/81/15181/5
view does not add an asterisk before the memory address value. Change-Id: If6658135a06f6d67a7306595a874938e96956a3d Signed-off-by: Mike Wrighton <mike.wrighton@googlemail.com> Reviewed-on: https://git.eclipse.org/r/15181 Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com> IP-Clean: Marc Khouzam <marc.khouzam@ericsson.com> Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpoints.java6
1 files changed, 6 insertions, 0 deletions
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 277e2bd..3b64690 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<MIBreakInsertInfo> addWatchpointDRM =
new DataRequestMonitor<MIBreakInsertInfo>(getExecutor(), drm) {