From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31967 invoked by alias); 18 Mar 2010 19:19:23 -0000 Received: (qmail 31954 invoked by uid 22791); 18 Mar 2010 19:19:22 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.35) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 18 Mar 2010 19:19:16 +0000 Received: from hpaq12.eem.corp.google.com (hpaq12.eem.corp.google.com [10.3.21.12]) by smtp-out.google.com with ESMTP id o2IJJDHY005105 for ; Thu, 18 Mar 2010 20:19:13 +0100 Received: from wyf22 (wyf22.prod.google.com [10.241.226.86]) by hpaq12.eem.corp.google.com with ESMTP id o2IJJ7iq017852 for ; Thu, 18 Mar 2010 20:19:12 +0100 Received: by wyf22 with SMTP id 22so1203563wyf.0 for ; Thu, 18 Mar 2010 12:19:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.172.70 with SMTP id s48mr812383wel.114.1268939951969; Thu, 18 Mar 2010 12:19:11 -0700 (PDT) In-Reply-To: <201003181855.o2IIthRb027235@glazunov.sibelius.xs4all.nl> References: <20100318173015.6765784413@ruffy.mtv.corp.google.com> <201003181747.29518.pedro@codesourcery.com> <201003181855.o2IIthRb027235@glazunov.sibelius.xs4all.nl> Date: Thu, 18 Mar 2010 19:19:00 -0000 Message-ID: Subject: Re: [RFC] Why does ui_out_field_core_addr pad with leading zeroes? From: Doug Evans To: Mark Kettenis Cc: pedro@codesourcery.com, gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true 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: 2010-03/txt/msg00685.txt.bz2 On Thu, Mar 18, 2010 at 11:55 AM, Mark Kettenis w= rote: >> Date: Thu, 18 Mar 2010 11:23:38 -0700 >> From: Doug Evans >> >> > It also aids visual alignment I suppose. =A0Try also adding >> > a breakpoint in a shared library in your example, >> > and redoing `info break'. The column is presently >> > aligned left. =A0I suspect it won't look as neat after >> > your patch. >> >> I realize that *could* happen, but since we're doing this fancy ui-out >> thing, I would expect it's the job of the front end to do any desired >> alignment. >> >> For reference sake, this is what I get with my patch: >> >> (gdb) b main >> Breakpoint 2 at 0x40049c: file hello.c, line 6. >> (gdb) i b >> Num =A0 =A0 Type =A0 =A0 =A0 =A0 =A0 Disp Enb Address =A0 =A0 =A0 =A0 = =A0 =A0What >> 2 =A0 =A0 =A0 breakpoint =A0 =A0 keep y =A0 0x40049c =A0 =A0 =A0 =A0 =A0= in main at hello.c:6 >> (gdb) b printf >> Breakpoint 3 at 0x7ffff7acbe40 >> (gdb) i b >> Num =A0 =A0 Type =A0 =A0 =A0 =A0 =A0 Disp Enb Address =A0 =A0 =A0 =A0 = =A0 =A0What >> 2 =A0 =A0 =A0 breakpoint =A0 =A0 keep y =A0 0x40049c =A0 =A0 =A0 =A0 =A0= in main at hello.c:6 >> 3 =A0 =A0 =A0 breakpoint =A0 =A0 keep y =A0 0x7ffff7acbe40 =A0 =A0 >> (gdb) > > So since the CLI obviously doesn't align the unpadded addresses > properly, I'd say your diff shouldn't go in until it does. I'm not sure I understand. Clearly there is some alignment going on otherwise the "What" column would be all messed up, but it is not. I'm going to assume you're saying that the proper alignment would be to right-justify the addresses. Correct me if this assumption is wrong. Having stared at both alignments, I don't see aligning the address to the right as being easier to read than aligning them to the left, and even less so. Right Aligned (gdb) i b Num Type Disp Enb Address What 2 breakpoint keep y 0x40049c in main at hello.c:6 3 breakpoint keep y 0x7ffff7acbe40 (gdb) Left Aligned (gdb) i b Num Type Disp Enb Address What 2 breakpoint keep y 0x40049c in main at hello.c:6 3 breakpoint keep y 0x7ffff7acbe40 (gdb) Did you have something else in mind?