[RFC] syntax change for "record save"
Tom Tromey
tromey@redhat.com
Tue Dec 1 19:35:00 GMT 2009
>>>>> "Jakob" == Jakob Engblom <jakob@virtutech.com> writes:
Jakob> So we would do something like this:
simics> save ("file." + $a)
Jakob> (when the first argument to + is a string, the next argument is
Jakob> forced to a string)
Jakob> I think supporting string generation would solve many more
Jakob> problems easily.
The problem is that it is not obvious how to integrate this into the
existing gdb CLI. The CLI is not like a normal programming language,
with a regular syntax and a parser. Any regularity is just by
convention; each command is just passed a char* that it parses itself.
Of course, we could invent something. We could even turn the CLI into a
much more expressive language. I'd rather not, though -- we have Python
for that, and I think it is generally better to just reuse an existing
language than to try to invent a new one.
Jakob> The save name INDEX to me seems silly, if you are doing this
Jakob> manually, why don't you just type a different name each time?
Yeah, presumably this is only done via scripting. That's why I think it
is ok if the spelling of the commands is a bit verbose.
Tom
More information about the Gdb
mailing list