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] Inferior and Thread information support.


On 28/06/10 20:51, Tom Tromey wrote:
>>>>>> "Phil" == Phil Muldoon <pmuldoon@redhat.com> writes:
> Phil> +  if (!thread_obj)
> Phil> +    {
> Phil> +      warning (_("Cannot create Python InferiorThread object."));
> Phil> +      gdbpy_print_stack ();
> Phil> +      do_cleanups (cleanup);
> 
> Tom> I don't think there is any need for a warning here.
> Tom> The exception should suffice.
> 
> Phil> OK
>  
> Actually I meant that you should remove the call to warning but leave in
> the gdbpy_print_stack.


Ok, thanks.


> The new code looks like this:
> 
> Phil> +  if (except.reason < 0)
> Phil> +    {
> Phil> +      do_cleanups (cleanups);
> Phil> +      return PyErr_Format (PyExc_RuntimeError, "%s", except.message);
> Phil> +    }
> 
> ... but this does the wrong thing for RETURN_QUIT.
> Instead I think you should do
> 
> if (except.reason < 0)
>   {
>     do_cleanups ...;
>     GDB_PY_HANDLE_EXCEPTION (...);
>   }
> 
> This is a little redundant but it will do the right thing -- and will
> continue to do so if we ever split the different kinds of gdb
> exceptions into different Python exceptions.


Ok, makes sense.


> This patch is ok with those changes.  Thanks for persevering.


And so committed with those changes.

http://sourceware.org/ml/gdb-cvs/2010-06/msg00200.html

And thank-you and all the other commentators for their guidance on
this Python API.  This is the last major Python API patch from
Archer. It's been fun getting these features into FSF GDB.

Cheers,

Phil


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