Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jiong Wang <jiwang@tilera.com>
To: Pedro Alves <palves@redhat.com>
Cc: Joel Brobecker <brobecker@adacore.com>,
	<gdb-patches@sourceware.org>,	Walter Lee <walt@tilera.com>,
	Tom Tromey <tromey@redhat.com>
Subject: Re: [RFC/TileGX 5/6]show registers in columns
Date: Wed, 13 Feb 2013 14:42:00 -0000	[thread overview]
Message-ID: <511BA611.40900@tilera.com> (raw)
In-Reply-To: <51156968.4080408@redhat.com>

Hi all,

   thanks for all these comments, happy Chinese lunar new year!

>>> +		  fprintf_filtered (file, "%02x", (unsigned char) buffer[idx]);
>> 	I do not think that this is the right way of printing the register
>> value, by doing all the work yourself. I am not completely sure
>> what the best solution would be, though. The other Global Maintainers
>> may have a more definitive answer, but perhaps plongest (value_as_long
>> (register_value)). My suggestion is a little iffy because it assumes
>> for instance that all register values are signed / or unsigned.
> Usually you'd use val_print.

    the reason why we do not use val_print is because, for a zero value, 
for x86, the default output is:

rax            0x7ffff7bd5f60  140737349771104
rbx            0x0     0
rcx            0x0      0

while I think it's better that the output is padded with zero which is 
MIPS's approach, for example:

rax            0x00007FFFF7BD5F60
rbx            0x000000000000000
rcx            0x000000000000000

> How about just exporting and
> calling default_print_one_register_info?  You get consistency
> with other archs for free, and unavailable values handled too.

good, I find some code is factored out as 
"default_print_one_register_info" since Aug, 2012,
but it always print a '\n' for each register , so it can not used for 
multi column output.

and this function print register value in both hex format and natural 
format, it consumes extra
width that there is no enough space left for multi columns.

all these are quite subjective,  I think this patch do not affect the 
correctness of tilegx gdb, so I do not
insist on it.

thanks.

---
Regards,
Jiong



  reply	other threads:[~2013-02-13 14:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-18  9:30 Jiong Wang
2013-01-18 13:50 ` Joel Brobecker
2013-01-18 16:07   ` Jiong Wang
2013-02-08 19:09     ` Joel Brobecker
2013-02-08 21:09       ` Pedro Alves
2013-02-13 14:42         ` Jiong Wang [this message]
2013-02-11 19:20       ` Tom Tromey

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=511BA611.40900@tilera.com \
    --to=jiwang@tilera.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=tromey@redhat.com \
    --cc=walt@tilera.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