From patchwork Thu May 18 18:20:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 69628 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 D9B9B385770F for ; Thu, 18 May 2023 18:21:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D9B9B385770F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1684434091; bh=psoyAcixYWbQXkm9I18oRaJTSPa52966atmYLiCbAGU=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=FtqraWmotxXtjgt4w+4P/xeTJNZ0Tee2N2plEWwyLTAvz+huuSg03r0OOYYz6iUbG 0VozZ93DjPi6ZmXrMNbOVZGadNudmMpnU/17jIxZHLcMSMtxKAIftGI8NE9DUJZzGF XmiL8mloGgLRRluVx8C1ZiU0ILW3psExccIQjY88= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-il1-x12e.google.com (mail-il1-x12e.google.com [IPv6:2607:f8b0:4864:20::12e]) by sourceware.org (Postfix) with ESMTPS id AAF9F3858CDB for ; Thu, 18 May 2023 18:21:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AAF9F3858CDB Received: by mail-il1-x12e.google.com with SMTP id e9e14a558f8ab-3381a0cae92so18446705ab.0 for ; Thu, 18 May 2023 11:21:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684434067; x=1687026067; 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=psoyAcixYWbQXkm9I18oRaJTSPa52966atmYLiCbAGU=; b=Mg9stCYbpEb9N9CsN16nd9W1VWWD2wNRZt1IZniWWAVTIQ9cI8YVNeYNPZmoVbPyAz PUZKb7iJKqrXl9jMfDIcTd/i2cvZaMY2tZqM1B5+YkRlFT8wfRAFMKbmze4L+vPnHUtQ LdM4EX+VrVlxLQDEX+95PP67a3aRxxw9pWl3DO/0zGyHEbuJSyalFYClFzEHCmUksntV jyAl8rMEaQDYWELTKdzuvQrp2oWZYMwhFIK4nqdtdCyPzpCsnxpj8yIqguDx1qntHJAG axGBN3VNd9Qk69UxP2CPyoumDd+72s0y+MnEQtuS7U9LUHzQIKOB+811K3fnbMqXRsf9 ioAw== X-Gm-Message-State: AC+VfDxq6nyBZ7N6oKxy8eOji9BX8EzWBSp8leuDgYw3U/fjBNSKp38j Hu21QLEQA6dYSTo0GETRh4OcaERe1OWYKfw71+fMLA== X-Google-Smtp-Source: ACHHUZ75DmVij/9G1Ijbh+k3nzTcPsPGfZ+gpXfUYRBbRyty8g6MJrChDyP2s4+roh43wkS81wf/Tg== X-Received: by 2002:a05:6e02:4c4:b0:32b:75bc:cda2 with SMTP id f4-20020a056e0204c400b0032b75bccda2mr5259732ils.22.1684434066820; Thu, 18 May 2023 11:21:06 -0700 (PDT) Received: from localhost.localdomain (75-166-157-55.hlrn.qwest.net. [75.166.157.55]) by smtp.gmail.com with ESMTPSA id bs22-20020a056638451600b0040fc3b34d57sm605269jab.56.2023.05.18.11.21.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 11:21:06 -0700 (PDT) To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH] Use lower-case in @sc in the documentation Date: Thu, 18 May 2023 12:20:49 -0600 Message-Id: <20230518182049.3144025-1-tromey@adacore.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 X-Spam-Status: No, score=-11.0 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" Eli pointed out that @sc only produces small caps for lower case letters in its argument, so it's weird to write it using upper-case letters. This patch fixes the instances I found. --- gdb/doc/gdb.texinfo | 4 ++-- gdb/doc/python.texi | 34 +++++++++++++++++----------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 531147f6e6b..f23bcc5f3f8 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -30560,7 +30560,7 @@ occurs exactly once. @section @sc{gdb/mi} General Design @cindex GDB/MI General Design -Interaction of a @sc{GDB/MI} frontend with @value{GDBN} involves three +Interaction of a @sc{gdb/mi} frontend with @value{GDBN} involves three parts---commands sent to @value{GDBN}, responses to those commands and notifications. Each command results in exactly one response, indicating either successful completion of the command, or an error. @@ -34999,7 +34999,7 @@ objects. @end table In the future new values may be added to this list so the front should -be prepared for this possibility. @xref{GDB/MI Development and Front Ends, ,@sc{GDB/MI} Development and Front Ends}. +be prepared for this possibility. @xref{GDB/MI Development and Front Ends, ,@sc{gdb/mi} Development and Front Ends}. @item type_changed This is only present if the varobj is still valid. If the type diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi index 5d714ee1ca3..d93ee55690e 100644 --- a/gdb/doc/python.texi +++ b/gdb/doc/python.texi @@ -209,7 +209,7 @@ optional arguments while skipping others. Example: * Threads In Python:: Accessing inferior threads from Python. * Recordings In Python:: Accessing recordings from Python. * CLI Commands In Python:: Implementing new CLI commands in Python. -* GDB/MI Commands In Python:: Implementing new @sc{GDB/MI} commands in Python. +* GDB/MI Commands In Python:: Implementing new @sc{gdb/mi} commands in Python. * Parameters In Python:: Adding new @value{GDBN} parameters. * Functions In Python:: Writing new convenience functions. * Progspaces In Python:: Program spaces. @@ -2280,7 +2280,7 @@ must contain the frames that are being elided wrapped in a suitable frame decorator. If no frames are being elided this function may return an empty iterable, or @code{None}. Elided frames are indented from normal frames in a @code{CLI} backtrace, or in the case of -@sc{GDB/MI}, are placed in the @code{children} field of the eliding +@sc{gdb/mi}, are placed in the @code{children} field of the eliding frame. It is the frame filter's task to also filter out the elided frames from @@ -4437,13 +4437,13 @@ Python code is read into @value{GDBN}, you may need to import the @code{gdb} module explicitly. @node GDB/MI Commands In Python -@subsubsection @sc{GDB/MI} Commands In Python +@subsubsection @sc{gdb/mi} Commands In Python @cindex MI commands in python @cindex commands in python, GDB/MI @cindex python commands, GDB/MI -It is possible to add @sc{GDB/MI} (@pxref{GDB/MI}) commands -implemented in Python. A @sc{GDB/MI} command is implemented using an +It is possible to add @sc{gdb/mi} (@pxref{GDB/MI}) commands +implemented in Python. A @sc{gdb/mi} command is implemented using an instance of the @code{gdb.MICommand} class, most commonly using a subclass. @@ -4453,10 +4453,10 @@ with @value{GDBN}. This initializer is normally invoked from the subclass' own @code{__init__} method. @var{name} is the name of the command. It must be a valid name of a -@sc{GDB/MI} command, and in particular must start with a hyphen -(@code{-}). Reusing the name of a built-in @sc{GDB/MI} is not +@sc{gdb/mi} command, and in particular must start with a hyphen +(@code{-}). Reusing the name of a built-in @sc{gdb/mi} is not allowed, and a @code{RuntimeError} will be raised. Using the name -of an @sc{GDB/MI} command previously defined in Python is allowed, the +of an @sc{gdb/mi} command previously defined in Python is allowed, the previous command will be replaced with the new command. @end defun @@ -4469,18 +4469,18 @@ and @code{--frame} arguments are handled by @value{GDBN} itself therefore they do not show up in @code{arguments}. If this method raises an exception, then it is turned into a -@sc{GDB/MI} @code{^error} response. Only @code{gdb.GdbError} +@sc{gdb/mi} @code{^error} response. Only @code{gdb.GdbError} exceptions (or its sub-classes) should be used for reporting errors to users, any other exception type is treated as a failure of the @code{invoke} method, and the exception will be printed to the error stream according to the @kbd{set python print-stack} setting (@pxref{set_python_print_stack,,@kbd{set python print-stack}}). -If this method returns @code{None}, then the @sc{GDB/MI} command will +If this method returns @code{None}, then the @sc{gdb/mi} command will return a @code{^done} response with no additional values. Otherwise, the return value must be a dictionary, which is converted -to a @sc{GDB/MI} @var{result-record} (@pxref{GDB/MI Output Syntax}). +to a @sc{gdb/mi} @var{result-record} (@pxref{GDB/MI Output Syntax}). The keys of this dictionary must be strings, and are used as @var{variable} names in the @var{result-record}, these strings must comply with the naming rules detailed below. The values of this @@ -4489,20 +4489,20 @@ dictionary are recursively handled as follows: @itemize @item If the value is Python sequence or iterator, it is converted to -@sc{GDB/MI} @var{list} with elements converted recursively. +@sc{gdb/mi} @var{list} with elements converted recursively. @item If the value is Python dictionary, it is converted to -@sc{GDB/MI} @var{tuple}. Keys in that dictionary must be strings, +@sc{gdb/mi} @var{tuple}. Keys in that dictionary must be strings, which comply with the @var{variable} naming rules detailed below. Values are converted recursively. @item Otherwise, value is first converted to a Python string using -@code{str ()} and then converted to @sc{GDB/MI} @var{const}. +@code{str ()} and then converted to @sc{gdb/mi} @var{const}. @end itemize -The strings used for @var{variable} names in the @sc{GDB/MI} output +The strings used for @var{variable} names in the @sc{gdb/mi} output must follow the following rules; the string must be at least one character long, the first character must be in the set @code{[a-zA-Z]}, while every subsequent character must be in the set @@ -4512,7 +4512,7 @@ character long, the first character must be in the set An instance of @code{MICommand} has the following attributes: @defvar MICommand.name -A string, the name of this @sc{GDB/MI} command, as was passed to the +A string, the name of this @sc{gdb/mi} command, as was passed to the @code{__init__} method. This attribute is read-only. @end defvar @@ -4560,7 +4560,7 @@ MIEcho("-echo-string", "string") @end smallexample The last three lines instantiate the class three times, creating three -new @sc{GDB/MI} commands @code{-echo-dict}, @code{-echo-list}, and +new @sc{gdb/mi} commands @code{-echo-dict}, @code{-echo-list}, and @code{-echo-string}. Each time a subclass of @code{gdb.MICommand} is instantiated, the new command is automatically registered with @value{GDBN}.