Re: repo to work on python scripting support

Tom Tromey
2008-03-25T21:28:39Z

>>>>> "Paul" == Paul Koning <Paul_Koning@Dell.com> writes:

Paul> Something akin to the way that C extension modules inside Python tell
Paul> the Python execution machinery what data type it wants might serve.

Yeah.

Paul> The notion of asking for a particular type is a bit foreign to Python;
Paul> arguments have no fixed type.

"Type" here was a confusing choice of word. It is really just about
having a declarative way to decide how to parse the argument string.

Paul> Another possibility is to pass strings but then have standard
Paul> conversion routines (things callable by Python and supplied by gdb).
Paul> For example parse_and_eval_address. And the target functions. And so
Paul> on.

One nice property of the declarative approach is that the core code
can automatically handle completion as well as parsing.

One idea is to let a Python class define a special method which is
used to parse the string. If there is no such method, we would look
for declarative properties.

Tom