From 8d597138b3250cabf7f4fe80d5e034fe4f9547cf Mon Sep 17 00:00:00 2001 From: Mikhail Khodjaiants Date: Thu, 1 Mar 2007 12:28:14 +0000 Subject: [PATCH] Bug 164994: For post-mortem debugging new launch configuration is not initialized properly. Applied patch from Alex Chapiro, QNX. --- .../eclipse/cdt/launch/ui/CoreFileDebuggerTab.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CoreFileDebuggerTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CoreFileDebuggerTab.java index 9f9e9cb2633..ad54438a096 100644 --- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CoreFileDebuggerTab.java +++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CoreFileDebuggerTab.java @@ -20,6 +20,8 @@ import org.eclipse.cdt.core.model.ICElement; import org.eclipse.cdt.debug.core.CDebugCorePlugin; import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants; import org.eclipse.cdt.debug.core.ICDebugConfiguration; +import org.eclipse.cdt.debug.ui.CDebugUIPlugin; +import org.eclipse.cdt.debug.ui.ICDebuggerPage; import org.eclipse.cdt.launch.internal.ui.AbstractCDebuggerTab; import org.eclipse.cdt.launch.internal.ui.LaunchMessages; import org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin; @@ -58,6 +60,17 @@ public class CoreFileDebuggerTab extends AbstractCDebuggerTab { public void setDefaults(ILaunchConfigurationWorkingCopy config) { config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE, ICDTLaunchConfigurationConstants.DEBUGGER_MODE_CORE); + ICDebugConfiguration dc = CDebugCorePlugin.getDefault().getDefaultDebugConfiguration(); + if (dc != null) { + String id = dc.getID(); + config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ID, id); + try { + ICDebuggerPage tab = CDebugUIPlugin.getDefault().getDebuggerPage(id); + tab.setDefaults(config); + } catch (CoreException e) { + LaunchUIPlugin.errorDialog(LaunchMessages.getString("AbstractCDebuggerTab.ErrorLoadingDebuggerPage"), e.getStatus()); //$NON-NLS-1$ + } + } } /*