Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew STUBBS <andrew.stubbs@st.com>
To: GDB Patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Prevent source file errors in --batch-silent mode
Date: Mon, 28 Apr 2008 19:02:00 -0000	[thread overview]
Message-ID: <4815E2BF.7070404@st.com> (raw)
In-Reply-To: <480CD958.8010409@st.com>

1 week ping :)

And let's see if I can add it to the tracker properly this time ...

:ADDPATCH infrun.c:

Andrew STUBBS wrote:
> Hi,

> The --batch-silent option disables all output on stdout, thus silencing 
> GDB with no impact on the rest of the source base. However, it does 
> *not* silence stderr.

> Most of the time this is the right thing to do, but it can lead to a 
> little unnecessary noise.

> Specifically, given the following trivial test file:

> int main()
> {
>   while (1)
>     ;
>   return 0;
> }

> Compiled with debug info, but with the source file *taken away*, the 
> debugger will produce an irritating error message if the running program 
> is interrupted with Ctrl-C:

> $ gdb -ex run a.out -batch-silent
> <Ctrl-C>
> 3       t.c: No such file or directory.

> In this example the user is irritated, but in typical real world 
> examples the error message refers to some OS source file they've never 
> heard of (with a scary name like kernel.c), which may lead the user to 
> think there is a real problem.

> The attached patch prevents GDB attempting to print the source reference 
> when in --batch-silent mode. The only outward evidence of this feature 
> was the error message, so nothing is lost. If anything it's a little 
> more efficient now.

> <ADDPATCH infrun.c>

> Andrew



  reply	other threads:[~2008-04-28 14:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-21 19:34 Andrew STUBBS
2008-04-28 19:02 ` Andrew STUBBS [this message]
2008-05-01 20:34 ` Daniel Jacobowitz
2008-05-02 11:35   ` Andrew STUBBS
2008-05-02 13:46     ` Daniel Jacobowitz
2008-05-02 14:03       ` Andrew STUBBS
2008-05-02 14:10         ` Daniel Jacobowitz
2008-05-03  6:23           ` Thiago Jung Bauermann
2008-05-03 14:26             ` Christopher Faylor
2008-05-03 20:56               ` Thiago Jung Bauermann
2008-05-03 15:33             ` Daniel Jacobowitz
2008-05-03 20:54               ` Thiago Jung Bauermann
2008-05-03 21:48                 ` 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=4815E2BF.7070404@st.com \
    --to=andrew.stubbs@st.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