Bug 365260 - The gdb.exe does not exit when some errors happen during start a debug.
Summary: The gdb.exe does not exit when some errors happen during start a debug.
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 8.1.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-30 21:56 EST by yuyin 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 yuyin CLA 2011-11-30 21:56:10 EST
Build Identifier: 20100617-1415

org.eclipse.core.runtime.CoreException: Failed to execute MI command:
source  d:/a.txt
Error message from debugger back end:
 d:/a.txt: No such file or directory.

Reproducible: Always

Steps to Reproduce:
1.New a c/c++ application debug
2.in the "Debugger" Tab, Gbd command file: d:/a.txt(is not exist), select gdb(dsf) create process launcher
3.a message dialog open, bug the gdb.exe does not exit
Comment 1 Marc Khouzam CLA 2011-12-01 09:38:32 EST
How do you check that gdb is not killed?  What version of GDB are you using?

I tried on Linux and gdb is properly killed (at least with GDB 7.3.1)
Comment 2 yuyin CLA 2011-12-01 20:50:45 EST
I used the lastest mingw, which include the gdb 7.3

I test this on two computers, one is win7 and the other is winxp.

on the xp computer, gdb is properly killed
but not on the win7 (the gdb.exe Continue to exist in the Task Manager when the debugger is terminated).


(In reply to comment #1)
> How do you check that gdb is not killed?  What version of GDB are you using?
> I tried on Linux and gdb is properly killed (at least with GDB 7.3.1)
Comment 3 Marc Khouzam CLA 2011-12-02 09:02:32 EST
(In reply to comment #2)

> on the xp computer, gdb is properly killed
> but not on the win7 (the gdb.exe Continue to exist in the Task Manager when the
> debugger is terminated).

I don't have easy access to a win7 machine, but if someone wants to investigate here is some info.

When the FinalLaunchSequence fails, GdbLaunchDelegate.launchDebugSession() calls GdbLaunch.shutdownSession(), which calls ShutdownSequence which will call GDBBackend.GDBProcessStep.shutdown().  It is that last method that terminates GDB.  One can set a breakpoint in that method to see what is happening.
Comment 4 weixiang CLA 2011-12-11 21:41:35 EST
(In reply to comment #3)
> I don't have easy access to a win7 machine, but if someone wants to investigate
> here is some info.
> When the FinalLaunchSequence fails, GdbLaunchDelegate.launchDebugSession()
> calls GdbLaunch.shutdownSession(), which calls ShutdownSequence which will call
> GDBBackend.GDBProcessStep.shutdown().  It is that last method that terminates
> GDB.  One can set a breakpoint in that method to see what is happening.

GDBBackend.GDBProcessStep.shutdown() calls Spawner.destroy() which will call Spawner.terminate(). Then it will call a native method as follow:
    /**
     * Native method to drop a signal on the process with pid.
     */
    public native int raise( int processID, int sig );

It seems that the org.eclipse.cdt.core.win32/os/win32/x86/spawner.dll is not working well on win7 32bit os.