Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2014-07-02 22:28:58 +0000
committerEugene Tarassov2014-07-02 22:28:58 +0000
commitb1cffb62554fb3b6eca33caeac7f8ca44f1cc0d0 (patch)
treec1a4f17ea145a88722022f41cd728febdff0d4ed /plugins/org.eclipse.tcf.debug.ui
parentea4289efd4f4919528d566ba02dd7310aecf5784 (diff)
downloadorg.eclipse.tcf-b1cffb62554fb3b6eca33caeac7f8ca44f1cc0d0.tar.gz
org.eclipse.tcf-b1cffb62554fb3b6eca33caeac7f8ca44f1cc0d0.tar.xz
org.eclipse.tcf-b1cffb62554fb3b6eca33caeac7f8ca44f1cc0d0.zip
TCF Debugger: fixed View Memory command for bit-fields
Diffstat (limited to 'plugins/org.eclipse.tcf.debug.ui')
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ViewMemoryCommand.java18
1 files changed, 17 insertions, 1 deletions
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ViewMemoryCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ViewMemoryCommand.java
index b9e8eb1d0..6b9ac6e94 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ViewMemoryCommand.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ViewMemoryCommand.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others.
+ * Copyright (c) 2011, 2014 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -12,6 +12,8 @@ package org.eclipse.tcf.internal.debug.ui.commands;
import java.math.BigInteger;
import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.DebugPlugin;
@@ -108,6 +110,20 @@ public class ViewMemoryCommand extends AbstractActionDelegate {
}
}
if (addr == null) {
+ @SuppressWarnings("unchecked")
+ List<Map<String,Object>> pieces = (List<Map<String,Object>>)val_data.getProperties().get(IExpressions.VAL_PIECES);
+ if (pieces != null) {
+ for (Map<String,Object> props : pieces) {
+ addr = JSON.toBigInteger((Number)props.get("Address"));
+ if (addr != null) {
+ Number n = (Number)props.get("Size");
+ if (n != null) size = n.longValue();
+ break;
+ }
+ }
+ }
+ }
+ if (addr == null) {
byte[] bytes = val_data.getValue();
if (bytes != null && bytes.length > 0) {
addr = TCFNumberFormat.toBigInteger(bytes, val_data.isBigEndian(), false);

Back to the top