From 2450aa42dad97d68eaf65dfff80eddec3ed245a5 Mon Sep 17 00:00:00 2001 From: Mikhail Khodjaiants Date: Wed, 17 Dec 2003 22:16:41 +0000 Subject: [PATCH] Fix for bug 49061: Different values are used as default for the "Load shared library symbols automatically" option. --- debug/org.eclipse.cdt.debug.mi.core/ChangeLog | 9 +++++++++ .../eclipse/cdt/debug/mi/core/CygwinGDBDebugger.java | 2 +- .../src/org/eclipse/cdt/debug/mi/core/GDBDebugger.java | 4 ++-- .../eclipse/cdt/debug/mi/core/GDBServerDebugger.java | 2 +- .../debug/mi/core/IMILaunchConfigurationConstants.java | 10 ++++++++++ debug/org.eclipse.cdt.debug.mi.ui/ChangeLog | 4 ++++ .../cdt/debug/mi/internal/ui/GDBSolibBlock.java | 10 ++++++---- 7 files changed, 33 insertions(+), 8 deletions(-) diff --git a/debug/org.eclipse.cdt.debug.mi.core/ChangeLog b/debug/org.eclipse.cdt.debug.mi.core/ChangeLog index 823e85a6dcb..9335ed2b604 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/ChangeLog +++ b/debug/org.eclipse.cdt.debug.mi.core/ChangeLog @@ -1,3 +1,12 @@ +2003-12-17 Mikhail Khodjaiants + + Fix for bug 49061: Different values are used as default for the "Load shared library symbols automatically" option. + + * src/org/eclipse/cdt/debug/mi/core/GDBDebugger.java + * src/org/eclipse/cdt/debug/mi/core/GDBServerDebugger.java + * src/org/eclipse/cdt/debug/mi/core/IMILaunchConfigurationConstants.java + * src/org/eclipse/cdt/debug/mi/core/CygwinGDBDebugger.java + 2003-12-16 Mikhail Khodjaiants Show the gdb arguments when tracing. diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/CygwinGDBDebugger.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/CygwinGDBDebugger.java index 2a0673121f6..f6237943426 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/CygwinGDBDebugger.java +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/CygwinGDBDebugger.java @@ -36,7 +36,7 @@ public class CygwinGDBDebugger extends GDBDebugger { if (manager instanceof SharedLibraryManager) { SharedLibraryManager mgr = (SharedLibraryManager) manager; boolean stopOnSolibEvents = - config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_STOP_ON_SOLIB_EVENTS, false); + config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_STOP_ON_SOLIB_EVENTS, IMILaunchConfigurationConstants.DEBUGGER_STOP_ON_SOLIB_EVENTS_DEFAULT); try { mgr.setStopOnSolibEvents(stopOnSolibEvents); // By default, we provide with the capability of deferred breakpoints diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBDebugger.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBDebugger.java index ad8f071fdc8..3bd7630f30c 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBDebugger.java +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBDebugger.java @@ -27,8 +27,8 @@ public class GDBDebugger implements ICDebugger { ICDISharedLibraryManager manager = session.getSharedLibraryManager(); if (manager instanceof SharedLibraryManager) { SharedLibraryManager mgr = (SharedLibraryManager)manager; - boolean autolib = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, false); - boolean stopOnSolibEvents = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_STOP_ON_SOLIB_EVENTS, false); + boolean autolib = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, IMILaunchConfigurationConstants.DEBUGGER_AUTO_SOLIB_DEFAULT); + boolean stopOnSolibEvents = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_STOP_ON_SOLIB_EVENTS, IMILaunchConfigurationConstants.DEBUGGER_STOP_ON_SOLIB_EVENTS_DEFAULT); try { mgr.setAutoLoadSymbols(autolib); mgr.setStopOnSolibEvents(stopOnSolibEvents); diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBServerDebugger.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBServerDebugger.java index c168ee6ded8..826b975b652 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBServerDebugger.java +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBServerDebugger.java @@ -38,7 +38,7 @@ public class GDBServerDebugger implements ICDebugger { try { ICDISharedLibraryManager mgr = session.getSharedLibraryManager(); if (mgr instanceof SharedLibraryManager) { - boolean autolib = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, false); + boolean autolib = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, IMILaunchConfigurationConstants.DEBUGGER_AUTO_SOLIB_DEFAULT); try { ((SharedLibraryManager)mgr).setAutoLoadSymbols(autolib); } catch (CDIException e) { diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/IMILaunchConfigurationConstants.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/IMILaunchConfigurationConstants.java index 5c496aa41d8..3eb9846e862 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/IMILaunchConfigurationConstants.java +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/IMILaunchConfigurationConstants.java @@ -33,4 +33,14 @@ public interface IMILaunchConfigurationConstants { * Launch configuration attribute key. The value is a List (array of String) of directories for the search path of shared libraries. */ public static final String ATTR_DEBUGGER_SOLIB_PATH = MIPlugin.getUniqueIdentifier() + ".SOLIB_PATH"; //$NON-NLS-1$ + + /** + * Launch configuration attribute value. The key is ATTR_DEBUGGER_AUTO_SOLIB. + */ + public static boolean DEBUGGER_AUTO_SOLIB_DEFAULT = true; + + /** + * Launch configuration attribute value. The key is ATTR_DEBUGGER_STOP_ON_SOLIB_EVENTS. + */ + public static boolean DEBUGGER_STOP_ON_SOLIB_EVENTS_DEFAULT = false; } diff --git a/debug/org.eclipse.cdt.debug.mi.ui/ChangeLog b/debug/org.eclipse.cdt.debug.mi.ui/ChangeLog index c5599722f38..d415f650958 100644 --- a/debug/org.eclipse.cdt.debug.mi.ui/ChangeLog +++ b/debug/org.eclipse.cdt.debug.mi.ui/ChangeLog @@ -1,3 +1,7 @@ +2003-12-17 Mikhail Khodjaiants + Fix for bug 49061: Different values are used as default for the "Load shared library symbols automatically" option. + * GDBSolibBlock.java + 2003-12-01 Mikhail Khodjaiants Fix for PR 47230: Need a shared library search path editing capability for GDBServerDebugger. Implemented 'GDBServerDebuggerPage' as an extension of 'GDBDebuggerPage'. diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBSolibBlock.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBSolibBlock.java index e650c43ff72..904d3688394 100644 --- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBSolibBlock.java +++ b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBSolibBlock.java @@ -90,9 +90,9 @@ public class GDBSolibBlock extends Observable implements Observer try { if ( fAutoSoLibButton != null ) - fAutoSoLibButton.setSelection( configuration.getAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, true ) ); + fAutoSoLibButton.setSelection( configuration.getAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, IMILaunchConfigurationConstants.DEBUGGER_AUTO_SOLIB_DEFAULT ) ); if ( fStopOnSolibEventsButton != null ) - fStopOnSolibEventsButton.setSelection( configuration.getAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_STOP_ON_SOLIB_EVENTS, false ) ); + fStopOnSolibEventsButton.setSelection( configuration.getAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_STOP_ON_SOLIB_EVENTS, IMILaunchConfigurationConstants.DEBUGGER_STOP_ON_SOLIB_EVENTS_DEFAULT ) ); initializeButtons( configuration ); updateButtons(); } @@ -124,8 +124,10 @@ public class GDBSolibBlock extends Observable implements Observer { if ( fSolibSearchPathBlock != null ) fSolibSearchPathBlock.setDefaults( configuration ); - configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, true ); - configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_STOP_ON_SOLIB_EVENTS, false ); + configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, + IMILaunchConfigurationConstants.DEBUGGER_AUTO_SOLIB_DEFAULT ); + configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_STOP_ON_SOLIB_EVENTS, + IMILaunchConfigurationConstants.DEBUGGER_STOP_ON_SOLIB_EVENTS_DEFAULT ); } protected void updateButtons()