Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2012-10-15 07:29:17 +0000
committerEugene Tarassov2012-10-15 07:30:00 +0000
commit760a21a8636bc1e3521bcbd6abd6ae1fb37c27c6 (patch)
tree3482d22be4287bf23e89ef7335f5606442b4d785 /plugins/org.eclipse.tcf.debug.ui
parent8ecf00a5cdbd4f4bda8fd04eb36d06e9d8953112 (diff)
downloadorg.eclipse.tcf-760a21a8636bc1e3521bcbd6abd6ae1fb37c27c6.tar.gz
org.eclipse.tcf-760a21a8636bc1e3521bcbd6abd6ae1fb37c27c6.tar.xz
org.eclipse.tcf-760a21a8636bc1e3521bcbd6abd6ae1fb37c27c6.zip
TCF Debugger: fixed pin and refresh actions for memory mapped registers
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/model/TCFNodeRegister.java17
1 files changed, 12 insertions, 5 deletions
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeRegister.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeRegister.java
index ee74d77b4..91824dad6 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeRegister.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeRegister.java
@@ -39,6 +39,7 @@ import org.eclipse.tcf.internal.debug.ui.ImageCache;
import org.eclipse.tcf.protocol.IToken;
import org.eclipse.tcf.protocol.JSON;
import org.eclipse.tcf.services.IRegisters;
+import org.eclipse.tcf.services.IRunControl;
import org.eclipse.tcf.util.TCFDataCache;
import org.eclipse.tcf.util.TCFTask;
@@ -203,10 +204,15 @@ public class TCFNodeRegister extends TCFNode implements IElementEditor, IWatchIn
}
else if (p instanceof TCFNodeExecContext) {
TCFNodeExecContext exe = (TCFNodeExecContext)p;
- TCFDataCache<TCFContextState> state_cache = exe.getState();
- if (!state_cache.validate(done)) return null;
- TCFContextState state = state_cache.getData();
- if (state == null || !state.is_suspended) return true;
+ TCFDataCache<IRunControl.RunControlContext> ctx_cache = exe.getRunContext();
+ if (!ctx_cache.validate(done)) return null;
+ IRunControl.RunControlContext ctx_data = ctx_cache.getData();
+ if (ctx_data != null && ctx_data.hasState()) {
+ TCFDataCache<TCFContextState> state_cache = exe.getState();
+ if (!state_cache.validate(done)) return null;
+ TCFContextState state_data = state_cache.getData();
+ if (state_data == null || !state_data.is_suspended) return true;
+ }
}
return false;
}
@@ -228,7 +234,8 @@ public class TCFNodeRegister extends TCFNode implements IElementEditor, IWatchIn
Number addr = ctx.getMemoryAddress();
if (addr != null) {
bf.append("Address: ", SWT.BOLD);
- bf.append(JSON.toBigInteger(addr).toString(16));
+ bf.append("0x", StyledStringBuffer.MONOSPACED);
+ bf.append(JSON.toBigInteger(addr).toString(16), StyledStringBuffer.MONOSPACED);
}
if (ctx.isReadable()) {
if (l < bf.length()) bf.append(", ");

Back to the top