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: [patch] python(+solib error): save/restore error state


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.


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