From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22207 invoked by alias); 25 Apr 2002 15:38:34 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 22183 invoked from network); 25 Apr 2002 15:38:32 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 25 Apr 2002 15:38:32 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 32A443D37; Thu, 25 Apr 2002 11:38:32 -0400 (EDT) Message-ID: <3CC822F7.8010205@cygnus.com> Date: Thu, 25 Apr 2002 08:38:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.9) Gecko/20020424 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Jacobowitz Cc: Michael Snyder , gdb-patches@sources.redhat.com, Pierre Muller Subject: Re: [RFA/RFC] printf (stderr,... ->fprintf_unfiltered (gdb_stderr,... in hpread.c References: <4.2.0.58.20020424151049.01eb0900@ics.u-strasbg.fr> <20020424102516.C6310@nevyn.them.org> <3CC6FE80.D2EC8A7E@redhat.com> <20020424152929.A20589@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-04/txt/msg01017.txt.bz2 > On Wed, Apr 24, 2002 at 11:50:40AM -0700, Michael Snyder wrote: > >> Daniel Jacobowitz wrote: > >> > >> > On Wed, Apr 24, 2002 at 03:16:16PM +0200, Pierre Muller wrote: > >> > > This is a second of the files that I listed in >> > > http://sources.redhat.com/ml/gdb/2002-02/msg00212.html >> > > as still having direct uses of stderr. >> > > >> > > I did not fix a 80 char overflow, because I didn't find a good way to do it: >> > > If I try to align the string "Psymtab for %s already read in. Shouldn't happen.\n" >> > > with gdb_stderr, I still get an overflow, how show I indent the args then? >> > > Should I break the string constant? > >> > >> > Yes, I'd recommend: >> > >> > - fprintf (stderr, "Psymtab for %s already read in. Shouldn't happen.\n", >> > + fprintf_unfiltered (gdb_stderr, "Psymtab for %s already read in. " >> > "Shouldn't happen.\n", The other is the more traditional: ..... "\ Psymtab for ......\n\ .......\n" (the ``\'' at the end of the line is needed. >> >> >> I thought there was some kind of caveat against the use of >> string concatenation ? > > > Perhaps you're thinking of token concatenation, or stringification? Or > multiline strings? I believe "a" "b" has worked even in K&R compilers. Some, not all. But yes string concatenation like the above is fine for GDB. (Pierre, yes, ok with a tweak). Andrew