1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-25 09:55:29 +02:00

Bug 413483 - GDB Hardware Debugging - Memory viewing broken

Signed-off-by: William Riley <william.riley@renesas.com>
This commit is contained in:
William Riley 2013-09-13 16:04:20 -04:00 committed by Mikhail Khodjaiants
parent 92d4b52f22
commit b242f8eb38

View file

@ -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);
}
}