This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch][python] 0 of 5 - Frame filters and Wrappers
- From: Phil Muldoon <pmuldoon at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Thu, 16 May 2013 14:15:10 +0100
- Subject: Re: [patch][python] 0 of 5 - Frame filters and Wrappers
- References: <51876848 dot 2020802 at redhat dot com> <518CD285 dot 4040706 at redhat dot com> <20130516115001 dot GA6684 at adacore dot com>
On 16/05/13 12:50, Joel Brobecker wrote:
> Hi Phil,
>
>> This patch-series has been committed in its entirety. Thank you for
>> the reviews, it is very much appreciated. I have attached the
>> ChangeLog entries as merged for committing the patch.
>
> There is something I noticed while using a debugger where the gdb
> modules cannot be found:
>
> (gdb) bt
> Python Exception <type 'exceptions.ImportError'> No module named gdb.frames:
>
> This is because I am using a debugger where python module path relocation
> is not working for some reason I am yet to investigate. But this would
> happen to someone improperly installing GDB as well. This can actually
> happen fairly often, because it's usual in emergency situations to just
> copy the gdb binary where you need it instead of the full blown install,
> knowingly letting go of the Python capabilities when you don't need them.
We can, I have no real opinion. In a case of an error importing that
module, we can set a flag to turn frame filters off. While I am
sympathetic, this scenario should never really happen if GDB was
compiled and installed with Python. (Well, obviously it did in your
scenario ;) But that's another bug).
But this I think is the tip of the iceberg with an improperly
installed Python GDB. I suspect pretty-printing will also suffer
failures, and other automatically instantiated Python bits within GDB.
Anyway, I'll write a patch to be more fault tolerant if nobody else
objects or has a differing opinion.
Cheers,
Phil