Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Khodjaiants2013-09-16 17:17:35 -0400
committerMikhail Khodjaiants2013-09-16 17:17:35 -0400
commit8fd76f3f548e23e4a360da464911d17ccd8a1272 (patch)
tree1858133e013c64a33ee1d9b3c14af4de271ee21f
parentb242f8eb38d4a88495d90508b5ce74f542b57eba (diff)
downloadorg.eclipse.cdt-8fd76f3f548e23e4a360da464911d17ccd8a1272.tar.gz
org.eclipse.cdt-8fd76f3f548e23e4a360da464911d17ccd8a1272.tar.xz
org.eclipse.cdt-8fd76f3f548e23e4a360da464911d17ccd8a1272.zip
Bug 413483 - GDB Hardware Debugging - Memory viewing broken
To avoid introducing a new API in 8.2.1 the memory initialization is added to "stepUpdateContainer".
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence.java53
1 files changed, 34 insertions, 19 deletions
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence.java
index c2487edb66..39532704cb 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence.java
@@ -44,6 +44,7 @@ import org.eclipse.cdt.dsf.concurrent.DsfExecutor;
import org.eclipse.cdt.dsf.concurrent.ImmediateDataRequestMonitor;
import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
import org.eclipse.cdt.dsf.concurrent.RequestMonitorWithProgress;
+import org.eclipse.cdt.dsf.concurrent.Sequence;
import org.eclipse.cdt.dsf.datamodel.DMContexts;
import org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext;
import org.eclipse.cdt.dsf.debug.service.IMemory.IMemoryDMContext;
@@ -175,7 +176,6 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
"stepUpdateContainer", //$NON-NLS-1$
- "stepInitializeMemory", //$NON-NLS-1$
"stepSetArguments", //$NON-NLS-1$
"stepSetEnvironmentVariables", //$NON-NLS-1$
"stepStartTrackingBreakpoints", //$NON-NLS-1$
@@ -470,9 +470,39 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
*/
@Execute
public void stepUpdateContainer(RequestMonitor rm) {
- String groupId = getContainerContext().getGroupId();
- setContainerContext(fProcService.createContainerContextFromGroupId(fCommandControl.getContext(), groupId));
- rm.done();
+ // Temporary fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=413483
+ // to avoid introducing a new API in 8.2.1 the memory initialization is added to
+ // this step.
+ // The proper fix is implemented in 8.2.
+ getExecutor().execute(new Sequence(getExecutor(), rm) {
+
+ @Override
+ public Step[] getSteps() {
+ return new Step[] {
+ new Step() {
+ @Override
+ public void execute(RequestMonitor rm) {
+ String groupId = getContainerContext().getGroupId();
+ setContainerContext(fProcService.createContainerContextFromGroupId(fCommandControl.getContext(), groupId));
+ rm.done();
+ }
+ },
+ new Step() {
+ @Override
+ public void execute(RequestMonitor rm) {
+ IGDBMemory memory = fTracker.getService(IGDBMemory.class);
+ IMemoryDMContext memContext = DMContexts.getAncestorOfType(getContainerContext(), IMemoryDMContext.class);
+ if (memory == null || memContext == null) {
+ rm.done();
+ return;
+ }
+ memory.initializeMemoryData(memContext, rm);
+ };
+ }
+ };
+ }
+
+ });
}
/**
@@ -652,19 +682,4 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
fTracker = null;
requestMonitor.done();
}
-
- /**
- * Initialize the memory service with the data for given process.
- * @since 4.2
- */
- @Execute
- public void stepInitializeMemory(final RequestMonitor rm) {
- IGDBMemory memory = fTracker.getService(IGDBMemory.class);
- IMemoryDMContext memContext = DMContexts.getAncestorOfType(getContainerContext(), IMemoryDMContext.class);
- if (memory == null || memContext == null) {
- rm.done();
- return;
- }
- memory.initializeMemoryData(memContext, rm);
- }
}

Back to the top