From 2678e2af1fd5f3e779f668b107ef08eda70f145a Mon Sep 17 00:00:00 2001 From: Yao Qi Date: Wed, 20 Jun 2012 04:02:22 +0000 Subject: [PATCH] * python/py-inferior.c: Update comments of infpy_read_memory and infpy_write_memory. gdb/doc: * gdb.texinfo (Inferiors In Python): Replace "gdb.read_memory" and "gdb.write_memory" with "Inferior.read_memory" and "Inferior.write_memory". --- gdb/ChangeLog | 5 +++++ gdb/doc/ChangeLog | 6 ++++++ gdb/doc/gdb.texinfo | 10 +++++----- gdb/python/py-inferior.c | 4 ++-- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 36a04bae677..857fde806ea 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2012-06-20 Yao Qi + + * python/py-inferior.c: Update comments of infpy_read_memory + and infpy_write_memory. + 2012-06-19 Tom Tromey PR exp/9514: diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 150318e6348..586f7089257 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,9 @@ +2012-06-20 Yao Qi + + * gdb.texinfo (Inferiors In Python): Replace "gdb.read_memory" + and "gdb.write_memory" with "Inferior.read_memory" and + "Inferior.write_memory". + 2012-06-15 Patrice Dumas (tiny change) * gdb.texinfo (Summary): Add a link to "Free Documentation". diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index a14e322c44e..f7946cdeb40 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -23890,20 +23890,20 @@ when it is called. If there are no valid threads, the method will return an empty tuple. @end defun -@findex gdb.read_memory +@findex Inferior.read_memory @defun Inferior.read_memory (address, length) Read @var{length} bytes of memory from the inferior, starting at @var{address}. Returns a buffer object, which behaves much like an array -or a string. It can be modified and given to the @code{gdb.write_memory} -function. +or a string. It can be modified and given to the +@code{Inferior.write_memory} function. @end defun -@findex gdb.write_memory +@findex Inferior.write_memory @defun Inferior.write_memory (address, buffer @r{[}, length@r{]}) Write the contents of @var{buffer} to the inferior, starting at @var{address}. The @var{buffer} parameter must be a Python object which supports the buffer protocol, i.e., a string, an array or the -object returned from @code{gdb.read_memory}. If given, @var{length} +object returned from @code{Inferior.read_memory}. If given, @var{length} determines the number of bytes from @var{buffer} to be written. @end defun diff --git a/gdb/python/py-inferior.c b/gdb/python/py-inferior.c index 0ea4f55d812..efbf14b061c 100644 --- a/gdb/python/py-inferior.c +++ b/gdb/python/py-inferior.c @@ -392,7 +392,7 @@ gdbpy_inferiors (PyObject *unused, PyObject *unused2) /* Membuf and memory manipulation. */ -/* Implementation of gdb.read_memory (address, length). +/* Implementation of Inferior.read_memory (address, length). Returns a Python buffer object with LENGTH bytes of the inferior's memory at ADDRESS. Both arguments are integers. Returns NULL on error, with a python exception set. */ @@ -455,7 +455,7 @@ infpy_read_memory (PyObject *self, PyObject *args, PyObject *kw) return result; } -/* Implementation of gdb.write_memory (address, buffer [, length]). +/* Implementation of Inferior.write_memory (address, buffer [, length]). Writes the contents of BUFFER (a Python object supporting the read buffer protocol) at ADDRESS in the inferior's memory. Write LENGTH bytes from BUFFER, or its entire contents if the argument is not -- 2.30.2