This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: PR Python/12212
- From: Phil Muldoon <pmuldoon at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 16 Nov 2010 17:47:01 +0000
- Subject: Re: PR Python/12212
- References: <m37hgdmti0.fsf@redhat.com> <m3d3q5i37l.fsf@fleche.redhat.com>
- Reply-to: pmuldoon at redhat dot com
Tom Tromey <tromey@redhat.com> writes:
>>>>>> "Phil" == Phil Muldoon <pmuldoon@redhat.com> writes:
>
> Phil> This patches fixes a case where the API can request the currently
> Phil> selected thread from GDB when no inferior is loaded. This triggers an
> Phil> error via assert. Handle it in Python code instead.
>
> This changes gdb.selected_thread to throw an exception if there is no
> thread. However, this is wrong -- the function is documented to return
> None in this case.
Oops I did not notice that the documentation. In that case the only
change is to py-inferior.c, and I can delete the changes to
py-infthread.c. Do you want me to generate a new patch, or should I
just go ahead check that change in?
Cheers,
Phil