From: Tom Tromey <tromey@redhat.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC] Python's gdb.FRAME_UNWIND_NULL_ID is no longer used. What to do with it?
Date: Mon, 02 Dec 2013 16:10:00 -0000 [thread overview]
Message-ID: <871u1vw7wt.fsf@fleche.redhat.com> (raw)
In-Reply-To: <1385664356-29726-1-git-send-email-palves@redhat.com> (Pedro Alves's message of "Thu, 28 Nov 2013 18:45:56 +0000")
>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
Pedro> I'd assume scripts just check the result of Frame.unwind_stop_reason,
Pedro> and compare it to gdb.FRAME_UNWIND_NO_REASON. That at most, they'll
Pedro> pass the result of Frame.unwind_stop_reason to
Pedro> gdb.frame_stop_reason_string. I'd prefer to just get rid of it, but
Pedro> it may be best to keep this around for compatibility, in case a script
Pedro> does refer to gdb.FRAME_UNWIND_NULL_ID directly.
Pedro> In general, what's the policy for exposed constants like this in
Pedro> Python?
My view is that we should provide compatibility with what we document.
That is, if it is in the docs, we should not remove it.
However, there is still some leeway for change.
E.g., in this case, we don't document the value or type of the constant.
This is intentional as it gives us some freedom to change the details --
we don't generally want Python API promises to leak through to the C
code.
Pedro> +/* This is no longer used anywhere, but it's kept because it's exposed
Pedro> + to Python. This is how GDB used to indicate end of stack. We've
Pedro> + now migrated to a model where frames always have a valid ID. */
Pedro> SET (UNWIND_NULL_ID, "unwinder did not report frame ID")
For example you could remove this, and arrange to keep the Python
constant around with some suitably chosen value. I think it just has to
be something that will never compare equal to any of the other
constants, so just None would work.
Tom
next prev parent reply other threads:[~2013-12-02 16:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-28 20:13 Pedro Alves
2013-11-28 21:16 ` Eli Zaretskii
2013-11-28 23:01 ` Phil Muldoon
2013-11-29 17:22 ` Pedro Alves
2013-12-02 16:10 ` Tom Tromey [this message]
2013-12-12 17:25 ` Pedro Alves
2013-12-12 17:37 ` Pedro Alves
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=871u1vw7wt.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@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