This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: add ability to "source" Python code
Joel> 1. If we have filename-extension detection (controlled by a
Joel> setting), do we need the "-p" switch at all?
Eli> I'm okay with this, but I think Tom had some valid reasons for
Eli> having Python scripts that don't have a certain extension.
It is a convenience when using scratch files.
In practice I don't use -p much. I don't mind removing it.
Joel> Now that I've written all this and that it has given me a chance
Joel> to think this over a little more, I like the idea of falling back
Joel> to GDB scripts less and less. So much so that I'm wondering whether
Joel> using a different command than "source" might be better? "pysource"
Joel> for instance?
I considered this early on and rejected it, because "source" is
clearer and "felt natural".
FWIW you can write pysource in a few lines of Python, if you really
want to go that route. People who miss the "source" feature can just
do this themselves.
Thanks for trying to find a compromise solution.
Tom