mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-23 16:23:52 +02:00
Bug 413483 - GDB Hardware Debugging - Memory viewing broken
The memory initialization is moved to "stepUpdateContainer" to avoid introducing a new API in 8.2.1.
This commit is contained in:
parent
0e36772a55
commit
82409f57c0
1 changed files with 11 additions and 33 deletions
|
@ -44,7 +44,6 @@ 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;
|
||||
|
@ -470,39 +469,18 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
|
|||
*/
|
||||
@Execute
|
||||
public void stepUpdateContainer(RequestMonitor rm) {
|
||||
// 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) {
|
||||
String groupId = getContainerContext().getGroupId();
|
||||
setContainerContext(fProcService.createContainerContextFromGroupId(fCommandControl.getContext(), groupId));
|
||||
|
||||
@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);
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
});
|
||||
// Temporary fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=413483
|
||||
// Initialize memory in this step to avoid adding new API.
|
||||
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