[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [cdt-dev] [DSF-GDB] The "Terminate" button in debug viewnotsending a "kill"
|
Who is calling the GDBIneriorProcess.destroy() and when is it called. I
put a breakpoint there but I don't see that method being called at any
"shutdown" steps.
I see GDBControl is only class managing the GDBInferiorProcess but it
only calls its dispose() method in the shutdown steps.
-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
On Behalf Of Marc Khouzam
Sent: July 20, 2010 1:18 PM
To: 'CDT General developers list.'
Subject: RE: [cdt-dev] [DSF-GDB] The "Terminate" button in debug
viewnotsending a "kill"
In MIInferiorProcess#doDestroy() we send a 'kill' (CLIExecAbort).
This is called from GDBInferiorProcess.
Can you see why this is not triggered in your case?
> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx
> [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Andy Jin
> Sent: Tuesday, July 20, 2010 12:41 PM
> To: CDT General developers list.
> Subject: RE: [cdt-dev] [DSF-GDB] The "Terminate" button in
> debug view notsending a "kill"
>
> Hi, Marc,
>
> It's similar but not quite the same. That bug is focusing on
> GDBServer and change the GDBServer protocol from
> "extended-remote" to "remote". The patch attached to that bug
> works for GDBServer.
>
> The problem is that not everyone uses GDBServer in target
> side. For us we don't but use a proprietary target agent to
> transfer the process to the target and launch it in "stop"
> mode. The host side GDB attaches to the process to start
> debugging. Without sending the GDB "kill" command no one will
> kill the inferior when the session terminates.
>
> I guess we need the flexibility to be able to explicitly
> sending the "kill" command.
>
> Thanks,
> Andy
>
> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx on behalf of Marc Khouzam
> Sent: Tue 20/07/2010 12:00 PM
> To: 'CDT General developers list.'
> Subject: RE: [cdt-dev] [DSF--GDB] The "Terminate" button in
> debug view notsending a "kill"
>
>
>
> > -----Original Message-----
> > From: cdt-dev-bounces@xxxxxxxxxxx
> > [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Andy Jin
> > Sent: Tuesday, July 20, 2010 11:44 AM
> > To: cdt-dev@xxxxxxxxxxx
> > Subject: [cdt-dev] [DSF--GDB] The "Terminate" button in debug
> > view not sending a "kill"
> >
> > In my remote process launch using CDI, the "Terminate" button in the
> > debug view invokes the Eclipse debug core
> > "org.eclipse.debug.internal.core.commands.TerminateCommand". The
> > "TerminateCommand" class invokes the CDI debug target "terminate()"
> > method and eventually invokes the
> > "org.eclipse.cdt.debug.mi.core.MIInferior.terminate()" method which
> > sends a GDB "kill" CLI command to the inferior to kill it before
> > proceeding to stop the debug session.
> >
> > In DSF/GDB, the "Terminate" button does not go through the
> debug core
> > "TerminateCommand" and DSF does not send a "kill" to inferior. The
> > result is when the session is stopped, GDB detaches from
> the inferior
> > thus the process continues to run. This is not the intended
> > behavior of
> > the "Terminiate" button.
> >
> > I understand in DSF/GDB remote launch using GDBServer extend-remote
> > mode, GDBServer will kill the inferior because GDBServer
> > starts it. But
> > in our environment we don't use GDBServer. The inferior is
> > started by a
> > target agent which does not get involved after the debug session is
> > established. Without the "kill" command the interior will
> just run to
> > finish.
>
> Could this be like
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=252283
>
> We use the extended-remote when we attach to an already running
> remote process. In that case we don't want to automatically kill
> the remote process when we stop debugging.
>
> Using 'remote' instead will kill the inferior, and we use this
> when we do remote debugging to an process that was started
> specifically to be debugged.
>
>
> >
> > Does DSF/GDB override the "Terminate" button action and not
> using the
> > debug core "TerminateCommand" anymore? If yes, where can I insert a
> > "kill" CLI command e.g. instantiate a CLIExecAbort command?
> >
> > Thanks,
> > Andy
> > _______________________________________________
> > cdt-dev mailing list
> > cdt-dev@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/cdt-dev
> > _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>
> _______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev