From: Tom Tromey <tromey@redhat.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: RFA: fix PR python/13351
Date: Wed, 01 Feb 2012 16:05:00 -0000 [thread overview]
Message-ID: <m3pqdybkv6.fsf@fleche.redhat.com> (raw)
In-Reply-To: <4F2916BE.6020105@redhat.com> (Pedro Alves's message of "Wed, 01 Feb 2012 10:41:02 +0000")
>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
Pedro> I'm getting a bit nervous about get_selected_frame_if_set usages
Pedro> getting spread around. (It feels a bit like we're going back in
Pedro> time, to a time before the always-a-frame work.) The selected
Pedro> frame may not be set, while we still may have a current frame, so
Pedro> get_selected_frame would lazily select it, and so the lookup
Pedro> would still start on a frame block. If you don't want an error,
Pedro> you can pass NULL to get_selected_frame.
Ok, I can make that change.
I don't understand why get_selected_frame is the preferred API. To me
it seems clearly worse: passing in an error message is ugly, and it
isn't really possible to distinguish "no frames" from "an exception was
thrown for some other reason". Neither of these problems would affect
get_selected_frame_if_set.
Perhaps I can do the detection by checking has_stack_frames? Is that safe?
Tom
next prev parent reply other threads:[~2012-02-01 16:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-31 22:02 Tom Tromey
2012-01-31 23:23 ` Doug Evans
2012-02-01 11:52 ` Phil Muldoon
2012-02-01 16:03 ` Tom Tromey
2012-02-01 16:02 ` Tom Tromey
2012-02-01 19:21 ` Doug Evans
2012-02-01 10:41 ` Pedro Alves
2012-02-01 16:05 ` Tom Tromey [this message]
2012-02-01 16:12 ` Pedro Alves
2012-02-01 16:17 ` Tom Tromey
2012-02-07 18:05 ` Tom Tromey
2012-02-07 18:49 ` Eli Zaretskii
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=m3pqdybkv6.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