From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14764 invoked by alias); 7 Feb 2009 10:02:15 -0000 Received: (qmail 14550 invoked by uid 22791); 7 Feb 2009 10:02:14 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_37,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout2.012.net.il (HELO mtaout2.012.net.il) (84.95.2.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 07 Feb 2009 10:02:06 +0000 Received: from conversion-daemon.i_mtaout2.012.net.il by i_mtaout2.012.net.il (HyperSendmail v2004.12) id <0KEO00B00X7KZR00@i_mtaout2.012.net.il> for gdb-patches@sourceware.org; Sat, 07 Feb 2009 12:02:27 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.229.238.131]) by i_mtaout2.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KEO00ACOX81DGF0@i_mtaout2.012.net.il>; Sat, 07 Feb 2009 12:02:26 +0200 (IST) Date: Sat, 07 Feb 2009 10:02:00 -0000 From: Eli Zaretskii Subject: Re: [RFC][python] Add support for commands implemented in Python In-reply-to: <1233956083.14735.115.camel@localhost.localdomain> To: Thiago Jung Bauermann Cc: tromey@redhat.com, gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 8BIT References: <1233580405.7000.13.camel@localhost.localdomain> <1233873605.14735.101.camel@localhost.localdomain> <1233952717.14735.113.camel@localhost.localdomain> <1233956083.14735.115.camel@localhost.localdomain> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-02/txt/msg00175.txt.bz2 > From: Thiago Jung Bauermann > Cc: Eli Zaretskii , gdb-patches@sourceware.org > Date: Fri, 06 Feb 2009 19:34:42 -0200 > > El vie, 06-02-2009 a las 13:52 -0700, Tom Tromey escribió: > > Thiago> I like your idea, I'm not sure if there was good reason for the > > Thiago> deviation other than that it was already present in the GDB source code > > Thiago> already. Tom, what do you think? > > > > It would be fine by me. I chose these names to mostly follow the > > internals, but following the help categories would also be ok. > > Great, I committed the following. Thanks. I fixed a few typos in your last patch, and also fixed a typo in a previous change from several days ago. While at that, I changed @code to @kbd in describing interactive input, and added a few cross-references and index entries. Here's what I checked in: 2009-02-07 Eli Zaretskii * gdb.texinfo (Basic Python): Fix change from 2009-02-04. (Commands In Python): Fix COMMAND_* constants in last change. Use @kbd for interactive input. Add cross-references and index entries. Index: gdb.texinfo =================================================================== RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v retrieving revision 1.557 diff -u -r1.557 gdb.texinfo --- gdb.texinfo 6 Feb 2009 22:59:01 -0000 1.557 +++ gdb.texinfo 7 Feb 2009 09:57:44 -0000 @@ -18171,7 +18171,7 @@ If @var{number} is negative, then @value{GDBN} will take its absolute value and count backward from the last element (i.e., the most recent element) to find the value to return. If @var{number} is zero, then @value{GDBN} will -return the most recent element. If the element specified by @value{number} +return the most recent element. If the element specified by @var{number} doesn't exist in the value history, a @code{RuntimeError} exception will be raised. @@ -18353,6 +18353,7 @@ not documented.'' is used. @end defmethod +@cindex don't repeat Python command @defmethod Command dont_repeat By default, a @value{GDBN} command is repeated when the user enters a blank line at the command prompt. A command can suppress this @@ -18374,11 +18375,13 @@ @code{error} call. Otherwise, the return value is ignored. @end defmethod +@cindex completion of Python commands @defmethod Command complete text word This method is called by @value{GDBN} when the user attempts completion on this command. All forms of completion are handled by -this method, that is, the @key{TAB} and @key{M-?} key bindings, and -the @code{complete} command. +this method, that is, the @key{TAB} and @key{M-?} key bindings +(@pxref{Completion}), and the @code{complete} command (@pxref{Help, +complete}). The arguments @var{text} and @var{word} are both strings. @var{text} holds the complete command line up to the cursor's location. @@ -18423,18 +18426,18 @@ @findex COMMAND_RUNNING @findex gdb.COMMAND_RUNNING -@item COMMAND_RUN +@item COMMAND_RUNNING The command is related to running the inferior. For example, @code{start}, @code{step}, and @code{continue} are in this category. -Type @code{help running} at the @value{GDBN} prompt to see a list of +Type @kbd{help running} at the @value{GDBN} prompt to see a list of commands in this category. @findex COMMAND_DATA @findex gdb.COMMAND_DATA -@item COMMAND_VARS +@item COMMAND_DATA The command is related to data or variables. For example, @code{call}, @code{find}, and @code{print} are in this category. Type -@code{help data} at the @value{GDBN} prompt to see a list of commands +@kbd{help data} at the @value{GDBN} prompt to see a list of commands in this category. @findex COMMAND_STACK @@ -18442,7 +18445,7 @@ @item COMMAND_STACK The command has to do with manipulation of the stack. For example, @code{backtrace}, @code{frame}, and @code{return} are in this -category. Type @code{help stack} at the @value{GDBN} prompt to see a +category. Type @kbd{help stack} at the @value{GDBN} prompt to see a list of commands in this category. @findex COMMAND_FILES @@ -18450,7 +18453,7 @@ @item COMMAND_FILES This class is used for file-related commands. For example, @code{file}, @code{list} and @code{section} are in this category. -Type @code{help files} at the @value{GDBN} prompt to see a list of +Type @kbd{help files} at the @value{GDBN} prompt to see a list of commands in this category. @findex COMMAND_SUPPORT @@ -18460,31 +18463,31 @@ things that are useful to the user when interacting with @value{GDBN}, but not related to the state of the inferior. For example, @code{help}, @code{make}, and @code{shell} are in this category. Type -@code{help support} at the @value{GDBN} prompt to see a list of +@kbd{help support} at the @value{GDBN} prompt to see a list of commands in this category. @findex COMMAND_STATUS @findex gdb.COMMAND_STATUS -@item COMMAND_INFO +@item COMMAND_STATUS The command is an @samp{info}-related command, that is, related to the state of @value{GDBN} itself. For example, @code{info}, @code{macro}, -and @code{show} are in this category. Type @code{help status} at the +and @code{show} are in this category. Type @kbd{help status} at the @value{GDBN} prompt to see a list of commands in this category. @findex COMMAND_BREAKPOINTS @findex gdb.COMMAND_BREAKPOINTS -@item COMMAND_BREAKPOINT +@item COMMAND_BREAKPOINTS The command has to do with breakpoints. For example, @code{break}, -@code{clear}, and @code{delete} are in this category. Type @code{help +@code{clear}, and @code{delete} are in this category. Type @kbd{help breakpoints} at the @value{GDBN} prompt to see a list of commands in this category. @findex COMMAND_TRACEPOINTS @findex gdb.COMMAND_TRACEPOINTS -@item COMMAND_TRACE +@item COMMAND_TRACEPOINTS The command has to do with tracepoints. For example, @code{trace}, @code{actions}, and @code{tfind} are in this category. Type -@code{help tracepoints} at the @value{GDBN} prompt to see a list of +@kbd{help tracepoints} at the @value{GDBN} prompt to see a list of commands in this category. @findex COMMAND_OBSCURE @@ -18492,7 +18495,7 @@ @item COMMAND_OBSCURE The command is only used in unusual circumstances, or is not of general interest to users. For example, @code{checkpoint}, -@code{fork}, and @code{stop} are in this category. Type @code{help +@code{fork}, and @code{stop} are in this category. Type @kbd{help obscure} at the @value{GDBN} prompt to see a list of commands in this category. @@ -18501,7 +18504,7 @@ @item COMMAND_MAINTENANCE The command is only useful to @value{GDBN} maintainers. The @code{maintenance} and @code{flushregs} commands are in this category. -Type @code{help internals} at the @value{GDBN} prompt to see a list of +Type @kbd{help internals} at the @value{GDBN} prompt to see a list of commands in this category. @end table