public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Phil Muldoon <pmuldoon@redhat.com>
To: tromey@redhat.com
Cc: gdb-patches ml <gdb-patches@sourceware.org>
Subject: Re: [python][patch] Inferior and Thread information support.
Date: Mon, 28 Jun 2010 21:35:00 -0000	[thread overview]
Message-ID: <4C291586.5050302@redhat.com> (raw)
In-Reply-To: <m3wrtjvstn.fsf@fleche.redhat.com>

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

      reply	other threads:[~2010-06-28 21:35 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-24 13:36 Phil Muldoon
2010-05-24 18:06 ` Eli Zaretskii
2010-06-10 18:40 ` Tom Tromey
2010-06-14 12:42   ` Phil Muldoon
2010-06-15 15:24     ` Pedro Alves
2010-06-15 18:11     ` Tom Tromey
2010-06-15 18:24       ` Pedro Alves
2010-06-15 19:58       ` Phil Muldoon
2010-06-15 20:36         ` Pedro Alves
2010-06-18  6:49   ` Phil Muldoon
2010-06-18 14:21     ` Doug Evans
2010-06-18 15:47       ` Phil Muldoon
2010-06-18 17:59         ` Tom Tromey
2010-06-18 20:10           ` Phil Muldoon
2010-06-25 20:41             ` Tom Tromey
2010-06-18 18:04     ` Tom Tromey
2010-06-22 10:32       ` Phil Muldoon
2010-06-25 20:38         ` Tom Tromey
2010-06-28  9:22           ` Phil Muldoon
2010-06-28 19:51             ` Tom Tromey
2010-06-28 21:35               ` Phil Muldoon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C291586.5050302@redhat.com \
    --to=pmuldoon@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).