Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-debug-dev] Wrong status handler for launch error code 10 1: Working directory does not exist

And a patch! :-)

===========================

Chris Recoskie
Team Lead, IBM CDT Team
IBM Toronto
http://www.eclipse.org/cdt



                                                                           
             Doug Schaefer                                                 
             <DSchaefer@xxxxxx                                             
             m>                                                         To 
             Sent by:                  CDT Debug developers list           
             cdt-debug-dev-bou         <cdt-debug-dev@xxxxxxxxxxx>         
             nces@xxxxxxxxxxx                                           cc 
                                                                           
                                                                   Subject 
             18/04/2007 09:03          RE: [cdt-debug-dev] Wrong status    
             AM                        handler for launch error code 10    
                                       1: Working directory does not exist 
                                                                           
             Please respond to                                             
                 CDT Debug                                                 
              developers list                                              
             <cdt-debug-dev@ec                                             
                lipse.org>                                                 
                                                                           
                                                                           




Sounds like a great candidate for a bug report.
http://bugs.eclipse.org/bugs.

Cheers,
Doug Schaefer, QNX Software Systems
Eclipse CDT Project Lead, http://cdtdoug.blogspot.com

From: cdt-debug-dev-bounces@xxxxxxxxxxx
[mailto:cdt-debug-dev-bounces@xxxxxxxxxxx] On Behalf Of Abeer Bagul
Sent: Wednesday, April 18, 2007 7:38 AM
To: cdt-debug-dev@xxxxxxxxxxx
Subject: [cdt-debug-dev] Wrong status handler for launch error code 101:
Working directory does not exist

Hi All,

The plugin org.eclipse.cdt.debug.core defines an error code
ICDTLaunchConfigurationConstants.ERR_WORKING_DIRECTORY_DOES_NOT_EXIST with
the value 101.
Another plugin org.eclipse.cdt.launch contributes a status handler to this
error code through its plugin.xml file like so:
  <extension
        point="org.eclipse.debug.core.statusHandlers">
     statusHandler
           code="101"
           plugin="org.eclipse.cdt.launch"
           class="org.eclipse.cdt.launch.internal.ui.CoreFilePrompter"
           id="org.eclipse.cdt.launch.statusHandler.coreFilePrompter">
     </statusHandler>    </extension>

However, the status handler class handles errors where user has not
specified a core dump file for post mortem debug (status code 108:
ICDTLaunchConfigurationConstants.ERR_NO_COREFILE). Thus there is a mismatch
between the functionality of the status code and the status handler. Due to
this, when the user enters an invalid path for the working directory, the
launch fails, but the user never gets to see the error dialog which
displays the message: "Working directory does not exist". The reason why
the launch does not display the error message dialog is that the status
object is handed off to the contributed status handler. Due to the
mismatch, there is a ClassCastException in the status handler code and the
launch fails silently. Changing the status code of the status handler
contribution in the plugin.xml exposes the correct error message to the
user.

I think the status handler is meant for the status code 108:
ICDTLaunchConfigurationConstants.ERR_NO_COREFILE

Thanks
Abeer
Tensilica Technologies India_______________________________________________
cdt-debug-dev mailing list
cdt-debug-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-debug-dev




Back to the top