From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2164 invoked by alias); 28 Apr 2008 14:44:58 -0000 Received: (qmail 2144 invoked by uid 22791); 28 Apr 2008 14:44:58 -0000 X-Spam-Check-By: sourceware.org Received: from s200aog13.obsmtp.com (HELO s200aog13.obsmtp.com) (207.126.144.127) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 28 Apr 2008 14:44:36 +0000 Received: from source ([164.129.1.35]) (using TLSv1) by eu1sys200aob013.postini.com ([207.126.147.11]) with SMTP; Mon, 28 Apr 2008 14:44:33 UTC Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 99B13DAC4 for ; Mon, 28 Apr 2008 14:44:27 +0000 (GMT) Received: from mail1.bri.st.com (mail1.bri.st.com [164.129.8.218]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 3A7384C396 for ; Mon, 28 Apr 2008 14:44:17 +0000 (GMT) Received: from [164.129.12.194] (bri0669.bri.st.com [164.129.12.194]) by mail1.bri.st.com (MOS 3.7.5a-GA) with ESMTP id CKD25792 (AUTH stubbsa); Mon, 28 Apr 2008 15:43:22 +0100 (BST) Message-ID: <4815E2BF.7070404@st.com> Date: Mon, 28 Apr 2008 19:02:00 -0000 From: Andrew STUBBS User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: GDB Patches Subject: Re: [PATCH] Prevent source file errors in --batch-silent mode References: <480CD958.8010409@st.com> In-Reply-To: <480CD958.8010409@st.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-04/txt/msg00637.txt.bz2 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 > > 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. > > Andrew