From: Andrew Cagney <cagney@gnu.org>
To: Jim Blandy <jimb@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch/rfc] frame_id_unwind
Date: Sun, 28 Mar 2004 22:31:00 -0000 [thread overview]
Message-ID: <4067522B.2030803@gnu.org> (raw)
In-Reply-To: <vt24qs8n8gz.fsf@zenia.home>
>>> Can anyone think of a testcase?
> However, 'backtrace' won't work right in such a program; if that's
> fixed, then this test won't be much of a test any more. Hmm.
Hence the problem, other cases tend to end in a similar dead end.
> A thought on the underlying issues:
>
> It seems to me that there are two distinct things being mixed together
> here:
One returns a subset of the other.
> Wouldn't things work better if we moved the decision about where to
> stop displaying the stack into user interface code (I don't know if
> there's any place shared by cli and mi, but perhaps one could be
> created), and left get_prev_frame as a pure stack-traversal function?
> That is, if there exists a next-older frame, get_prev_frame will
> return it, whether it's in the user's program or part of the
> infrastructure.
frame_unwind_XXX(here) says get me from HERE to XXX via the most
efficient route. It's consistent with the increasingly common
frame_unwind_pc, frame_unwind_register, ...
As for get_prev_frame, I can think of several possibilities:
- publish two interfaces (or parameterize the existing interface)
- change to some sort of iterator
- introduce a new predicate function indicating if the frame is visible
but first, I think the best thing is to eliminate all the almost-dead
code. A quick scan reveals much that can be deleted. Wouldn't happen
own an ns32k ;-)
Andrew
next prev parent reply other threads:[~2004-03-28 22:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-25 14:26 Andrew Cagney
2004-03-28 18:16 ` Jim Blandy
2004-03-28 22:31 ` Andrew Cagney [this message]
2004-03-29 6:47 ` Eli Zaretskii
2004-03-31 19:42 ` Andrew Cagney
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=4067522B.2030803@gnu.org \
--to=cagney@gnu.org \
--cc=gdb-patches@sources.redhat.com \
--cc=jimb@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