From: Jim Blandy <jimb@codesourcery.com>
To: gdb-patches@sourceware.org
Subject: Re: [RFC] Never silently discard internal errors
Date: Mon, 25 Sep 2006 19:37:00 -0000 [thread overview]
Message-ID: <m3r6xzd9dr.fsf@codesourcery.com> (raw)
In-Reply-To: <20060925184223.GA15314@nevyn.them.org> (Daniel Jacobowitz's message of "Mon, 25 Sep 2006 14:42:23 -0400")
Daniel Jacobowitz <drow@false.org> writes:
> Here's a problem that one of our customers turned up. He runs GDB
> from inside Emacs, which means that its standard input is considered
> 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,
> but one particular thing we discovered was that GDB would mysteriously
> quit out from under him, without telling him what it was doing.
>
> Eventually we tracked it down to an unrelated problem in the code he was
> testing for me. Not too surprising - that's what all the gdb_assert's
> and such are for, after all :-) But not only was it not asking permission
> before it bailed, but it wasn't even leaving a useful message.
>
> 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.
>
> It's easy to see this behavior for yourself. Just put the line
> "maint internal-error" in a text file, and start gdb with -x filename.
> Watch it abort without saying goodbye.
>
> Any thoughts on this patch? Shall I commit it?
What if we simply had 'query' itself print out the prompt, followed by
"[answering 'y', since standard input is not a terminal]" (or
something more tasteful)? Then you wouldn't have to go around
decorating all the calls to query.
next prev parent reply other threads:[~2006-09-25 19:37 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 [this message]
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
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=m3r6xzd9dr.fsf@codesourcery.com \
--to=jimb@codesourcery.com \
--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