Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2022-04-17 20:24:07 +0000
committerEugene Tarassov2022-04-18 00:55:00 +0000
commit898e14ccac1b35ad1238b4a35cb3f8383a568b6b (patch)
treec756b9d7f275a806601cc6830ac8b1282647b336
parent3c88a885920fdbe4a7b0a604e103b7889bc4bbb4 (diff)
downloadorg.eclipse.tcf-master.tar.gz
org.eclipse.tcf-master.tar.xz
org.eclipse.tcf-master.zip
Bug 579678 - [Disassembly] Wrong disassembly for thread context when the execution mode is different for two threadsHEADmaster
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/disassembly/TCFDisassemblyBackend.java30
1 files changed, 14 insertions, 16 deletions
diff --git a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/disassembly/TCFDisassemblyBackend.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/disassembly/TCFDisassemblyBackend.java
index 7f0f91074..8f78bbe34 100644
--- a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/disassembly/TCFDisassemblyBackend.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/disassembly/TCFDisassemblyBackend.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010-2021 Wind River Systems, Inc. and others.
+ * Copyright (c) 2010-2022 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 2.0
* which accompanies this distribution, and is available at
@@ -203,15 +203,13 @@ public class TCFDisassemblyBackend extends AbstractDisassemblyBackend {
@Override
public void changed(String context_id) {
- if (fMemoryContext == null)
- return;
- if (!fMemoryContext.getID().equals(context_id))
- return;
- if (fCallback == null)
- return;
+ if (fMemoryContext == null) return;
+ if (!fMemoryContext.getID().equals(context_id)) return;
+ if (fCallback == null) return;
try {
fCallback.getClass().getMethod("refresh").invoke(fCallback);
- } catch (Exception e) {
+ }
+ catch (Exception e) {
}
}
}
@@ -232,15 +230,13 @@ public class TCFDisassemblyBackend extends AbstractDisassemblyBackend {
@Override
public void memoryChanged(String context_id, Number[] addr, long[] size) {
- if (fMemoryContext == null)
- return;
- if (!fMemoryContext.getID().equals(context_id))
- return;
- if (fCallback == null)
- return;
+ if (fMemoryContext == null) return;
+ if (!fMemoryContext.getID().equals(context_id)) return;
+ if (fCallback == null) return;
try {
fCallback.getClass().getMethod("refresh").invoke(fCallback);
- } catch (Exception e) {
+ }
+ catch (Exception e) {
}
}
}
@@ -654,7 +650,9 @@ public class TCFDisassemblyBackend extends AbstractDisassemblyBackend {
if (!done_disassembly) {
Map<String, Object> params = new HashMap<String, Object>();
- disass.disassemble(mem.getID(), startAddress, accessSize, params, new DoneDisassemble() {
+ /* Use thread, not memory context, to allow disassembler to check CPU mode. */
+ /* It can improve disassembler accuracy, at least around current PC. */
+ disass.disassemble(request.ctx.getID(), startAddress, accessSize, params, new DoneDisassemble() {
@Override
public void doneDisassemble(IToken token, final Throwable error, IDisassemblyLine[] res) {
if (error != null) {

Back to the top