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.

Bug 175154 - debug button is disabled if toolchain is GNU
Summary: debug button is disabled if toolchain is GNU
Status: VERIFIED FIXED
Alias: None
Product: third-party
Classification: Unclassified
Component: DBX-Gui (show other bugs)
Version: 6.x
Hardware: Sun All
: P2 blocker (vote)
Assignee: ivan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-21 22:44 UTC by Chihin Ko
Modified: 2009-10-29 02:15 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
stack trace for DbxActionHandlerFactory.canHandle() (1.42 KB, text/plain)
2009-10-22 22:43 UTC, Chihin Ko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chihin Ko 2009-10-21 22:44:34 UTC
For SS  aten ide, create two configuations for project Quote :

  1. GNU_Debug use GNU as the build tool
  2  CC_Debug use Sun CC as Build tool

Chose GNU_Debug as default configuration, then "Debug" and "Step Into" in project context manual are disabled, "Debug"
button in toolbar is disabled.

Switch to CC_Debug as default configuration, then "Debug" and "Step Into" in project context manual are enabled, "Debug"
button in toolbar is still disabled.

Another problem is in Tool Collection, GNU family panel, there is no setup for debugger. We need this for common
debugger, because dbx can debug GNU compiled app.
Comment 1 Thomas Preisler 2009-10-21 23:28:19 UTC
It is not a project issue but a toolchain issue, I think. Reassign to code subcomponent. In Sun Studio (express), who
will be responsible for debugging gnu compiled code? Gdbgui module (which is currently disabled in SS) or dbxgui module?
Assigning to Vladimir V. for evaluation.
Comment 2 Leonid Lenyashin 2009-10-22 07:30:21 UTC
I'm not sure if gdb support is planned for SS EA. I've heard nothing about this.
Comment 3 Vladimir Voskresensky 2009-10-22 08:54:12 UTC
Debugger field is invisible in toolchain panel, because SS hides it => unhide on SS side.
states of buttons is controlled on SS side as well
Comment 4 Thomas Preisler 2009-10-22 18:28:33 UTC
Take a look at this code in dbxgui in DbxActionHandlerFactory:

    @Override
    public boolean canHandle(ProjectActionEvent.Type type, Configuration conf) {
        if (!super.canHandle(type, conf)) {
            return false;
        }
        if (conf instanceof MakeConfiguration) {
            MakeConfiguration mc = (MakeConfiguration)conf;
            final CompilerSet compilerSet = mc.getCompilerSet().getCompilerSet();
            if (compilerSet == null) {
                return false;
            }
            return compilerSet.getTool(Tool.DebuggerTool) instanceof SunDebuggerTool;
        }
        return false;
    }

I believe it needs to recognize GNU tool chain and then the action (button) will get enabled.
Comment 5 Chihin Ko 2009-10-22 22:43:55 UTC
Created attachment 89937 [details]
stack trace for DbxActionHandlerFactory.canHandle()
Comment 6 Chihin Ko 2009-10-22 22:50:25 UTC
I put DbxActionHandlerFactory.canHandle under debugger, "compilerSet" always gets value "SunStudio_12.1",  so even I
added code to support GNUDebuggerTool, thing still does not work. the stack trace of debugger is attched.


        if (conf instanceof MakeConfiguration) {
            MakeConfiguration mc = (MakeConfiguration)conf;
            final CompilerSet compilerSet = mc.getCompilerSet().getCompilerSet();
            if (compilerSet == null) {
                return false;
            }
            return compilerSet.getTool(Tool.DebuggerTool) instanceof SunDebuggerTool ||
                    compilerSet.getTool(Tool.DebuggerTool) instanceof GNUDebuggerTool;
Comment 7 Egor Ushakov 2009-10-23 10:17:02 UTC
fixed in:
http://lessing.sfbay.sun.com/hg/toolshg/rev/d1a0cfbf884b

now DbxActionHandlerFactory handles all debug actions
Comment 8 ivan 2009-10-29 02:15:32 UTC
Verified.