Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: pedro@codesourcery.com, gdb-patches@sourceware.org
Subject: Re: [RFC] Why does ui_out_field_core_addr pad with leading zeroes?
Date: Thu, 18 Mar 2010 19:19:00 -0000	[thread overview]
Message-ID: <e394668d1003181219p5f7a8489oca6bde6b3343e9ed@mail.gmail.com> (raw)
In-Reply-To: <201003181855.o2IIthRb027235@glazunov.sibelius.xs4all.nl>

On Thu, Mar 18, 2010 at 11:55 AM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
>> Date: Thu, 18 Mar 2010 11:23:38 -0700
>> From: Doug Evans <dje@google.com>
>>
>> > It also aids visual alignment I suppose.  Try also adding
>> > a breakpoint in a shared library in your example,
>> > and redoing `info break'. The column is presently
>> > aligned left.  I 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     Type           Disp Enb Address            What
>> 2       breakpoint     keep y   0x40049c           in main at hello.c:6
>> (gdb) b printf
>> Breakpoint 3 at 0x7ffff7acbe40
>> (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     <printf>
>> (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 <printf>
(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     <printf>
(gdb)

Did you have something else in mind?


  reply	other threads:[~2010-03-18 19:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-18 17:30 Doug Evans
2010-03-18 17:47 ` Pedro Alves
2010-03-18 18:23   ` Doug Evans
2010-03-18 18:58     ` Mark Kettenis
2010-03-18 19:19       ` Doug Evans [this message]
2010-03-18 19:25         ` Jan Kratochvil
2010-03-18 19:38           ` Doug Evans
2010-03-18 19:47             ` Pedro Alves
2010-03-18 20:49               ` Doug Evans
2010-03-18 19:51             ` Daniel Jacobowitz
2010-03-18 19:56               ` Pedro Alves
2010-03-18 20:03               ` Mark Kettenis
2010-03-18 20:59               ` Doug Evans
2010-03-18 17:52 ` Joel Brobecker
2010-03-18 18:52 ` Mark Kettenis

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=e394668d1003181219p5f7a8489oca6bde6b3343e9ed@mail.gmail.com \
    --to=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=mark.kettenis@xs4all.nl \
    --cc=pedro@codesourcery.com \
    /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