Bug 270935 - Inconsistency in Debug Configurations - default debugger settings
Summary: Inconsistency in Debug Configurations - default debugger settings
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 5.0.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-debug-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-02 05:46 EDT by Steffen Schmidt CLA
Modified: 2020-09-04 15:18 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Schmidt CLA 2009-04-02 05:46:42 EDT
Build ID: I20080617-2000

Steps To Reproduce:
1.Choose Debug Configurations dialog
2.Create new C/C++ Local Application
3.Switch to Debugger tab, here "gdb/mi" is pre-selected as default debugger, the debug command set is by default "CygWin"
4. Reselect debugger "gdb/mi", now the default GDB command set changes to "Standard (Windows)", this is unexpected and inconsistent. One can easily miss this configuration change, which can afterwards lead to unexpected behaviour.


More information:
Due to the unexpected switch to the GDB command set "Standard (Windows)" the debugged application will not open a new shell window for its console output. Because of this the applications console output intermingles with GDBs console output.
In some cases this will lead to CDT Debugger ignoring breakpoint events (see bug reports https://bugs.eclipse.org/bugs/show_bug.cgi?id=257374 and https://bugs.eclipse.org/bugs/show_bug.cgi?id=270521).

The source of the configuration inconsistency seems to be the initialization of the launch configuration. After creating a new lauch configuration all settings are stored within a "working copy", nothing is saved yet. After creation this working copy does not have any setting for the "GDB command set". This is why the GUI defaults to the first entry in the alphabetically sorted command set list, which is "CygWin" (see StandardGDBDebuggerPage.initializeFrom()).
When actively selecting "gdb/mi" as debugger the methods AbstractCDebuggerTab.handleDebuggerChanged() and StandardGDBDebuggerPage.setDefaults() are called to set a default for the working copy, which is the first entry of an unsorted list (see CommandFactoryManager.getDefaultDescriptor()) and this is "Standard (Windows)".