public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v2 1/3] Add zero-padded hexadecimal format support for varobj's
  2015-05-07 17:37 [PATCH v2 0/3] varobj zero-padded hexadecimal format Luis Machado
  2015-05-07 17:37 ` [PATCH v2 3/3] Documentation changes for the new zero-hexadecimal format Luis Machado
  2015-05-07 17:37 ` [PATCH v2 2/3] Add varobj zero-hexadecimal format tests Luis Machado
@ 2015-05-07 17:37 ` Luis Machado
  2015-05-08 17:28   ` Joel Brobecker
  2 siblings, 1 reply; 11+ messages in thread
From: Luis Machado @ 2015-05-07 17:37 UTC (permalink / raw)
  To: gdb-patches

This patch changes things so that we can support zero-padded hexadecimal
formats for varobj's. The new type is "zero-hexadecimal" and maps to GDB's 'z'
print format.

Ideally we would share all the formats we currently support with the MI/varobj
layer, but this requires a bit more work. Meanwhile, adding a new mapping seems
to work.

gdb/ChangeLog:

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

	* gdb/mi/mi-cmd-var.c (mi_parse_format): Handle new "zero-hexadecimal"
	format.
	* gdb/varobj.c (varobj_format_string): Add "zero-hexadecimal" entry.
	(format_code): Add 'z' entry.
	(varobj_set_display_format): Handle FORMAT_ZHEXADECIMAL.
	* gdb/varobj.h (varobj_display_formats) <FORMAT_ZHEXADECIMAL>: New enum
	field.
---
 gdb/mi/mi-cmd-var.c | 4 +++-
 gdb/varobj.c        | 5 +++--
 gdb/varobj.h        | 3 ++-
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c
index ee0bbc6..5554e3c 100644
--- a/gdb/mi/mi-cmd-var.c
+++ b/gdb/mi/mi-cmd-var.c
@@ -233,10 +233,12 @@ mi_parse_format (const char *arg)
 	return FORMAT_HEXADECIMAL;
       else if (strncmp (arg, "octal", len) == 0)
 	return FORMAT_OCTAL;
+      else if (strncmp (arg, "zero-hexadecimal", len) == 0)
+	return FORMAT_ZHEXADECIMAL;
     }
 
   error (_("Must specify the format as: \"natural\", "
-	   "\"binary\", \"decimal\", \"hexadecimal\", or \"octal\""));
+	   "\"binary\", \"decimal\", \"hexadecimal\", \"octal\" or \"zero-hexadecimal\""));
 }
 
 void
