From: Eli Zaretskii <eliz@gnu.org>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA/doco] Improve doc on how to execute a Python script from GDB.
Date: Tue, 19 Jan 2010 21:43:00 -0000 [thread overview]
Message-ID: <83hbqh7ovh.fsf@gnu.org> (raw)
In-Reply-To: <1263913679-22046-1-git-send-email-brobecker@adacore.com>
> From: Joel Brobecker <brobecker@adacore.com>
> Cc: Joel Brobecker <brobecker@adacore.com>
> Date: Tue, 19 Jan 2010 19:07:59 +0400
>
> gdb/doc/ChangeLog:
>
> * gdb.texinfo (File Options): Adjust the documentation of this
> switch to refer to the "source" command rather than partially
> duplicating some of the relevant information.
> (Extending GDB): Introduce and document the set/show script-extension
> setting.
> (Command Files): Add note explaining that the "source" command
> is also used to evalute scripts written in other languages.
> Remove the short slightly incorrect reference to sourcing Python
> scripts.
> (Python Commands): Document how to execute a Python script from GDB.
>
> I hope that this patch is going to improve the documentation, because
> I ended up spending a lot of time working on it :-(.
Thanks, I appreciate the effort.
> +Execute commands from file @var{file}. The contents of this file is
> +evaluated exactly as if it was evaluated using the @code{source} command.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
"exactly as the @code{source} command would."
> +To facilitate the use of these extensions, @value{GDBN} is capable
> +of evaluating the contents of a file. When doing so, @value{GDBN}
> +can recognize which scripting language is being used by exploiting
> +the filename extension. ^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^
"by looking at the filename extension" is simpler and more clear, I
think.
> +are always treated as a @value{GDBN} Command Files.
Please move here the xref to where Command Files are described, which
you have later. It should be where the term is first used.
> To control how GDB
> +evaluates these files, the following setting can be used:
Avoid passive tense:
You can control how @value{GDBN} evaluates these files with the
following setting:
> +The script name must end with @samp{.py} and GDB must be configured
^^^
@value{GDBN}
> +@item python execfile ("script-name")
> +This method is based on the @code{execfile} Python built-in function,
> +and thus is always available.
"always" as in "when Python is compiled in", right?
Thanks again for working on this.
next prev parent reply other threads:[~2010-01-19 21:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-19 15:08 Joel Brobecker
2010-01-19 21:43 ` Eli Zaretskii [this message]
2010-01-20 4:03 ` Joel Brobecker
2010-01-20 4:08 ` Joel Brobecker
2010-01-20 18:07 ` Eli Zaretskii
2010-01-21 4:35 ` Joel Brobecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83hbqh7ovh.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox