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: [python] [patch] PR 13624


>>>>> "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


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