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
> Date: Wed, 11 Feb 2009 22:26:54 -0800
> From: Joel Brobecker <brobecker@adacore.com>
> Cc: tromey@redhat.com, bauerman@br.ibm.com, drow@false.org, pedro@codesourcery.com, gdb-patches@sourceware.org
>
> > > I could return the "heck of exaggeration" back by saying that we're only
> > > talking about the highly improbably GDB scripts whose name uses a standard
> > > Python extension.
> >
> > Yes, but I didn't say that makes the feature "much less useful". I
> > just said that I didn't like the incompatibility.
>
> I did mean what I said, and I don't think it's an exageration.
> Otherwise, I wouldn't be even arguing about it. I am OK with you
> not agreeing with that judgement, but you do make it sound like
> I'm obviously wrong. I cannot be that obvious
Joel, please read what I wrote, not what you think I said:
> Perhaps, but I believe that it makes the feature much much less useful
> that it would be.
I think that's a heck of exaggeration. We are talking about adding a
single line.
As you see, I didn't say you were obviously wrong. In fact, I didn't
even say you were wrong at all, just that "much less useful" was an
exaggeration, which is a far cry.
> Anyway, how about a compromise, then, and require the -p switch to
> source python scripts? The incompatibility is that
>
> (gdb) source -p foo
>
> would no longer work for file "-p foo". I think that's an acceptable
> "incompatibilty". Would you agree?
This is a misunderstanding: I didn't mind the -p switch, I mind the
fact that it throws an error if Python is not compiled in. Eliminate
the error, and you have me on board.