From patchwork Sat Jun 29 21:16:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Buettner X-Patchwork-Id: 33490 Received: (qmail 15903 invoked by alias); 29 Jun 2019 21:17:07 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 15890 invoked by uid 89); 29 Jun 2019 21:17:07 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-16.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=suggests, offer, HContent-Transfer-Encoding:8bit X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 29 Jun 2019 21:17:06 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6A6433688B for ; Sat, 29 Jun 2019 21:17:05 +0000 (UTC) Received: from f30-1.lan (ovpn-117-224.phx2.redhat.com [10.3.117.224]) by smtp.corp.redhat.com (Postfix) with ESMTP id 411E25D9C9; Sat, 29 Jun 2019 21:17:05 +0000 (UTC) From: Kevin Buettner To: gdb-patches@sourceware.org Cc: Kevin Buettner Subject: [PATCH] Make documentation of "python" command match actual behavior Date: Sat, 29 Jun 2019 14:16:55 -0700 Message-Id: <20190629211655.17906-1-kevinb@redhat.com> MIME-Version: 1.0 X-IsSubscribed: yes The example in the documentation for the "python" command shows GDB outputting instructions for how to terminate a sequence of python commands entered from the command line. The documentation shows that the following two lines are being output, though this does not occur when actually using the "python" command from GDB: Type python script End with a line saying just "end". While display of this text might be helpful, GDB has several other commands which also use the "end" terminator that offer no such text. Examples include the "if" and "while" commands. For example, (gdb) if 1==1 >print "a" >end $1 = "a" This seems similar to doing: (gdb) python >print 23 >end 23 If we decide that we want the "python" command to print such a message, we should also adjust the behavior for other GDB commands which also use "end" to terminate a command list. I.e, if this decision is made, the "if" and "while" commands ought to also print similar messages. So, for the moment anyway, this commit adjusts the documentation of the python command to match its implementation. This patch was taken from a larger body of work originating from the Archer project. I haven't been able to determine its original author, though I did find a commit log from Jan Kratochvil (in the Archer repository) which suggests that the change had originally been made to gdb.texinfo, but got inadvertently dropped when the python related documentation was split out to python.texi. gdb/doc/ChangeLog: * python.texi (python command): Revise example to match command behavior. --- gdb/doc/python.texi | 2 -- 1 file changed, 2 deletions(-) diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi index f769ad03a2..034623513b 100644 --- a/gdb/doc/python.texi +++ b/gdb/doc/python.texi @@ -90,8 +90,6 @@ containing @code{end}. For example: @smallexample (@value{GDBP}) python -Type python script -End with a line saying just "end". >print 23 >end 23