Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Andrew Burgess" <aburgess@broadcom.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Cc: "Tom Tromey" <tromey@redhat.com>
Subject: Re: [PATCH] [1/2] Add new 'z' format for print command
Date: Thu, 11 Jul 2013 15:20:00 -0000	[thread overview]
Message-ID: <51DECD47.60207@broadcom.com> (raw)
In-Reply-To: <878v1egw5r.fsf@fleche.redhat.com>

On 10/07/2013 6:30 PM, Tom Tromey wrote:
>>>>>> "Andrew" == Andrew Burgess <aburgess@broadcom.com> writes:
> 
> Andrew> Pedro pointed out that I could do better, so, this patch
> Andrew> introduces a new 'z' format within the core value printing
> Andrew> code that displays scalars using zero padded hexadecimal.
> Andrew> I've mentioned this in the docs and added a test for the
> Andrew> new format.
> 
> Andrew> In patch [2/2] I'll change the MI code to make use of this
> Andrew> new 'z' formatter.
> 
> Andrew> OK to apply?
> 
> It looks good to me.  However, it needs a doc review, and also, I think,
> a NEWS entry.

Thanks for looking through this patch.

I've included a proposed NEWS entry below.

It also occurred to me that the 'z' formatter should be mentioned in the
help text for the 'x' command, I've included a small patch below that
makes this change.

> Plus, I think we should wait a little bit in case anyone has an issue
> with the choice of 'z'.

I'll wait a while to see if there's any feedback on the choice of
letter, and for a docs review.

Thanks,
Andrew


gdb/NEWS

* New 'z' formatter for print and examine memory commands, displays the
  value as hexadecimal zero padded to the size of the type.

gdb/ChangeLog

2013-07-08  Andrew Burgess  <aburgess@broadcom.com>

	* printcmd.c (_initialize_printcmd): Mention 'z' formatter in
	help text of the 'x' command.

diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index f34d18b..0862f86 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -2500,7 +2500,8 @@ Examine memory: x/FMT ADDRESS.\n\
 ADDRESS is an expression for the memory address to examine.\n\
 FMT is a repeat count followed by a format letter and a size letter.\n\
 Format letters are o(octal), x(hex), d(decimal), u(unsigned decimal),\n\
-  t(binary), f(float), a(address), i(instruction), c(char) and s(string).\n\
+  t(binary), f(float), a(address), i(instruction), c(char), s(string)\n\
+  and z(zero padded hex).\n\
 Size letters are b(byte), h(halfword), w(word), g(giant, 8 bytes).\n\
 The specified number of objects of the specified size are printed\n\
 according to the format.\n\n\



  reply	other threads:[~2013-07-11 15:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-08 17:30 Andrew Burgess
2013-07-10 17:30 ` Tom Tromey
2013-07-11 15:20   ` Andrew Burgess [this message]
2013-07-18  7:57     ` Andrew Burgess
2013-07-24 10:07 ` [PING (docs)] " Andrew Burgess
2013-07-24 14:35   ` Eli Zaretskii
2013-07-24 15:16     ` Andrew Burgess
2013-07-24 17:00       ` Eli Zaretskii
2013-07-24 17:08         ` Andrew Burgess
2013-07-24 17:43           ` Eli Zaretskii
2013-07-25 10:18             ` Andrew Burgess

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=51DECD47.60207@broadcom.com \
    --to=aburgess@broadcom.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.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