This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Please review Project Properties. In 6.5 it contained section "Debugging", now it's named "Gdb Debugger" to emphasize particular type of debugger. IMO it would be better to call this section "Debug" to keep common style in naming (General, Build, Run, Debug) and create subsections for each kind of debugger. "Debug" section itself should contain at least one combobox with a name of currently selected debugger like we have for "Tool Collection" in "Build" section.
I agree that "Debug" is a better name than "Gdb debugger" plus we have a "Tool" field already.
"Gdb Debugger" renamed to "Debugger" in: http://hg.netbeans.org/main/rev/04c3433da049
Renamed to simple "Debug" in: http://hg.netbeans.org/main/rev/a54ca12201a4
verified in Build 200902050256
verified
The intent of this was to support multiple C/C++ debuggers. In cases where only a single C/C++ module existed, it should display "Debug" (this part never got implemented). But in cases where multiple C/C++ debuggers co-exist, it needs something more generic than "Debug" or "Debugger" (hence the "Gdb Debugger" label it originally had). I'm doing some work on multiple debuggers for a 3rd party and when I have 2 debuggers I get 2 "Debug" nodes. I'm reopening this issue because it needs to correctly support multiple C/C++ debugger (and still work correctly when only a single debugger is installed). Note: I've got a script which creates a cnd.debugger.gdb2 module from cnd.debugger.gdb. I can attach it to this issue if desired. While production netbeans won't ever have 2 gdb modules, its the easiest way to develop/test with multiple debuggers.
I have a fix which I can commit if desired. If a single C/C++ debugger is registered then it behaves as it currently does and shows a single "Debug" node on the left with the expected properties when its selected. If multiple C/C++ debuggers are registered then it shows the Debugger Chooser node (this is existing behavior but you won't see it without multiple debuggers). This chooser has a subnode for each debugger. The subnodes use the display name of the customizer ("Gdb Debugger", "Gdb2 Debugger", and possible "Dbx debugger"). In addition, the chooser has a property which lets you choose which debugger is the active one (again, this is existing functionality which you can't see without multiple debuggers). I'm CC'ing Thomas as most of the changes are in cnd.makeproject. The only gdb change is to change the label back to "Gdb Debugger", but its not seen unless needed to remove ambiguity. This change (or a similar one) is needed for MC (I don't think I can put their name in the issue, but Thomas knows who they are).
I still do not understand why should we have several debug sections in project properties... Project can have only one toolchain active hence only one debugger which we show in debug section. Isn't it true?
You already have cases where it makes sense for a toolchain to support multiple debuggers. Both GNU and SunStudio toolchains work with gdb in NetBeans and dbx in Sun Studio. While both are good debuggers, why not let the user decide which to use?
Gordon, please look carefully at the original description. I propose to have two (or more if we find more suitable debuggers) subsections (child nodes) within "Debug" section. And "Debug" section itself will contain a combobox where a user can select what debugger should be used for the project ans some common debugger options. GDB subsection will contain GDB specific options and DBX subsection will contain DBX settings: | - o Run | [-]-o Debug | |-o GDB | |-o DBX | -o Required Projects
Alexander, what you're showing is pretty much what I have (for multiple debugger): | - o Run | [-]-o Debuggers | |-o Gdb2 Debugger | |-o Gdb Debugger | -o Required Projects The "Debuggers" node displays a single property "Debugger Chooser" which is a dropdown showing "Gdb2 Debugger" and "Gdb Debugger". If you replace Gdb2 with Dbx you'll pretty much have what you'd expect with both gdb and dbx modules. I do display differently if there is only a single debugger. In that case, its unchanged from 6.5. A single "Debug" node (with no subnodes nor the Debugger Chooser property) and the properties are the same as the current gdb properties ("Tool" and "Array Repeat Threshold").
Created attachment 77181 [details] First patch
Created attachment 77182 [details] Seond patch
Created attachment 77183 [details] mkgdb2 script
Created attachment 77184 [details] rmgdb2 script
Attached 2 patches per Thomas' request. The 1st patch is more for debugging multi-debuggers. The 2nd patch is the proposed fix. I've also attached my mkgdb2 and rmgdb2 scripts. These make a 2nd debugger (cnd.debugger.gdb2) from the cnd.debugger.gdb module. (Its hard to debug/test 2 debuggers if you can't make a 2nd one:-) The scripts both assume an environment variable called "WStop" is the path of the netbeans source tree. Since these were originally private scripts, the scripts silently do nothing if this var isn't set. These were used in a Windows/Cygwin environment but should work on Solaris or Linux. I had similar scripts in /home/gordonp/.bin when I was RIF'ed, but I don't know if those are still available. Those were much better tested...
As a 'Debugger Command' is a part of toolchain then we can expect it will just contain a path to Dbx and therefore we can use a 'toolchain' selector instead of 'debugger' selector in "Debug" section in the project properties or even non-editable (information) field showing which debugger is contained in current toolchain (selected in "Build" section). At the same time I believe that "Debug" section should always contain both debugger subnodes. It will show that we support both (Gdb and Dbx) debuggers and these subnodes will show possible options for each debugger.
I'm not sure why you made this a task and chaged 151788 from task to defect. This issue resolves one specific issue about making C/C++ debuggers coexist. On the other hand, 151788 is generic and could be used to track multiple issues which each add to mulitple debugger support. If you do want this to be the task, you should probably make it depend on 163524.
fixed with: http://hg.netbeans.org/cnd-main?cmd=changeset;node=0760e431d971 now we show only properties of active toolchain debugger