mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-03 23:25:26 +02:00
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".
This commit is contained in:
parent
b242f8eb38
commit
8fd76f3f54
1 changed files with 34 additions and 19 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue