Skip to main content
summaryrefslogtreecommitdiffstats
path: root/dsf
diff options
context:
space:
mode:
authorTeodor Madan2015-06-30 11:51:11 -0400
committerGerrit Code Review @ Eclipse.org2015-07-01 09:14:42 -0400
commita740576b7894c64261ad3ce56045e7fb6a1af506 (patch)
tree3475be646dc58ef5bb936f599b397359d4d20b84 /dsf
parent6c203657df3eba5b3da3c9cfae41d5f0167b6dd5 (diff)
downloadorg.eclipse.cdt-a740576b7894c64261ad3ce56045e7fb6a1af506.tar.gz
org.eclipse.cdt-a740576b7894c64261ad3ce56045e7fb6a1af506.tar.xz
org.eclipse.cdt-a740576b7894c64261ad3ce56045e7fb6a1af506.zip
Bug 456958 Disassembly view sometimes doesn't update after stepping
instructions - set update pending to false when received a late disasm result and no context is available. - add some trace messages helping trace the issue Change-Id: Ia0a98ef283e871d12de4f50bad89a8d2f4e4c887 Signed-off-by: Teodor Madan <teodor.madan@freescale.com>
Diffstat (limited to 'dsf')
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyBackendDsf.java28
1 files changed, 26 insertions, 2 deletions
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyBackendDsf.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyBackendDsf.java
index 8d5fc6beb2..9315de6c17 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyBackendDsf.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyBackendDsf.java
@@ -21,6 +21,7 @@ import static org.eclipse.cdt.debug.internal.ui.disassembly.dsf.DisassemblyUtils
import static org.eclipse.cdt.debug.internal.ui.disassembly.dsf.DisassemblyUtils.internalError;
import java.math.BigInteger;
+import java.text.MessageFormat;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.TimeUnit;
@@ -175,7 +176,10 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
if (!dsfSessionId.equals(fDsfSessionId)) {
// switch to different session or initiate session
- if (DEBUG) System.out.println("DisassemblyBackendDsf() " + dsfSessionId); //$NON-NLS-1$
+ if (DEBUG) {
+ System.out.println(MessageFormat.format("DisassemblyBackendDsf: switch session [{0}<<{1}]. Input context={2}", dsfSessionId, //$NON-NLS-1$
+ fDsfSessionId, dmContext));
+ }
fTargetContext= null;
fTargetFrameContext = null;
result.contextChanged = true;
@@ -257,7 +261,11 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
fTargetFrameContext = null;
result.contextChanged = true;
}
-
+ if (DEBUG) {
+ System.out.println(MessageFormat.format(
+ "DisassemblyBackendDsf: switch session done [id={0};context={1};\n\t\t\tframe={2}].\n\t\t\tInput context={3}", //$NON-NLS-1$
+ fDsfSessionId, fTargetContext, fTargetFrameContext, dmContext));
+ }
return result;
}
@@ -669,6 +677,14 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
private boolean insertDisassembly(BigInteger startAddress, BigInteger endAddress, IInstruction[] instructions, boolean showSymbols, boolean showDisassembly) {
if (!fCallback.hasViewer() || fDsfSessionId == null || fTargetContext == null) {
+ if (DEBUG) {
+ System.out.println(MessageFormat.format(
+ "insertDisassembly ignored at {0} due to missing context: [fDsfSessionId={1};fTargetContext={2}]", //$NON-NLS-1$
+ DisassemblyUtils.getAddressText(startAddress), fDsfSessionId, fTargetContext));
+ }
+ if (fTargetContext == null) {
+ fCallback.setUpdatePending(false);
+ }
// return true to avoid a retry
return true;
}
@@ -788,6 +804,14 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
*/
private boolean insertDisassembly(BigInteger startAddress, BigInteger endAddress, IMixedInstruction[] mixedInstructions, boolean showSymbols, boolean showDisassembly) {
if (!fCallback.hasViewer() || fDsfSessionId == null || fTargetContext == null) {
+ if (DEBUG) {
+ System.out.println(MessageFormat.format(
+ "insertDisassembly ignored at {0} : missing context: [fDsfSessionId={1};fTargetContext={2}]", //$NON-NLS-1$
+ DisassemblyUtils.getAddressText(startAddress), fDsfSessionId, fTargetContext));
+ }
+ if (fTargetContext == null) {
+ fCallback.setUpdatePending(false);
+ }
// return true to avoid a retry
return true;
}

Back to the top