Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TEGdbAbstractLaunchDelegate.java')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TEGdbAbstractLaunchDelegate.java21
1 files changed, 14 insertions, 7 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TEGdbAbstractLaunchDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TEGdbAbstractLaunchDelegate.java
index f22ea9820..674aec519 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TEGdbAbstractLaunchDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TEGdbAbstractLaunchDelegate.java
@@ -234,6 +234,7 @@ public abstract class TEGdbAbstractLaunchDelegate extends GdbLaunchDelegate {
}
}
+
/* (non-Javadoc)
* @see org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate#launchDebugSession(org.eclipse.debug.core.ILaunchConfiguration, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor)
*/
@@ -250,19 +251,25 @@ public abstract class TEGdbAbstractLaunchDelegate extends GdbLaunchDelegate {
if (l instanceof GdbLaunch && exePath != null) {
final GdbLaunch launch = (GdbLaunch) l;
final DsfExecutor executor = launch.getDsfExecutor();
- final DsfServicesTracker tracker = new DsfServicesTracker(Activator.getDefault().getBundle().getBundleContext(), launch.getSession().getId());
executor.execute(new DsfRunnable() {
@Override
public void run() {
- IGDBControl commandControl = tracker.getService(IGDBControl.class);
- CommandFactory commandFactory = tracker.getService(IMICommandControl.class).getCommandFactory();
-
- commandControl.queueCommand(
- commandFactory.createMIFileSymbolFile(commandControl.getContext(), exePath.toString()),
- new ImmediateDataRequestMonitor<MIInfo>());
+ DsfServicesTracker tracker = new DsfServicesTracker(Activator.getDefault().getBundle().getBundleContext(), launch.getSession().getId());
+
+ try {
+ IGDBControl commandControl = tracker.getService(IGDBControl.class);
+ CommandFactory commandFactory = tracker.getService(IMICommandControl.class).getCommandFactory();
+
+ commandControl.queueCommand(
+ commandFactory.createMIFileSymbolFile(commandControl.getContext(), exePath.toString()),
+ new ImmediateDataRequestMonitor<MIInfo>());
+ } finally {
+ tracker.dispose();
+ }
}
});
+
}
}

Back to the top