This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [python] [patch] PR 13624
- From: Tom Tromey <tromey at redhat dot com>
- To: pmuldoon at redhat dot com
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 06 Oct 2011 07:51:10 -0600
- Subject: Re: [python] [patch] PR 13624
- References: <m3lisy8eui.fsf@redhat.com>
>>>>> "Phil" == Phil Muldoon <pmuldoon@redhat.com> writes:
Phil> The patch address PR 13624 which noted that in some instances we were
Phil> not catching GDB exceptions. I checked every function and I found two
Phil> GDB cases, and one Python case.
Phil> OK?
Almost.
Phil> + PyErr_SetString (PyExc_RuntimeError,
Phil> + _("Inferior arguments must be provided in a tuple."));
I think this should use PyExc_TypeError.
Phil> type = check_typedef (value_type (self_value->value));
This line should also be in the TRY_CATCH.
valpy_int is also missing some exception handling around CHECK_TYPEDEF.
Also is_intlike has to be dealt with somehow (maybe by removing the
CHECK_TYPEDEF and pushing it to the callers).
valpy_float has an unprotected CHECK_TYPEDEF.
valpy_lazy_string has an unprotected call to value_ind.
valpy_get_is_optimized_out has an unprotected call to
value_optimized_out; this one might not matter, but it is harmless to be
defensive.
Tom