Re: [RFA][patch 1/9] Yet another respin of the patch with initial Python support

Daniel Jacobowitz
2008-07-26T14:42:11Z

On Sat, Jul 26, 2008 at 05:01:14PM +0300, Eli Zaretskii wrote:
> > The bits added by
> > this patch are similar to canned sequences of commands ("define"), but
> > this is the first patch of hopefully many; you'll be able to use it
> > for more than just macros.
>
> Sorry, I don't understand this rationale (and what does it have to do
> with macros? what macros?). Please elaborate.

Sorry, I'm used to thinking of user-defined commands as macros.
Sloppy choice of terminology.

> My rationale is simple: we should have a single chapter for scripting,
> because that's where a reader would look for information on how to
> write GDB scripts. If there's sense to distributing this information
> between separate chapters, please explain what that is.

Ok, in that case I have an alternative suggestion: how about renaming
the combined scripting chapter, and putting both Python scripting and
the existing information in the new chapter?

I don't think Python makes sense as a section of "Canned Sequences of
Commands", because Python scripts don't contain GDB commands. And
they will be able to respond to events that CLI scripts can not
respond to, because we can pass structured information to Python
scripts and retrieve structured results. For example, we can pass a
value or type and get back a friendlier display value or type; the
long-requested C++/STL pretty-printing support.

--
Daniel Jacobowitz
CodeSourcery