Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC] Never silently discard internal errors
Date: Mon, 25 Sep 2006 19:43:00 -0000	[thread overview]
Message-ID: <upsdjlokn.fsf@gnu.org> (raw)
In-Reply-To: <20060925184223.GA15314@nevyn.them.org> (message from Daniel 	Jacobowitz on Mon, 25 Sep 2006 14:42:23 -0400)

> Date: Mon, 25 Sep 2006 14:42:23 -0400
> From: Daniel Jacobowitz <drow@false.org>
> 
> I think the attached patch is reasonable.  It changes error handling
> such that if query is a no-op - for instance, from a script file,
> or from a pipe - we dump out a message to stdout anyway before quitting
> or dumping core.

I agree with the principle that GDB should not silently quit.

> +/* 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?


  parent reply	other threads:[~2006-09-25 19:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-25 18:42 Daniel Jacobowitz
2006-09-25 19:10 ` Michael Snyder
2006-09-25 19:37 ` Jim Blandy
2006-09-25 20:03   ` Daniel Jacobowitz
2006-09-25 21:17     ` Jim Blandy
2006-09-26  3:56       ` Daniel Jacobowitz
2006-10-18 22:21         ` Daniel Jacobowitz
2006-09-25 19:43 ` Eli Zaretskii [this message]
2006-09-25 20:05   ` Daniel Jacobowitz
2006-09-26  3:29     ` Eli Zaretskii
2006-09-26  3:56       ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=upsdjlokn.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox