RE: [PATCH] enhancement of mi_cmd_data_write_memory_bytes for filling memory regions (was [PATCH] new MI command for pattern filling of memory regions)

Giuseppe MONTALTO
2012-10-18T13:40:52Z

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

Thanks for the feedback,

I attached an additional patch, containing the requested changes in NEWS
and gdb.texinfo.

Please, consider revising it, and forgive me in advance for mistreating the
English grammar!

Regards,
Giuseppe

> -----Original Message-----
> From: Tom Tromey [mailto:tromey@redhat.com]
> Sent: Wednesday, October 17, 2012 10:59 PM
> To: Giuseppe MONTALTO
> Cc: gdb-patches@sourceware.org; Abid, Hafiz
> Subject: Re: [PATCH] enhancement of mi_cmd_data_write_memory_bytes
> for filling memory regions (was [PATCH] new MI command for pattern filling
> of memory regions)
>
> >>>>> "Giuseppe" == Giuseppe MONTALTO <giuseppe.montalto@st.com>
> writes:
>
> Sorry about the delay on this.
>
> Giuseppe> New patch attached:
> Giuseppe> - removed trivial comments
> Giuseppe> - removed redundant "else if" clause Any further feedback is
> Giuseppe> always welcome,
>
> The patch looks good.
> Is there a documentation part as well? I forget.
> If so, and it has been approved, it should all go in with a single commit.
> If not, then you need to patch gdb.texinfo and NEWS as well.
>
> thanks,
> Tom

[-- Attachment #2: PATCH_addendum.patch --]
[-- Type: application/octet-stream, Size: 1711 bytes --]

gdb/NEWS | 2 ++
gdb/doc/gdb.texinfo | 11 ++++++++++-
2 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/gdb/NEWS b/gdb/NEWS
index abd0932..f32e51e 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -57,6 +57,8 @@ py [command]
using new async records "=tsv-created" and "=tsv-deleted".
** The start and stop of process record are now notified using new
async record "=record-started" and "=record-stopped".
+ ** New optional parameter added to the "-data-write-memory-bytes" command,
+ to allow pattern filling of memory areas.

*** Changes in GDB 7.5

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 5fcbada..13fc63f 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -31192,7 +31192,7 @@ The corresponding @value{GDBN} command is @samp{x}.
@subsubheading Synopsis

@smallexample
- -data-write-memory-bytes @var{address} @var{contents}
+ -data-write-memory-bytes @var{address} @var{contents} @r{[}@var{count}@r{]}
@end smallexample

@noindent
@@ -31207,6 +31207,9 @@ quoted using the C convention.
@item @var{contents}
The hex-encoded bytes to write.

+@item @var{count}
+Optional argument indicating the number of bytes to be written. If @var{count} is bigger than @var{contents}' length, pattern filling occurs.
+
@end table

@subsubheading @value{GDBN} Command
@@ -31222,6 +31225,12 @@ There's no corresponding @value{GDBN} command.
(gdb)
@end smallexample

+@smallexample
+(gdb)
+-data-write-memory-bytes &a "aabbccdd" 16e
+^done
+(gdb)
+@end smallexample

@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node GDB/MI Tracepoint Commands