[3/3] Documentation changes for the new zhexadecimal format

Message ID 1430490758-23247-4-git-send-email-lgustavo@codesourcery.com
State Superseded
Headers

Commit Message

Luis Machado May 1, 2015, 2:32 p.m. UTC
  This patch updates the documentation to reflect the addition of the new
zhexadecimal format option for -var-set-format and also adds a NEWS entry
for the change.

gdb/ChangeLog:

2015-05-01  Luis Machado  <lgustavo@codesourcery.com>

	* NEWS: Add new note to MI changes.

gdb/doc/ChangeLog:

2015-05-01  Luis Machado  <lgustavo@codesourcery.com>

	* gdb.texinfo (GDB/MI Variable Objects): Update text for
	-var-set-format.
---
 gdb/NEWS            | 5 +++++
 gdb/doc/gdb.texinfo | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
  

Comments

Eli Zaretskii May 1, 2015, 3:07 p.m. UTC | #1
> From: Luis Machado <lgustavo@codesourcery.com>
> Date: Fri, 1 May 2015 11:32:38 -0300
> 
> This patch updates the documentation to reflect the addition of the new
> zhexadecimal format option for -var-set-format and also adds a NEWS entry
> for the change.

OK, but should we perhaps explain what zhexadecimal means?  I didn't
know about it until I read this patch.

Thanks.
  
Luis Machado May 1, 2015, 6:58 p.m. UTC | #2
On 05/01/2015 12:07 PM, Eli Zaretskii wrote:
>> From: Luis Machado <lgustavo@codesourcery.com>
>> Date: Fri, 1 May 2015 11:32:38 -0300
>>
>> This patch updates the documentation to reflect the addition of the new
>> zhexadecimal format option for -var-set-format and also adds a NEWS entry
>> for the change.
>
> OK, but should we perhaps explain what zhexadecimal means?  I didn't
> know about it until I read this patch.

Yes. Or maybe have a better (longer?) nomeclature for this option, 
making it more intuitive?
  
Luis Machado May 6, 2015, 1:56 p.m. UTC | #3
On 05/01/2015 12:07 PM, Eli Zaretskii wrote:
>> From: Luis Machado <lgustavo@codesourcery.com>
>> Date: Fri, 1 May 2015 11:32:38 -0300
>>
>> This patch updates the documentation to reflect the addition of the new
>> zhexadecimal format option for -var-set-format and also adds a NEWS entry
>> for the change.
>
> OK, but should we perhaps explain what zhexadecimal means?  I didn't
> know about it until I read this patch.

I'm not too sure where that explanation should go. The other formats are 
self-explanatory. What about 'zero-padded-hexadecimal'? Too long?

The 'z' is an attempt to map back to the CLI format specifier /z when 
using the print and x commands. Though that requires some GDB-fu to get 
the first time.
  
Luis Machado May 6, 2015, 2:01 p.m. UTC | #4
On 05/06/2015 10:56 AM, Luis Machado wrote:
> On 05/01/2015 12:07 PM, Eli Zaretskii wrote:
>>> From: Luis Machado <lgustavo@codesourcery.com>
>>> Date: Fri, 1 May 2015 11:32:38 -0300
>>>
>>> This patch updates the documentation to reflect the addition of the new
>>> zhexadecimal format option for -var-set-format and also adds a NEWS
>>> entry
>>> for the change.
>>
>> OK, but should we perhaps explain what zhexadecimal means?  I didn't
>> know about it until I read this patch.
>
> I'm not too sure where that explanation should go. The other formats are
> self-explanatory. What about 'zero-padded-hexadecimal'? Too long?
>
> The 'z' is an attempt to map back to the CLI format specifier /z when
> using the print and x commands. Though that requires some GDB-fu to get
> the first time.
>
>

Also, i've been informed by IDE guys that these strings are usually 
translated, so 'zero-padded-hexadecimal' would be correct for 
internationalization purposes so it can be translated to other 
languages, as opposed to 'zhexadecimal'.
  
Eli Zaretskii May 6, 2015, 3:36 p.m. UTC | #5
> Date: Wed, 6 May 2015 10:56:32 -0300
> From: Luis Machado <lgustavo@codesourcery.com>
> CC: <gdb-patches@sourceware.org>
> 
> On 05/01/2015 12:07 PM, Eli Zaretskii wrote:
> >> From: Luis Machado <lgustavo@codesourcery.com>
> >> Date: Fri, 1 May 2015 11:32:38 -0300
> >>
> >> This patch updates the documentation to reflect the addition of the new
> >> zhexadecimal format option for -var-set-format and also adds a NEWS entry
> >> for the change.
> >
> > OK, but should we perhaps explain what zhexadecimal means?  I didn't
> > know about it until I read this patch.
> 
> I'm not too sure where that explanation should go.

It should be near the first use of this term.

> What about 'zero-padded-hexadecimal'? Too long?

Yes, and I don't think we should go to such extremes.  Just explaining
the term the first time it is used in the manual should be OK.
  

Patch

diff --git a/gdb/NEWS b/gdb/NEWS
index 651401d..9d4fd03 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -142,6 +142,11 @@  qXfer:exec-file:read
 HP/PA running HP-UX           hppa*-*-hpux*
 Itanium running HP-UX         ia64-*-hpux*
 
+* MI changes
+
+  ** The -var-set-format command now accepts the zhexadecimal format.  It
+     outputs data in hexadecimal format with zero-padding on the left.
+
 *** Changes in GDB 7.9
 
 * GDB now supports hardware watchpoints on x86 GNU Hurd.
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 9e2787d..89fd2ca 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -28927,7 +28927,7 @@  The syntax for the @var{format-spec} is as follows:
 
 @smallexample
  @var{format-spec} @expansion{}
- @{binary | decimal | hexadecimal | octal | natural@}
+ @{binary | decimal | hexadecimal | octal | natural | zhexadecimal@}
 @end smallexample
 
 The natural format is the default format choosen automatically