Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
AW: [cdt-dev] Debug process does not terminate when invoked fromeclipse

Hi Mikhail,

Yep, of course the process can be killed by hand but that is not normal behaviour. Normal behaviour is that when the debugged program exits then the gdb process also exits and the launch is entirely terminated. I would like my launch to behave along the same lines.

Thx for your comments, just the same.


Norbert 

-----Ursprüngliche Nachricht-----
Von: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] Im Auftrag von Mikhail Khodjaiants
Gesendet: Dienstag, 14. März 2006 19:54
An: CDT General developers list.
Betreff: Re: [cdt-dev] Debug process does not terminate when invoked fromeclipse

Hi Norbert,

If the gdbserver process is registered with your launch, than terminating 
the launch will terminate it as well as all other registered processes and 
targets. Otherwise, it is your code that is responsible to handle this 
situation.

Mikhail Khodjaiants
----- Original Message ----- 
From: "Ploett, Norbert" <norbert.ploett@xxxxxxxxxxx>
To: "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
Sent: Tuesday, March 14, 2006 6:52 AM
Subject: [cdt-dev] Debug process does not terminate when invoked from 
eclipse


> Hi folks,
>
> here is something strange I encountered when trying to set up a gdb -->
> gdbserver session all from within eclipse.
>
> Scenario 1)
> First I do the session from the command line, like so
>
> Command shell 1> gdbserver localhost:8799 myProgram
>
> Command shell 2> gdb myProgram
> (gdb) target remote localhost:8799
> (gdb) c
>
> This makes my program run. When the program terminates command shell 1
> (with the gdbserver process) returns to the command prompt, i.e. the
> gdbserver terminates also.
> Similarly, when I have a breakpoint in my program and give the kill
> command then the gdbserver kills the inferior and terminates.
>
> Scenario 2)
> For eclipse we are writing a new debugger which extends GDBCDIDebugger
> and which starts both the gdbserver process and then the gdb session.
> The commands to start the gdbserver process are essentially:
>
> ================snip=================
> Process procDebugServer =
> ProcessFactory.getFactory().exec(astrArg);
> ILaunch launchDebugger = super.getLauch();
> IProcess procDebugger =
> DebugPlugin.newProcess(launchDebugger,
>
> procDebugServer,
>
> "Debug Server Process");
> ================snap=================
>
> When I run the debug session from eclipse then my program runs and
> terminates in exactly the same way but the gdbserver remains alive,
> apparently doing nothing.
> Similarly, when I have a breakpoint in my program and klick on
> "Terminate" the underlying gdb gets a kill and -gdb-exit command and
> terminates, but the gdbserver does not.
> In both cases I have to manually kill the gdbserver.
>
>
> Scenario 3)
> Start the gdbserver manually and configure a C/C++ Local Application
> Launch. The behavior in this case is the same as in Scenario 1), i.e.
> the gdbserver terminates when the inferior exits.
>
> So it seems I am doing something wrong that the standard C/C++ Local
> launch is doing right.
> But what is it? Can anybody give any hints?
>
>
> Thanks,
>
>
> Norbert Ploett
>
> _______________________________________________
> 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


Back to the top