This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: repo to work on python scripting support


On Tue, Mar 25, 2008 at 11:30 AM, Daniel Jacobowitz >  Hmm, I've
worked with some packages that did similar things using
>  mandatory docstrings.
>
>  def strcmp (expr1, expr2):
>   """strcmp: EXPR, EXPR
>
>   Compare expr1 and expr2 as strings."""
>   doit
>
>  Dunno if that's wise.

Eww.  Emacs Lisp distinguishes docstrings from interactive specs.

In the example you give here, there's no nice way to break out and
allow arbitrary Python for computing the arguments; the 'arbitrary
lisp' escape hatch is necessary in Emacs from time to time.  With the
approach I suggested, it'd be pretty easy to have 'interactive' be
either a string or a method, and to have the GDB invocation code do
some reflection to decide how to interpret things.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]