This is the mail archive of the gdb-patches@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: RFC: add ability to "source" Python code


> Date: Mon, 9 Feb 2009 22:48:34 -0500
> From: Daniel Jacobowitz <drow@false.org>
> Cc: Tom Tromey <tromey@redhat.com>, gdb-patches@sourceware.org
> 
> On Tue, Feb 10, 2009 at 02:35:59AM +0000, Pedro Alves wrote:
> > On Tuesday 10 February 2009 01:27:32, Tom Tromey wrote:
> > > >>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:
> > > 
> > > Pedro> Could you explain for the archives why this is better than having
> > > Pedro> the script itself tell GDB that it's running python? ?Either
> > > Pedro> through something similar to a shebang, or starting the script with
> > > Pedro> "python" (does that work?) ? ?I think you've discussed this before,
> > > Pedro> what were the limitations you found?
> > > 
> > > I think you may be thinking of invoking a python script using
> > > "#!.../gdb -something". ?This patch does not cover that case. ?That is
> > > a separate patch, which I haven't submitted.
> 
> I had something like "# *-python-*" in mind... :-)

Yes.  I think this is by far the best solution, one that will keep
back compatibility without hampering any of the new and valuable
Python features.

Can we agree on using such cookies in GDB scripts written in Python?
Then we won't need the -p switch or the .py extension detection.


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