diff --git a/gdb/varobj.c b/gdb/varobj.c
index b220fd8..2f2939e 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -50,7 +50,7 @@ show_varobjdebug (struct ui_file *file, int from_tty,
 
 /* String representations of gdb's format codes.  */
 char *varobj_format_string[] =
-  { "natural", "binary", "decimal", "hexadecimal", "octal" };
+  { "natural", "binary", "decimal", "hexadecimal", "octal", "zero-hexadecimal" };
 
 /* True if we want to allow Python-based pretty-printing.  */
 static int pretty_printing = 0;
@@ -214,7 +214,7 @@ static struct varobj *varobj_add_child (struct varobj *var,
 /* Private data */
 
 /* Mappings of varobj_display_formats enums to gdb's format codes.  */
-static int format_code[] = { 0, 't', 'd', 'x', 'o' };
+static int format_code[] = { 0, 't', 'd', 'x', 'o', 'z' };
 
 /* Header of the list of root variable objects.  */
 static struct varobj_root *rootlist;
@@ -583,6 +583,7 @@ varobj_set_display_format (struct varobj *var,
     case FORMAT_DECIMAL:
     case FORMAT_HEXADECIMAL:
     case FORMAT_OCTAL:
+    case FORMAT_ZHEXADECIMAL:
       var->format = format;
       break;
 
diff --git a/gdb/varobj.h b/gdb/varobj.h
index 8860526..179b2a5 100644
--- a/gdb/varobj.h
+++ b/gdb/varobj.h
@@ -28,7 +28,8 @@ enum varobj_display_formats
     FORMAT_BINARY,		/* Binary display                    */
     FORMAT_DECIMAL,		/* Decimal display                   */
     FORMAT_HEXADECIMAL,		/* Hex display                       */
-    FORMAT_OCTAL		/* Octal display                     */
+    FORMAT_OCTAL,		/* Octal display                     */
+    FORMAT_ZHEXADECIMAL		/* Zero padded hexadecimal	     */
   };
 
 enum varobj_type
-- 
1.9.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v2 3/3] Documentation changes for the new zero-hexadecimal format
  2015-05-07 17:37 [PATCH v2 0/3] varobj zero-padded hexadecimal format Luis Machado
@ 2015-05-07 17:37 ` Luis Machado
  2015-05-07 18:01   ` Eli Zaretskii
  2015-05-07 17:37 ` [PATCH v2 2/3] Add varobj zero-hexadecimal format tests Luis Machado
  2015-05-07 17:37 ` [PATCH v2 1/3] Add zero-padded hexadecimal format support for varobj's Luis Machado
  2 siblings, 1 reply; 11+ messages in thread
From: Luis Machado @ 2015-05-07 17:37 UTC (permalink / raw)
  To: gdb-patches

This patch updates the documentation to reflect the addition of the new
zero-hexadecimal format option for -var-set-format and also adds a NEWS entry
for the change.

I changed it from zhexadecimal to zero-hexadecimal so the IDE folks can
properly translate the string to something more reasonable.

gdb/ChangeLog:

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

	* NEWS: Add new note to MI changes.

gdb/doc/ChangeLog:

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

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

diff --git a/gdb/NEWS b/gdb/NEWS
index 0c7084a..69a8f19 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -145,6 +145,12 @@ 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 zero-hexadecimal
+     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 19d8bb3..ef0be3c 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -28927,13 +28927,18 @@ 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 | zero-hexadecimal@}
 @end smallexample
 
 The natural format is the default format choosen automatically
 based on the variable type (like decimal for an @code{int}, hex
 for pointers, etc.).
 
+The zero-hexadecimal format has a representation similar to hexadecimal
+but with padding zeroes to the left of the value.  For example, a 32-bit
+hexadecimal value of 0x1234 would be represented as 0x00001234 in the
+zero-hexadecimal format.
+ 
 For a variable with children, the format is set only on the 
 variable itself, and the children are not affected.  
 
-- 
1.9.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v2 0/3] varobj zero-padded hexadecimal format
@ 2015-05-07 17:37 Luis Machado
  2015-05-07 17:37 ` [PATCH v2 3/3] Documentation changes for the new zero-hexadecimal format Luis Machado
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Luis Machado @ 2015-05-07 17:37 UTC (permalink / raw)
  To: gdb-patches

This is v2 of the set of patches to add support for the zero-padded hexadecimal
format for varobj's, defined as "zero-hexadecimal".  We currently only support
regular non-zero-padded hexadecimal.

Talking with IDE developers, they would like to have this option that is
already available to GDB's print/x commands in the CLI as 'z'.

v2 adds a bit more documentation regarding the new format and
also changes its identifier from 'zhexadecimal' to 'zero-hexadecimal'

Luis Machado (3):
  Add zero-padded hexadecimal format support for varobj's
  Add varobj zero-hexadecimal format tests.
  Documentation changes for the new zero-hexadecimal format

 gdb/NEWS                                |  6 ++++++
 gdb/doc/gdb.texinfo                     |  7 ++++++-
 gdb/mi/mi-cmd-var.c                     |  4 +++-
 gdb/testsuite/gdb.mi/mi-var-display.exp | 25 +++++++++++++++++++++++--
 gdb/varobj.c                            |  5 +++--
 gdb/varobj.h                            |  3 ++-
 6 files changed, 43 insertions(+), 7 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v2 2/3] Add varobj zero-hexadecimal format tests.
  2015-05-07 17:37 [PATCH v2 0/3] varobj zero-padded hexadecimal format Luis Machado
  2015-05-07 17:37 ` [PATCH v2 3/3] Documentation changes for the new zero-hexadecimal format Luis Machado
