Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [patch] python(+solib error): save/restore error state
Date: Fri, 08 Oct 2010 21:35:00 -0000	[thread overview]
Message-ID: <AANLkTimGzTxYMgFNi32nPgATGCxr0jD0CtJ7jwjAFtEp@mail.gmail.com> (raw)
In-Reply-To: <m3d3rks7dn.fsf@fleche.redhat.com>

On Fri, Oct 8, 2010 at 2:27 PM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Doug" == Doug Evans <dje@google.com> writes:
>
> Doug> Looking at the sources for PyRun_SimpleFile, I see PyErr_Print being
> Doug> called before -1 is returned.
> Doug> Similarly for PyRun_SimpleString.
>
> Doug> Am I missing something?
>
> In that case we should probably just call PyErr_Clear.

Except that my understanding is that that is unnecessary.
PyErr_Print is defined to clear the error indicator.

For reference sake, according to the docs, the error is saved in
python vars sys.last_{type,value,traceback}.  We might want to
clear/save/restore those.


  reply	other threads:[~2010-10-08 21:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-08 19:12 Jan Kratochvil
2010-10-08 20:08 ` Doug Evans
2010-10-08 20:20   ` Doug Evans
2010-10-08 21:27     ` Tom Tromey
2010-10-08 21:35       ` Doug Evans [this message]
2010-10-09 20:40   ` [patch] python: save/restore/fix " Jan Kratochvil
2010-10-12 19:55     ` Tom Tromey
2010-10-12 21:08       ` Jan Kratochvil
2010-10-12 21:39         ` Tom Tromey
2010-10-13 13:28           ` Jan Kratochvil
2010-10-13 15:38             ` Tom Tromey
2010-10-13 15:58               ` Jan Kratochvil
2010-10-13 18:46                 ` Tom Tromey

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=AANLkTimGzTxYMgFNi32nPgATGCxr0jD0CtJ7jwjAFtEp@mail.gmail.com \
    --to=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --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