summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Wrighton2013-08-08 12:10:18 (EDT)
committer Marc Khouzam2013-08-08 14:15:43 (EDT)
commit8d97e58dab8415785afc6a464c2c1758cf6e652f (patch)
tree70c5bd0a4410e1a802d396a084e339d877b71ba8
parente8de12d706ce2acd99893158ba44fc2343eafdd4 (diff)
downloadorg.eclipse.cdt-8d97e58dab8415785afc6a464c2c1758cf6e652f.zip
org.eclipse.cdt-8d97e58dab8415785afc6a464c2c1758cf6e652f.tar.gz
org.eclipse.cdt-8d97e58dab8415785afc6a464c2c1758cf6e652f.tar.bz2
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 <mike.wrighton@googlemail.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) {