This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: repo to work on python scripting support
On Mon, Mar 24, 2008 at 11:32:16PM -0600, Tom Tromey wrote:
> I've been thinking... maybe we do want $(...) to allow things other
> than Python commands. Or, more precisely, maybe we want to let Python
> code register a function by name for use in $(...). The Python
> function would get the uninterpreted string argument for processing.
I was thinking about this unrelatedly last night and I agree, we
should register the arguments independently. I'm not so sure about
quoting decisions for the arguments yet, though. What I don't want to
do is end up with the GDB CLI again, where everyone who adds a command
picks a different way to quote the arguments.
Maybe we can handle this the same way that I have been speculating
about handling CLI commands: register a "prototype" of the function?
For example, you could register:
$(strcmp expression, "foo")
as "EXPRESSION, EXPRESSION". Other functions might not have the comma
if the preceeding argument was not an EXPRESSION.
--
Daniel Jacobowitz
CodeSourcery