From: Pedro Alves <palves@redhat.com>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: Sergio Durigan Junior <sergiodj@redhat.com>,
GDB Patches <gdb-patches@sourceware.org>,
Tom Tromey <tromey@redhat.com>,
Jan Kratochvil <jan.kratochvil@redhat.com>
Subject: info registers output
Date: Wed, 01 Aug 2012 20:20:00 -0000 [thread overview]
Message-ID: <50198F7B.1080903@redhat.com> (raw)
In-Reply-To: <201208011940.q71Jeksr002407@d06av02.portsmouth.uk.ibm.com>
On 08/01/2012 08:40 PM, Ulrich Weigand wrote:
> Pedro Alves wrote:
>> Why is the output format different? It looks like consistency here would be good.
>
> The problem is that "pc", "fp", etc can refer to different things under
> the covers: either a register defined by the target code, or else a
> "user register" defined by GDB common code.
>
> On many targets (but not Intel), "pc" is the name of a register defined
> by the target. In this case, registers_info uses the standard
> gdbarch_print_registers_info routine to output its content; this gives
> a larger space between register name and value, and outputs the
> contents both in hex and in the register's default type, usually a
> function pointer type.
>
> On targets where "pc" is *not* the name of a register defined by the
> target, registers_info still recognizes the name as "user register",
> and uses a separate code path to print its value. This results in
> a different (shorter) output ...
Ah. I wonder if that's been made on purpose. You get this on amd64:
(gdb) info registers rip pc
rip 0x390f407e68 0x390f407e68 <start_thread+552>
pc: 0x390f407e68
GDB knows the type of "pc", and so should be able to print "pc" like "rip".
Would that be a good idea?
--
Pedro Alves
next prev parent reply other threads:[~2012-08-01 20:20 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-31 21:26 [PATCH] Adjust `pc-fp.exp' for ppc64/s390x (PR 12659) Sergio Durigan Junior
2012-07-31 23:29 ` Andreas Schwab
2012-08-01 3:06 ` Sergio Durigan Junior
2012-08-01 9:22 ` Andreas Schwab
2012-08-01 8:46 ` Pedro Alves
2012-08-01 19:41 ` Ulrich Weigand
2012-08-01 19:47 ` Sergio Durigan Junior
2012-08-01 20:20 ` Pedro Alves [this message]
2012-08-01 20:49 ` info registers output Ulrich Weigand
2012-08-01 20:55 ` Sergio Durigan Junior
2012-08-27 17:41 ` Pedro Alves
2012-08-28 0:41 ` Ulrich Weigand
2012-08-28 9:07 ` Pedro Alves
2012-08-01 19:52 ` [PATCH] Adjust `pc-fp.exp' for ppc64/s390x (PR 12659) Tom Tromey
2012-08-01 20:23 ` Pedro Alves
2012-08-01 20:49 ` Sergio Durigan Junior
2012-08-01 21:44 ` Pedro Alves
2012-08-01 22:03 ` Andreas Schwab
2012-08-01 23:40 ` Sergio Durigan Junior
2012-08-02 9:06 ` Pedro Alves
2012-08-02 20:38 ` Sergio Durigan Junior
2012-08-08 11:57 ` 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=50198F7B.1080903@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=sergiodj@redhat.com \
--cc=tromey@redhat.com \
--cc=uweigand@de.ibm.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