remote.c:remote_open_1's use of from_tty

Andrew Cagney ac131313@ges.redhat.com
Tue Sep 10 16:36:00 GMT 2002


> I'm trying to decide what the rules are for checking from_tty
> when determining whether to print something.
> I'm guessing one rule is that when running scripts there is
> a preference for them to be quieter than when the same commands
> are done interactively.  It kinda makes debugging a bit more difficult
> though.
> 
> Is that the reason for the check for from_tty here?
> 
>   if (from_tty)
>     {
>       puts_filtered ("Remote debugging using ");
>       puts_filtered (name);
>       puts_filtered ("\n");
>     }
> 
> Hmmm, after studying it a bit more,
> what if we reach the end of a page and the user "quits"?
> I don't know remote.c very well but it looks like the target will
> be in a half-open state.  Am I missing something?

Nope.  Bug.  That is the least of the problems though.  target_open() 
and target_attach() need an overhaul.

Andrew




More information about the Gdb mailing list