From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31995 invoked by alias); 12 May 2009 09:39:09 -0000 Received: (qmail 31977 invoked by uid 22791); 12 May 2009 09:39:07 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_52,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 12 May 2009 09:39:03 +0000 Received: (qmail 29171 invoked from network); 12 May 2009 09:39:01 -0000 Received: from unknown (HELO orlando) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 12 May 2009 09:39:01 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [RFC] Trailing spaces in solaris_pid_to_str Date: Tue, 12 May 2009 09:39:00 -0000 User-Agent: KMail/1.9.10 Cc: Joel Brobecker , Doug Evans References: <20090501213218.4488B84890@localhost> <20090512091945.GA27497@adacore.com> In-Reply-To: <20090512091945.GA27497@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905121039.07117.pedro@codesourcery.com> 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: 2009-05/txt/msg00242.txt.bz2 On Tuesday 12 May 2009 10:19:45, Joel Brobecker wrote: > > Doesn't matter to me whether to check this in or not, > > just thought I'd pass it on. It is odd. Is there another reason > > for these spaces that I'm missing? > > Can't figure it out. I did a bit of archeology, and this pre-dates > the public CVS. Yes, if you do "info threads", it becomes dead obvious it's just for lining up. From PR9242, here's what one gets on solaris: 6 Thread 3 0xdfa39657 in _swtch () from /usr/lib/libthread.so.1 5 Thread 2 (LWP 2) 0xdfadb5a8 in _signotifywait () from /usr/lib/libc.so.1 * 4 Thread 1 (LWP 1) main (argc=0x1, argv=0x8047874) at /users/pes/gdbnd/devo/gdb/testsuite/gdb.threads/pthreads.c:122 3 LWP 3 0xdfa3a158 in _lwp_start () from /usr/lib/libthread.so.1 2 LWP 2 0xdfadb5a8 in _signotifywait () from /usr/lib/libc.so.1 1 LWP 1 main (argc=0x1, argv=0x8047874) at /users/pes/gdbnd/devo/gdb/testsuite/gdb.threads/pthreads.c:122 http://sourceware.org/bugzilla/show_bug.cgi?id=9242 Hmmm, BTW, I've fixed that PR recently; time to close it. I've no real opinion on if the lining up is desirable or not. > > 2009-05-01 Doug Evans > > > > * sol-thread.c (solaris_pid_to_str): Remove trailing spaces in result. > > I'm not objecting, but if it's just a visual annoyance and no one else > provides feedback, then perhaps it's better to leave things as is > (taste varies from person to person). If you need that function > elsewhere and it's causing trouble, on the other hand... > > > [The spaces in "LWP %ld" are to line up the text with "Thread %ld". > > They don't bother me as much as the trailing spaces so I left them in, > > but they could just as well be deleted.] > > If you do remove the trailing spaces, might as well remove the leading > ones too. There're there for formatting, so if we remove the formatting, > we might as well remove all of it (IMO). -- Pedro Alves