GDB needs a --cmdline option

Fernando Nasser fnasser@cygnus.com
Fri May 12 13:37:00 GMT 2000


Eli Zaretskii wrote:
> 
> > Date: Fri, 12 May 2000 14:24:53 +0000
> > From: Fernando Nasser <fnasser@cygnus.com>
> >
> > We don't want gdb to print a prompt and much less try to read from stdin
> > unless some event happen and activate the debugger.  It should not interfere
> > and stop your script if the execution of the inferior goes smooth.
> 
> Agreed.  But I still don't see where the problem is.  How is --cmdline
> different from the following:
> 
>           gdb --quiet foo
>           r
> 
> The only thing we need to do is to make sure GDB exits right after the
> inferior does, without displaying the prompt.  Is that a problem?

Although there isn't a prompt, gdb has issued a read() in this case.  I am afraid
this will cause trouble if in a script.

WRT exiting right after the inferior, I believe we can do it quite easily.
Instead of printing the "Program has exited..." message we clean up thints and
exit().


-- 
Fernando Nasser
Cygnus Solutions (a Red Hat company)    E-Mail:  fnasser@cygnus.com
2323 Yonge Street, Suite #300           Tel:  416-482-2661 ext. 311
Toronto, Ontario   M4P 2C9              Fax:  416-482-6299


More information about the Gdb-patches mailing list