* 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".
This commit is contained in:
Yao Qi 2012-06-20 04:02:22 +00:00
parent a62e34ed5c
commit 2678e2af1f
4 changed files with 18 additions and 7 deletions

View File

@ -1,3 +1,8 @@
2012-06-20 Yao Qi <yao@codesourcery.com>
* python/py-inferior.c: Update comments of infpy_read_memory
and infpy_write_memory.
2012-06-19 Tom Tromey <tromey@redhat.com>
PR exp/9514:

View File

@ -1,3 +1,9 @@
2012-06-20 Yao Qi <yao@codesourcery.com>
* 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 <pertusus@free.fr> (tiny change)
* gdb.texinfo (Summary): Add a link to "Free Documentation".

View File

@ -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

View File

@ -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