From patchwork Wed Jun 28 15:41:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 71813 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C3A2C3858D3C for ; Wed, 28 Jun 2023 15:42:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C3A2C3858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1687966933; bh=Mq9oW1Tzp4s0bhjsNsLLFDBQBCpcElxbMbM4fAeD78E=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=hn9Wggb0W+f1ztKvOZ90YBcvAcK8TBdQvxgJRIdEW9ziVOBRQiOeurHDQj8aL5J/c eX5ZrNrX6ULen8IFdI+p3/dqM+skxg7fpvLOC0xIRfPKgU58XTPZOW+vyIJGva/EOs 1osyb2L0HAqLVcwoSl+1M1GEMG0csPvu16zxTRIg= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-il1-x134.google.com (mail-il1-x134.google.com [IPv6:2607:f8b0:4864:20::134]) by sourceware.org (Postfix) with ESMTPS id 766C73858D35 for ; Wed, 28 Jun 2023 15:41:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 766C73858D35 Received: by mail-il1-x134.google.com with SMTP id e9e14a558f8ab-3456fda4ed1so23302385ab.0 for ; Wed, 28 Jun 2023 08:41:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687966908; x=1690558908; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Mq9oW1Tzp4s0bhjsNsLLFDBQBCpcElxbMbM4fAeD78E=; b=Tx1Lu1sEXevSxSzyxQW8W/nM9Po2Eu/1C8DtI94GDsBmqQ62wSth67+8arpFD4y3h0 AoBSlChTD7K2QFv+iBUWvz30QmpUvCnzJaW6MfDV7jPw98F/qwiU4OvCh4e5fdrJ51BH hhpsghhESlBA7F8r+INySpX20/J/W1DyQ2HF2U4JG4PDbqDBmfD86kRpPtGsF35KocFJ TJ1L0wyOU7FV+rk+U0mchV6lGe4IGR/Y8mY6uIGU68NpBdHZFESK/mKI6Ki9UPoI4no0 M24WGjtxq3fPfGLkLFkEfGqf/cgFTndR2uJ4arSyWIWBcD7LdzSeY5mAuoRgktjEI2t/ UNgA== X-Gm-Message-State: AC+VfDwu+DH81myhQWMOlZWfbkdkMHtAF9nsymHYYGJ9fG0T6wmXxyfN FkPE83x6Kcidf+ESnF9dEwUoxXGgRm2ymNAIefcHXA== X-Google-Smtp-Source: ACHHUZ62QADyyTBy4kcqQqLRu2G0AxcXdpHkRKXluCvzu4TQBP+otk1Ao1WpU71G8nAsO9rl2WnjSw== X-Received: by 2002:a92:cb51:0:b0:345:d00f:98b7 with SMTP id f17-20020a92cb51000000b00345d00f98b7mr988343ilq.24.1687966908581; Wed, 28 Jun 2023 08:41:48 -0700 (PDT) Received: from localhost.localdomain (71-211-136-248.hlrn.qwest.net. [71.211.136.248]) by smtp.gmail.com with ESMTPSA id z12-20020a92cecc000000b00345b7328c99sm1296924ilq.79.2023.06.28.08.41.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jun 2023 08:41:48 -0700 (PDT) To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH] Remove Python 2 from gdb documentation Date: Wed, 28 Jun 2023 09:41:38 -0600 Message-Id: <20230628154138.2727810-1-tromey@adacore.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tom Tromey via Gdb-patches From: Tom Tromey Reply-To: Tom Tromey Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" GDB can't be built using Python 2 any more, so remove the remaining vestiges of this from the documentation. --- gdb/doc/python.texi | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi index 9cb97a9597d..ee24113e336 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} 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