From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 72066 invoked by alias); 22 Jul 2019 16:04:08 -0000 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 Received: (qmail 72052 invoked by uid 89); 22 Jul 2019 16:04:08 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.7 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 22 Jul 2019 16:03:58 +0000 Received: from [172.16.0.120] (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id B2F8F1EC28; Mon, 22 Jul 2019 12:03:56 -0400 (EDT) Subject: Re: [PATCH 1/3] Documentation for Python -P commandline support To: Kevin Buettner , gdb-patches@sourceware.org References: <20190721235427.21893-1-kevinb@redhat.com> <20190721235427.21893-2-kevinb@redhat.com> From: Simon Marchi Message-ID: <03a80f5c-f816-bb02-0453-92b97ec7156a@simark.ca> Date: Mon, 22 Jul 2019 16:04:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190721235427.21893-2-kevinb@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-07/txt/msg00520.txt.bz2 On 2019-07-21 7:54 p.m., Kevin Buettner wrote: > gdb/doc/ChangeLog: > > * gdb.texinfo (Mode Options): Add documentation for -P. > --- > gdb/doc/gdb.texinfo | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo > index eddd939869..868a1734de 100644 > --- a/gdb/doc/gdb.texinfo > +++ b/gdb/doc/gdb.texinfo > @@ -1252,6 +1252,16 @@ for remote debugging. > Run using @var{device} for your program's standard input and output. > @c FIXME: kingdon thinks there is more to -tty. Investigate. > > +@item -P > +@cindex @code{-P} > +@itemx --python > +@cindex @code{--python} > +Change interpretation of command line so that the argument immediately > +following this switch is taken to be the name of a Python script file. > +This option stops option processing; subsequent options are passed to > +Python as @code{sys.argv}. This option is only available if Python > +scripting support was enabled when @value{GDBN} was configured. > + > @c resolve the situation of these eventually > @item -tui > @cindex @code{--tui} > I think having an example would be helpful to understand how to use this feature, and how it differs from -x. It wasn't really obvious to me at first, so I suspect it won't be for other people less familiar with GDB. Simon