@ 2015-05-07 17:37 ` Luis Machado
  2015-05-08 17:30   ` Joel Brobecker
  2015-05-07 17:37 ` [PATCH v2 1/3] Add zero-padded hexadecimal format support for varobj's Luis Machado
  2 siblings, 1 reply; 11+ messages in thread
From: Luis Machado @ 2015-05-07 17:37 UTC (permalink / raw)
  To: gdb-patches

This patch adds a few tests to exercise the new zero-hexadecimal format for
varobj's. I see 5 FAIL's without the zero-hexadecimal format support and full
passes with a zero-hexadecimal format support.

I renamed some of the tests to make them unique.

gdb/testsuite/ChangeLog:

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

	* gdb.mi/mi-var-display.exp: Add new checks for the zero-hexadecimal
	  format and change test names to make them unique.
---
 gdb/testsuite/gdb.mi/mi-var-display.exp | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

diff --git a/gdb/testsuite/gdb.mi/mi-var-display.exp b/gdb/testsuite/gdb.mi/mi-var-display.exp
index 31bdce4..6aedb53 100644
--- a/gdb/testsuite/gdb.mi/mi-var-display.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-display.exp
@@ -81,6 +81,11 @@ mi_gdb_test "-var-evaluate-expression bar" \
 	"eval variable bar"
 
 # Test: c_variable-6.5
+# Desc: change format of bar to zero-padded hexadecimal
+mi_gdb_test "-var-set-format bar zero-hexadecimal" \
+	"\\^done,format=\"zero-hexadecimal\",value=\"0x0.*849\"" \
+	"set format variable bar in zero-padded hexadecimal"
+
 # Desc: change format of bar to hex
 mi_gdb_test "-var-set-format bar hexadecimal" \
 	"\\^done,format=\"hexadecimal\",value=\"0x849\"" \
@@ -241,7 +246,7 @@ mi_gdb_test "-var-set-format weird.func_ptr hexadecimal" \
 
 mi_gdb_test "-var-show-format weird.func_ptr" \
 	"\\^done,format=\"hexadecimal\"" \
-	"show format variable weird.func_ptr"
+	"show format variable weird.func_ptr (hex)"
 
 mi_gdb_test "-var-set-format weird.func_ptr_ptr hexadecimal" \
 	"\\^done,format=\"hexadecimal\",value=\"$hex\"" \
@@ -249,7 +254,23 @@ mi_gdb_test "-var-set-format weird.func_ptr_ptr hexadecimal" \
 
 mi_gdb_test "-var-show-format weird.func_ptr_ptr" \
 	"\\^done,format=\"hexadecimal\"" \
-	"show format variable weird.func_ptr_ptr"
+	"show format variable weird.func_ptr_ptr (hex)"
+
+mi_gdb_test "-var-set-format weird.func_ptr zero-hexadecimal" \
+	"\\^done,format=\"zero-hexadecimal\",value=\"$hex\"" \
+	"set format variable weird.func_ptr in zero-padded hex"
+
+mi_gdb_test "-var-show-format weird.func_ptr" \
+	"\\^done,format=\"zero-hexadecimal\"" \
+	"show format variable weird.func_ptr (zhex)"
+
+mi_gdb_test "-var-set-format weird.func_ptr_ptr zero-hexadecimal" \
+	"\\^done,format=\"zero-hexadecimal\",value=\"$hex\"" \
+	"set format variable weird.func_ptr_ptr in zero-padded hex"
+
+mi_gdb_test "-var-show-format weird.func_ptr_ptr" \
+	"\\^done,format=\"zero-hexadecimal\"" \
+	"show format variable weird.func_ptr_ptr (zhex)"
 
 # Test: c_variable-6.24
 # Desc: format of weird and children
-- 
1.9.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 3/3] Documentation changes for the new zero-hexadecimal format
  2015-05-07 17:37 ` [PATCH v2 3/3] Documentation changes for the new zero-hexadecimal format Luis Machado
