This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[python] gdb.read_memory -> Inferior.read_memory

Looks like doc and comments are out of date.  This patch is to replace
gdb.{read_memory,write_memory} with Inferior.{read_memory,write_memory}.

Is it OK?


2012-06-18  Yao Qi  <>

	* python/py-inferior.c: Update comments of infpy_read_memory
	and infpy_write_memory.


2012-06-18  Yao Qi  <>

	* gdb.texinfo (Inferiors In Python): Replace "gdb.read_memory"
	and "gdb.write_memory" with "Inferior.read_memory" and
 gdb/doc/gdb.texinfo      |   10 +++++-----
 gdb/python/py-inferior.c |    4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index ad227a4..65cf8b3 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -23888,20 +23888,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}
+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 0ea4f55..efbf14b 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]