This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Never silently discard internal errors


On Mon, Sep 25, 2006 at 10:43:20PM +0300, Eli Zaretskii wrote:
> > +/* Return whether query will not display anything.  If it won't, the
> > +   caller may want to display an informative message that would otherwise
> > +   have been part of the query prompt.  Also used to implement query
> > +   and defaulted_query, to assure they stay consistent.  */
> > +
> > +static int
> > +query_is_silent (void)
> > +{
> > +  /* We will automatically answer the query if input is not from the
> > +     user directly (e.g. from a script file or a pipe), or if the user
> > +     did not want prompts.  */
> > +  if (!input_from_terminal_p () || !caution)
> > +    return 1;
> > +
> > +  return 0;
> > +}
> 
> Can we do a bit better here?  For example, if we are running under
> Emacs, we could actually prompt, even though it's a pipe, right?

>From my original message:

> to be a pipe, which is not a terminal.  Accordingly query is suppressed.
> Whether this is right everywhere or not is a question for another day,

I don't think we could start prompting on pipes; I'm sure it would
break some things, probably including the emacs mode in question.

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]