@ 2015-05-07 18:01   ` Eli Zaretskii
  0 siblings, 0 replies; 11+ messages in thread
From: Eli Zaretskii @ 2015-05-07 18:01 UTC (permalink / raw)
  To: Luis Machado; +Cc: gdb-patches

> From: Luis Machado <lgustavo@codesourcery.com>
> Date: Thu, 7 May 2015 14:36:47 -0300
> 
> This patch updates the documentation to reflect the addition of the new
> zero-hexadecimal format option for -var-set-format and also adds a NEWS entry
> for the change.
> 
> I changed it from zhexadecimal to zero-hexadecimal so the IDE folks can
> properly translate the string to something more reasonable.

This is OK, but please make the ChangeLog entries more
self-explanatory.  Right now, they are not really informative:

	* NEWS: Add new note to MI changes.
	* gdb.texinfo (GDB/MI Variable Objects): Update text for
	-var-set-format.

They should mention "zero-hexadecimal", at the least.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/3] Add zero-padded hexadecimal format support for varobj's
  2015-05-07 17:37 ` [PATCH v2 1/3] Add zero-padded hexadecimal format support for varobj's Luis Machado
@ 2015-05-08 17:28   ` Joel Brobecker
  2015-05-08 18:23     ` Luis Machado
  0 siblings, 1 reply; 11+ messages in thread
From: Joel Brobecker @ 2015-05-08 17:28 UTC (permalink / raw)
  To: Luis Machado; +Cc: gdb-patches

> gdb/ChangeLog:
> 
> 2015-05-07  Luis Machado  <lgustavo@codesourcery.com>
> 
> 	* gdb/mi/mi-cmd-var.c (mi_parse_format): Handle new "zero-hexadecimal"
> 	format.
> 	* gdb/varobj.c (varobj_format_string): Add "zero-hexadecimal" entry.
> 	(format_code): Add 'z' entry.
> 	(varobj_set_display_format): Handle FORMAT_ZHEXADECIMAL.
> 	* gdb/varobj.h (varobj_display_formats) <FORMAT_ZHEXADECIMAL>: New enum
> 	field.

I don't normally have authority to approve, but the patch looks
sufficiently mechanical that I think I can provide approval if
the area maintainer isn't available.

In the meantime, I noticed a few nits (formatting, mostly).

>    error (_("Must specify the format as: \"natural\", "
> -	   "\"binary\", \"decimal\", \"hexadecimal\", or \"octal\""));
> +	   "\"binary\", \"decimal\", \"hexadecimal\", \"octal\" or \"zero-hexadecimal\""));

The last line is too long. Can you split it?

> @@ -50,7 +50,7 @@ show_varobjdebug (struct ui_file *file, int from_tty,
>  
>  /* String representations of gdb's format codes.  */
>  char *varobj_format_string[] =
> -  { "natural", "binary", "decimal", "hexadecimal", "octal" };
> +  { "natural", "binary", "decimal", "hexadecimal", "octal", "zero-hexadecimal" };

Same here.

> --- a/gdb/varobj.h
> +++ b/gdb/varobj.h
> @@ -28,7 +28,8 @@ enum varobj_display_formats
>      FORMAT_BINARY,		/* Binary display                    */
>      FORMAT_DECIMAL,		/* Decimal display                   */
>      FORMAT_HEXADECIMAL,		/* Hex display                       */
> -    FORMAT_OCTAL		/* Octal display                     */
> +    FORMAT_OCTAL,		/* Octal display                     */
> +    FORMAT_ZHEXADECIMAL		/* Zero padded hexadecimal	     */
>    };

I suggest adding a ',' at the end of FORMAT_ZHEXADECIMAL.
That way, next time we add a new enum, we can just add it
without touching the rest of the definition.

-- 
Joel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 2/3] Add varobj zero-hexadecimal format tests.
  2015-05-07 17:37 ` [PATCH v2 2/3] Add varobj zero-hexadecimal format tests Luis Machado
@ 2015-05-08 17:30   ` Joel Brobecker
  0 siblings, 0 replies; 11+ messages in thread
From: Joel Brobecker @ 2015-05-08 17:30 UTC (permalink / raw)
  To: Luis Machado; +Cc: gdb-patches

> 2015-05-07  Luis Machado  <lgustavo@codesourcery.com>
> 
> 	* gdb.mi/mi-var-display.exp: Add new checks for the zero-hexadecimal
> 	  format and change test names to make them unique.

Looks good!

