|
Lines 26-31
Link Here
|
| 26 |
import org.eclipse.cdt.dsf.datamodel.DataModelInitializedEvent; |
26 |
import org.eclipse.cdt.dsf.datamodel.DataModelInitializedEvent; |
| 27 |
import org.eclipse.cdt.dsf.datamodel.IDMContext; |
27 |
import org.eclipse.cdt.dsf.datamodel.IDMContext; |
| 28 |
import org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext; |
28 |
import org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext; |
|
|
29 |
import org.eclipse.cdt.dsf.debug.service.IProcesses.IProcessDMContext; |
| 29 |
import org.eclipse.cdt.dsf.debug.service.ISourceLookup.ISourceLookupDMContext; |
30 |
import org.eclipse.cdt.dsf.debug.service.ISourceLookup.ISourceLookupDMContext; |
| 30 |
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; |
31 |
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; |
| 31 |
import org.eclipse.cdt.dsf.gdb.IGdbDebugPreferenceConstants; |
32 |
import org.eclipse.cdt.dsf.gdb.IGdbDebugPreferenceConstants; |
|
Lines 37-42
Link Here
|
| 37 |
import org.eclipse.cdt.dsf.gdb.service.SessionType; |
38 |
import org.eclipse.cdt.dsf.gdb.service.SessionType; |
| 38 |
import org.eclipse.cdt.dsf.gdb.service.command.IGDBControl; |
39 |
import org.eclipse.cdt.dsf.gdb.service.command.IGDBControl; |
| 39 |
import org.eclipse.cdt.dsf.mi.service.CSourceLookup; |
40 |
import org.eclipse.cdt.dsf.mi.service.CSourceLookup; |
|
|
41 |
import org.eclipse.cdt.dsf.mi.service.IMIContainerDMContext; |
| 40 |
import org.eclipse.cdt.dsf.mi.service.IMIProcesses; |
42 |
import org.eclipse.cdt.dsf.mi.service.IMIProcesses; |
| 41 |
import org.eclipse.cdt.dsf.mi.service.MIBreakpointsManager; |
43 |
import org.eclipse.cdt.dsf.mi.service.MIBreakpointsManager; |
| 42 |
import org.eclipse.cdt.dsf.mi.service.command.CommandFactory; |
44 |
import org.eclipse.cdt.dsf.mi.service.command.CommandFactory; |
|
Lines 64-70
Link Here
|
| 64 |
private CommandFactory fCommandFactory; |
66 |
private CommandFactory fCommandFactory; |
| 65 |
|
67 |
|
| 66 |
private DsfServicesTracker fTracker; |
68 |
private DsfServicesTracker fTracker; |
| 67 |
|
69 |
private IMIContainerDMContext fInitialContainerCtx; |
|
|
70 |
|
| 68 |
public FinalLaunchSequence(DsfExecutor executor, GdbLaunch launch, SessionType sessionType, boolean attach, IProgressMonitor pm) { |
71 |
public FinalLaunchSequence(DsfExecutor executor, GdbLaunch launch, SessionType sessionType, boolean attach, IProgressMonitor pm) { |
| 69 |
super(executor, pm, LaunchMessages.getString("FinalLaunchSequence.0"), LaunchMessages.getString("FinalLaunchSequence.1")); //$NON-NLS-1$ //$NON-NLS-2$ |
72 |
super(executor, pm, LaunchMessages.getString("FinalLaunchSequence.0"), LaunchMessages.getString("FinalLaunchSequence.1")); //$NON-NLS-1$ //$NON-NLS-2$ |
| 70 |
fLaunch = launch; |
73 |
fLaunch = launch; |
|
Lines 131-136
Link Here
|
| 131 |
return; |
134 |
return; |
| 132 |
} |
135 |
} |
| 133 |
|
136 |
|
|
|
137 |
// We can cheat a little. Since we know GDB starts off focused on the one |
| 138 |
// groupId it automatically created, we can simply create a container with the 'null' |
| 139 |
// groupId, which will get ignored and will use the process currently in focus. |
| 140 |
IProcessDMContext procCtx = fProcService.createProcessContext(fCommandControl.getContext(), null); |
| 141 |
fInitialContainerCtx = fProcService.createContainerContext(procCtx, null); |
| 142 |
|
| 134 |
requestMonitor.done(); |
143 |
requestMonitor.done(); |
| 135 |
} |
144 |
} |
| 136 |
|
145 |
|
|
Lines 285-291
Link Here
|
| 285 |
final IPath execPath = fGDBBackend.getProgramPath(); |
294 |
final IPath execPath = fGDBBackend.getProgramPath(); |
| 286 |
if (!noFileCommand && execPath != null && !execPath.isEmpty()) { |
295 |
if (!noFileCommand && execPath != null && !execPath.isEmpty()) { |
| 287 |
fCommandControl.queueCommand( |
296 |
fCommandControl.queueCommand( |
| 288 |
fCommandFactory.createMIFileExecAndSymbols(fCommandControl.getContext(), |
297 |
fCommandFactory.createMIFileExecAndSymbols(fInitialContainerCtx, |
| 289 |
execPath.toPortableString()), |
298 |
execPath.toPortableString()), |
| 290 |
new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor)); |
299 |
new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor)); |
| 291 |
} else { |
300 |
} else { |
|
Lines 670-681
Link Here
|
| 670 |
public void stepStartTrackingBreakpoints(final RequestMonitor requestMonitor) { |
679 |
public void stepStartTrackingBreakpoints(final RequestMonitor requestMonitor) { |
| 671 |
if (fSessionType != SessionType.CORE) { |
680 |
if (fSessionType != SessionType.CORE) { |
| 672 |
MIBreakpointsManager bpmService = fTracker.getService(MIBreakpointsManager.class); |
681 |
MIBreakpointsManager bpmService = fTracker.getService(MIBreakpointsManager.class); |
| 673 |
IBreakpointsTargetDMContext breakpointDmc = (IBreakpointsTargetDMContext)fCommandControl.getContext(); |
682 |
//IBreakpointsTargetDMContext breakpointDmc = (IBreakpointsTargetDMContext)fCommandControl.getContext(); |
|
|
683 |
IBreakpointsTargetDMContext breakpointDmc = fInitialContainerCtx; |
| 674 |
|
684 |
|
| 675 |
bpmService.startTrackingBreakpoints(breakpointDmc, requestMonitor); |
685 |
bpmService.startTrackingBreakpoints(breakpointDmc, requestMonitor); |
| 676 |
} else { |
686 |
} else { |
| 677 |
requestMonitor.done(); |
687 |
requestMonitor.done(); |
| 678 |
} |
688 |
} |
|
|
689 |
|
| 679 |
} |
690 |
} |
| 680 |
|
691 |
|
| 681 |
/** |
692 |
/** |
|
Lines 712-716
Link Here
|
| 712 |
fTracker = null; |
723 |
fTracker = null; |
| 713 |
requestMonitor.done(); |
724 |
requestMonitor.done(); |
| 714 |
} |
725 |
} |
|
|
726 |
|
| 727 |
protected IMIContainerDMContext getInitialContainerContext(){ |
| 728 |
return fInitialContainerCtx; |
| 729 |
} |
| 715 |
} |
730 |
} |
| 716 |
|
731 |
|