aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc/python.texi
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2023-06-28 09:39:37 -0600
committerTom Tromey <tromey@adacore.com>2023-06-28 10:55:58 -0600
commit914a96d71dd559116da780d48457606e8fe50770 (patch)
treeb9da9b5b6d8f4a9f6a01a578361a20757f63ec70 /gdb/doc/python.texi
parentedc1244e9b864daf7b3905fdcbe15407b6aa79e4 (diff)
downloadbinutils-914a96d71dd559116da780d48457606e8fe50770.zip
binutils-914a96d71dd559116da780d48457606e8fe50770.tar.gz
binutils-914a96d71dd559116da780d48457606e8fe50770.tar.bz2
Remove Python 2 from gdb documentation
GDB can't be built using Python 2 any more, so remove the remaining vestiges of this from the documentation. Approved-By: Eli Zaretskii <eliz@gnu.org>
Diffstat (limited to 'gdb/doc/python.texi')
-rw-r--r--gdb/doc/python.texi23
1 files changed, 8 insertions, 15 deletions
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index 9cb97a9..9a342f3 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -3508,11 +3508,10 @@ particular frame (@pxref{Frames In Python}).
@anchor{gdbpy_inferior_read_memory}
@findex Inferior.read_memory
@defun Inferior.read_memory (address, length)
-Read @var{length} addressable memory units 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{Inferior.write_memory} function. In Python 3, the return
-value is a @code{memoryview} object.
+Read @var{length} addressable memory units from the inferior, starting
+at @var{address}. Returns a @code{memoryview} object, which behaves
+much like an array or a string. It can be modified and given to the
+@code{Inferior.write_memory} function.
@end defun
@findex Inferior.write_memory
@@ -4060,8 +4059,7 @@ An integer representing this instruction's address.
@end defvar
@defvar Instruction.data
-A buffer with the raw instruction data. In Python 3, the return value is a
-@code{memoryview} object.
+A @code{memoryview} object holding the raw instruction data.
@end defvar
@defvar Instruction.decoded
@@ -6814,20 +6812,15 @@ If @var{packet} is not a @code{bytes} object, or a @code{Unicode}
string, then a @code{TypeError} is raised. If @var{packet} is empty
then a @code{ValueError} is raised.
-The response is returned as a @code{bytes} object. For Python 3 if it
-is known that the response can be represented as a string then this
-can be decoded from the buffer. For example, if it is known that the
+The response is returned as a @code{bytes} object. If it is known
+that the response can be represented as a string then this can be
+decoded from the buffer. For example, if it is known that the
response is an @sc{ascii} string:
@smallexample
remote_connection.send_packet("some_packet").decode("ascii")
@end smallexample
-In Python 2 @code{bytes} and @code{str} are aliases, so the result is
-already a string, if the response includes non-printable characters,
-or null characters, then these will be present in the result, care
-should be taken when processing the result to handle this case.
-
The prefix, suffix, and checksum (as required by the remote serial
protocol) are automatically added to the outgoing packet, and removed
from the incoming packet before the contents of the reply are