-- 
Joel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/3] Add zero-padded hexadecimal format support for varobj's
  2015-05-08 17:28   ` Joel Brobecker
@ 2015-05-08 18:23     ` Luis Machado
  2015-05-11 20:55       ` Joel Brobecker
  0 siblings, 1 reply; 11+ messages in thread
From: Luis Machado @ 2015-05-08 18:23 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 2051 bytes --]

On 05/08/2015 02:28 PM, Joel Brobecker wrote:
>> gdb/ChangeLog:
>>
>> 2015-05-07  Luis Machado  <lgustavo@codesourcery.com>
>>
>> 	* gdb/mi/mi-cmd-var.c (mi_parse_format): Handle new "zero-hexadecimal"
>> 	format.
>> 	* gdb/varobj.c (varobj_format_string): Add "zero-hexadecimal" entry.
>> 	(format_code): Add 'z' entry.
>> 	(varobj_set_display_format): Handle FORMAT_ZHEXADECIMAL.
>> 	* gdb/varobj.h (varobj_display_formats) <FORMAT_ZHEXADECIMAL>: New enum
>> 	field.
>
> I don't normally have authority to approve, but the patch looks
> sufficiently mechanical that I think I can provide approval if
> the area maintainer isn't available.
>
> In the meantime, I noticed a few nits (formatting, mostly).
>
>>     error (_("Must specify the format as: \"natural\", "
>> -	   "\"binary\", \"decimal\", \"hexadecimal\", or \"octal\""));
>> +	   "\"binary\", \"decimal\", \"hexadecimal\", \"octal\" or \"zero-hexadecimal\""));
>
> The last line is too long. Can you split it?
>
>> @@ -50,7 +50,7 @@ show_varobjdebug (struct ui_file *file, int from_tty,
>>
>>   /* String representations of gdb's format codes.  */
>>   char *varobj_format_string[] =
>> -  { "natural", "binary", "decimal", "hexadecimal", "octal" };
>> +  { "natural", "binary", "decimal", "hexadecimal", "octal", "zero-hexadecimal" };
>
> Same here.
>
>> --- a/gdb/varobj.h
>> +++ b/gdb/varobj.h
>> @@ -28,7 +28,8 @@ enum varobj_display_formats
>>       FORMAT_BINARY,		/* Binary display                    */
>>       FORMAT_DECIMAL,		/* Decimal display                   */
>>       FORMAT_HEXADECIMAL,		/* Hex display                       */
>> -    FORMAT_OCTAL		/* Octal display                     */
>> +    FORMAT_OCTAL,		/* Octal display                     */
>> +    FORMAT_ZHEXADECIMAL		/* Zero padded hexadecimal	     */
>>     };
>
> I suggest adding a ',' at the end of FORMAT_ZHEXADECIMAL.
> That way, next time we add a new enum, we can just add it
> without touching the rest of the definition.
>

Thanks Joel.

I've updated the patch with your suggestions now.

Luis

[-- Attachment #2: 0001-zhexadecimal-varobj.diff --]
[-- Type: text/x-patch, Size: 2846 bytes --]

gdb/ChangeLog:

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

	* gdb/mi/mi-cmd-var.c (mi_parse_format): Handle new
	"zero-hexadecimal" format.
	* gdb/varobj.c (varobj_format_string): Add "zero-hexadecimal"
	entry.
	(format_code): Add 'z' entry.
	(varobj_set_display_format): Handle FORMAT_ZHEXADECIMAL.
	* gdb/varobj.h (varobj_display_formats) <FORMAT_ZHEXADECIMAL>: New
	enum field.
---
 gdb/mi/mi-cmd-var.c | 5 ++++-
 gdb/varobj.c        | 6 ++++--
 gdb/varobj.h        | 3 ++-
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c
index ee0bbc6..fcf3060 100644
--- a/gdb/mi/mi-cmd-var.c
+++ b/gdb/mi/mi-cmd-var.c
@@ -233,10 +233,13 @@ mi_parse_format (const char *arg)
 	return FORMAT_HEXADECIMAL;
       else if (strncmp (arg, "octal", len) == 0)
 	return FORMAT_OCTAL;
+      else if (strncmp (arg, "zero-hexadecimal", len) == 0)
+	return FORMAT_ZHEXADECIMAL;
     }
 
   error (_("Must specify the format as: \"natural\", "
-	   "\"binary\", \"decimal\", \"hexadecimal\", or \"octal\""));
+	   "\"binary\", \"decimal\", \"hexadecimal\", \"octal\" or "
+	   "\"zero-hexadecimal\""));
 }
 
 void
diff --git a/gdb/varobj.c b/gdb/varobj.c
index b220fd8..87c48a4 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -50,7 +50,8 @@ show_varobjdebug (struct ui_file *file, int from_tty,
 
 /* String representations of gdb's format codes.  */
 char *varobj_format_string[] =
-  { "natural", "binary", "decimal", "hexadecimal", "octal" };
+  { "natural", "binary", "decimal", "hexadecimal", "octal",
+    "zero-hexadecimal" };
 
 /* True if we want to allow Python-based pretty-printing.  */
 static int pretty_printing = 0;
@@ -214,7 +215,7 @@ static struct varobj *varobj_add_child (struct varobj *var,
 /* Private data */
 
 /* Mappings of varobj_display_formats enums to gdb's format codes.  */
-static int format_code[] = { 0, 't', 'd', 'x', 'o' };
+static int format_code[] = { 0, 't', 'd', 'x', 'o', 'z' };
 
 /* Header of the list of root variable objects.  */
 static struct varobj_root *rootlist;
@@ -583,6 +584,7 @@ varobj_set_display_format (struct varobj *var,
     case FORMAT_DECIMAL:
     case FORMAT_HEXADECIMAL:
     case FORMAT_OCTAL:
+    case FORMAT_ZHEXADECIMAL:
       var->format = format;
       break;
 
diff --git a/gdb/varobj.h b/gdb/varobj.h
index 8860526..0f643aa 100644
--- a/gdb/varobj.h
+++ b/gdb/varobj.h
@@ -28,7 +28,8 @@ enum varobj_display_formats
     FORMAT_BINARY,		/* Binary display                    */
     FORMAT_DECIMAL,		/* Decimal display                   */
     FORMAT_HEXADECIMAL,		/* Hex display                       */
-    FORMAT_OCTAL		/* Octal display                     */
+    FORMAT_OCTAL,		/* Octal display                     */
+    FORMAT_ZHEXADECIMAL,	/* Zero-padded hexadecimal	     */
   };
 
 enum varobj_type
-- 
1.9.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/3] Add zero-padded hexadecimal format support for varobj's
  2015-05-08 18:23     ` Luis Machado
