summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Riley2013-09-13 16:04:20 (EDT)
committer Mikhail Khodjaiants2013-09-16 11:01:57 (EDT)
commitb242f8eb38d4a88495d90508b5ce74f542b57eba (patch)
tree4f2933e01c6ff11e51234c69978d4aa2896e271e
parent92d4b52f221bc5ef8be24854e2a3d0e517b094d5 (diff)
downloadorg.eclipse.cdt-b242f8eb38d4a88495d90508b5ce74f542b57eba.zip
org.eclipse.cdt-b242f8eb38d4a88495d90508b5ce74f542b57eba.tar.gz
org.eclipse.cdt-b242f8eb38d4a88495d90508b5ce74f542b57eba.tar.bz2
Bug 413483 - GDB Hardware Debugging - Memory viewing broken
Signed-off-by: William Riley <william.riley@renesas.com>
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence.java21
1 files changed, 20 insertions, 1 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 3e2b4a0..c2487ed 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 - 2011 QNX Software Systems and others.
+ * Copyright (c) 2007 - 2013 QNX Software Systems 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
@@ -13,6 +13,7 @@
* connections via serial ports and pipes).
* John Dallaway - Wrong groupId during initialization (Bug 349736)
* Marc Khouzam (Ericsson) - Updated to extend FinalLaunchSequence instead of copying it (bug 324101)
+ * William Riley (Renesas) - Memory viewing broken (Bug 413483)
*******************************************************************************/
package org.eclipse.cdt.debug.gdbjtag.core;
@@ -45,9 +46,11 @@ import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
import org.eclipse.cdt.dsf.concurrent.RequestMonitorWithProgress;
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;
import org.eclipse.cdt.dsf.gdb.launching.FinalLaunchSequence;
import org.eclipse.cdt.dsf.gdb.launching.GdbLaunch;
import org.eclipse.cdt.dsf.gdb.service.IGDBBackend;
+import org.eclipse.cdt.dsf.gdb.service.IGDBMemory;
import org.eclipse.cdt.dsf.gdb.service.SessionType;
import org.eclipse.cdt.dsf.gdb.service.command.IGDBControl;
import org.eclipse.cdt.dsf.mi.service.IMIContainerDMContext;
@@ -172,6 +175,7 @@ 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$
@@ -648,4 +652,19 @@ 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);
+ }
}