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: [PATCH] Make "backtrace" doesn't print python stack if init python dir get fail


>>>>> "Hui" == Hui Zhu <hui_zhu@mentor.com> writes:

Hui> I got a issue is ensure_python_env check gdb_python_initialized and
Hui> throw error if it is 0.  So gdb_python_initialized to 0 will make
Hui> some commands throw error when python dir has something error.  I
Hui> removed this check in the patch.

I think that's a useful consistency check, so better left in place.

Two other approaches are possible here instead.  One, change
finish_python_initialization to do the needed bit of locking by handy,
not using ensure_python_env.  Or, two, don't release the GIL until
somewhere in finish_python_initialization, and then it doesn't need
to call ensure_python_env at all.

Tom


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