@ 2015-05-11 20:55       ` Joel Brobecker
  2015-05-20 12:16         ` Luis Machado
  0 siblings, 1 reply; 11+ messages in thread
From: Joel Brobecker @ 2015-05-11 20:55 UTC (permalink / raw)
  To: Luis Machado; +Cc: gdb-patches

> On 05/08/2015 02:28 PM, Joel Brobecker wrote:
> >>gdb/ChangeLog:
> >>
> >>2015-05-07  Luis Machado  <lgustavo@codesourcery.com>
> >>
> >>	* gdb/mi/mi-cmd-var.c (mi_parse_format): Handle new "zero-hexadecimal"
> >>	format.
> >>	* gdb/varobj.c (varobj_format_string): Add "zero-hexadecimal" entry.
> >>	(format_code): Add 'z' entry.
> >>	(varobj_set_display_format): Handle FORMAT_ZHEXADECIMAL.
> >>	* gdb/varobj.h (varobj_display_formats) <FORMAT_ZHEXADECIMAL>: New enum
> >>	field.
> >
> >I don't normally have authority to approve, but the patch looks
> >sufficiently mechanical that I think I can provide approval if
> >the area maintainer isn't available.
[...]
> I've updated the patch with your suggestions now.

Thanks, Luis. FWIW, the patch looks good to me. Let's wait one more
week for the MI maintainer to give any feedback, but otherwise just
go ahead and push (based on the fact that it's fairly consistent with
what we already have, and a fairly mechanical change).

