This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Python's gdb.FRAME_UNWIND_NULL_ID is no longer used. What to do with it?
- From: Phil Muldoon <pmuldoon at redhat dot com>
- To: Pedro Alves <palves at redhat dot com>, gdb-patches at sourceware dot org
- Date: Thu, 28 Nov 2013 21:16:47 +0000
- Subject: Re: [RFC] Python's gdb.FRAME_UNWIND_NULL_ID is no longer used. What to do with it?
- Authentication-results: sourceware.org; auth=none
- References: <1385664356-29726-1-git-send-email-palves at redhat dot com>
On 28/11/13 18:45, Pedro Alves wrote:
> I'd assume scripts just check the result of Frame.unwind_stop_reason,
> and compare it to gdb.FRAME_UNWIND_NO_REASON. That at most, they'll
> pass the result of Frame.unwind_stop_reason to
> gdb.frame_stop_reason_string. I'd prefer to just get rid of it, but
> it may be best to keep this around for compatibility, in case a script
> does refer to gdb.FRAME_UNWIND_NULL_ID directly.
>
> In general, what's the policy for exposed constants like this in
> Python?
>
> gdb/
> 2013-11-28 Pedro Alves <palves@redhat.com>
>
> * unwind_stop_reasons.def (UNWIND_NULL_ID): Update comment.
>
> gdb/doc/
> 2013-11-28 Pedro Alves <palves@redhat.com>
>
> * gdb.texinfo (Frames In Python) <gdb.FRAME_UNWIND_NULL_ID>:
> Update comment.
> ---
As a script could check it, and because we make an API promise, we
really have to leave it in there. You have done the correct
thing by documenting the deprecated nature of the constant.
It might be time to think about what the API pertains too. GDB
evolves constantly, and I really don't want Python in a few years from
now to be full of deprecated functions/constants.
OK by me.
Cheers,
Phil