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: [RFC] Python's gdb.FRAME_UNWIND_NULL_ID is no longer used. What to do with it?


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




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