-- 
Joel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/3] Add zero-padded hexadecimal format support for varobj's
  2015-05-11 20:55       ` Joel Brobecker
@ 2015-05-20 12:16         ` Luis Machado
  2015-05-25 23:39           ` Luis Machado
  0 siblings, 1 reply; 11+ messages in thread
From: Luis Machado @ 2015-05-20 12:16 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: gdb-patches

On 05/11/2015 05:55 PM, Joel Brobecker wrote:
>> On 05/08/2015 02:28 PM, Joel Brobecker wrote:
>>>> gdb/ChangeLog:
>>>>
>>>> 2015-05-07  Luis Machado  <lgustavo@codesourcery.com>
>>>>
>>>> 	* gdb/mi/mi-cmd-var.c (mi_parse_format): Handle new "zero-hexadecimal"
>>>> 	format.
>>>> 	* gdb/varobj.c (varobj_format_string): Add "zero-hexadecimal" entry.
>>>> 	(format_code): Add 'z' entry.
>>>> 	(varobj_set_display_format): Handle FORMAT_ZHEXADECIMAL.
>>>> 	* gdb/varobj.h (varobj_display_formats) <FORMAT_ZHEXADECIMAL>: New enum
>>>> 	field.
>>>
>>> I don't normally have authority to approve, but the patch looks
>>> sufficiently mechanical that I think I can provide approval if
>>> the area maintainer isn't available.
> [...]
>> I've updated the patch with your suggestions now.
>
> Thanks, Luis. FWIW, the patch looks good to me. Let's wait one more
> week for the MI maintainer to give any feedback, but otherwise just
> go ahead and push (based on the fact that it's fairly consistent with
> what we already have, and a fairly mechanical change).
>

Thanks Joel. I'll push this one until the end of the week.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/3] Add zero-padded hexadecimal format support for varobj's
  2015-05-20 12:16         ` Luis Machado
@ 2015-05-25 23:39           ` Luis Machado
  0 siblings, 0 replies; 11+ messages in thread
From: Luis Machado @ 2015-05-25 23:39 UTC (permalink / raw)
  To: Luis Machado, Joel Brobecker; +Cc: gdb-patches, Eli Zaretskii

On 05/20/2015 09:15 AM, Luis Machado wrote:
> On 05/11/2015 05:55 PM, Joel Brobecker wrote:
>>> On 05/08/2015 02:28 PM, Joel Brobecker wrote:
>>>>> gdb/ChangeLog:
>>>>>
>>>>> 2015-05-07  Luis Machado  <lgustavo@codesourcery.com>
>>>>>
>>>>>     * gdb/mi/mi-cmd-var.c (mi_parse_format): Handle new
>>>>> "zero-hexadecimal"
>>>>>     format.
>>>>>     * gdb/varobj.c (varobj_format_string): Add "zero-hexadecimal"
>>>>> entry.
>>>>>     (format_code): Add 'z' entry.
>>>>>     (varobj_set_display_format): Handle FORMAT_ZHEXADECIMAL.
>>>>>     * gdb/varobj.h (varobj_display_formats) <FORMAT_ZHEXADECIMAL>:
>>>>> New enum
>>>>>     field.
>>>>
>>>> I don't normally have authority to approve, but the patch looks
>>>> sufficiently mechanical that I think I can provide approval if
>>>> the area maintainer isn't available.
>> [...]
>>> I've updated the patch with your suggestions now.
>>
>> Thanks, Luis. FWIW, the patch looks good to me. Let's wait one more
>> week for the MI maintainer to give any feedback, but otherwise just
>> go ahead and push (based on the fact that it's fairly consistent with
>> what we already have, and a fairly mechanical change).
>>
>
> Thanks Joel. I'll push this one until the end of the week.
>
>

I've pushed this now.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-05-25 23:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-07 17:37 [PATCH v2 0/3] varobj zero-padded hexadecimal format Luis Machado
2015-05-07 17:37 ` [PATCH v2 3/3] Documentation changes for the new zero-hexadecimal format Luis Machado
2015-05-07 18:01   ` Eli Zaretskii
2015-05-07 17:37 ` [PATCH v2 2/3] Add varobj zero-hexadecimal format tests Luis Machado
2015-05-08 17:30   ` Joel Brobecker
2015-05-07 17:37 ` [PATCH v2 1/3] Add zero-padded hexadecimal format support for varobj's Luis Machado
2015-05-08 17:28   ` Joel Brobecker
2015-05-08 18:23     ` Luis Machado
2015-05-11 20:55       ` Joel Brobecker
2015-05-20 12:16         ` Luis Machado
2015-05-25 23:39           ` Luis Machado

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).