From: Daniel Jacobowitz <drow@mvista.com>
To: GDB Patches <gdb-patches@sources.redhat.com>
Subject: Re: [patch/rfc] Add a sentinel frame
Date: Wed, 19 Feb 2003 16:56:00 -0000 [thread overview]
Message-ID: <20030219165623.GA7961@nevyn.them.org> (raw)
In-Reply-To: <3E53B61C.2050807@redhat.com>
On Wed, Feb 19, 2003 at 11:51:40AM -0500, Andrew Cagney wrote:
> >On Wed, Feb 19, 2003 at 08:32:32AM -0500, Andrew Cagney wrote:
> >
> >>So I think it is one of these tests going awall:
> >>
> >> if (next_frame->level >= 0
> >> && !backtrace_below_main
> >> && inside_main_func (get_frame_pc (next_frame)))
> >> /* Don't unwind past main(), bug always unwind the sentinel frame.
> >> Note, this is done _before_ the frame has been marked as
> >> previously unwound. That way if the user later decides to
> >> allow unwinds past main(), that just happens. */
> >> return NULL;
> >>
> >> /* If we're inside the entry file, it isn't valid. */
> >> /* NOTE: drow/2002-12-25: should there be a way to disable this
> >> check? It assumes a single small entry file, and the way some
> >> debug readers (e.g. dbxread) figure out which object is the
> >> entry file is somewhat hokey. */
> >> /* NOTE: cagney/2003-01-10: If there is a way of disabling this test
> >> then it should probably be moved to before the ->prev_p test,
> >> above. */
> >> if (inside_entry_file (get_frame_pc (next_frame)))
> >> return NULL;
> >>
> >>The second looks worrying (the dummy frame breakpoint lives in the entry
> >>file ...). Perhaphs something like:
> >>
> >>if (dummy_frame_p (get_frame_pc (next_frame) != NULL
> >> && inside_entry_file (get_frame_pc (next_frame))
> >> return NULL;
> >
> >
> >Hrm, shouldn't we have already detected the dummy frame at this point?
>
> No. GDB is trying to perform:
>
> pop_frame (get_current_frame())
>
> with the assumption that it has a dummy frame and get_current_frame()
> will return it.
>
> >That's what happens on i386 IIRC...
I thought that we wouldn't reach frame_chain_valid if the next frame
was a dummy frame. Hmm, that only seems to happen for deprecated
generic dummy frames:
if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES
&& DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), 0, 0))
return 1;
Oh I didn't realize the contents of frame_chain_valid had ended up
repeated in get_prev_frame, I've been looking at the wrong function.
That's why I didn't understand you. Should the check above exist in
get_prev_frame also?
[Why does this logic need to be in more than one place?]
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2003-02-19 16:56 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-23 20:54 Andrew Cagney
2003-01-27 21:42 ` Andrew Cagney
2003-02-10 23:36 ` Michal Ludvig
2003-02-11 16:48 ` Andrew Cagney
2003-02-18 11:21 ` Michal Ludvig
2003-02-19 13:27 ` Andrew Cagney
2003-02-19 14:04 ` Daniel Jacobowitz
2003-02-19 16:46 ` Andrew Cagney
2003-02-19 16:56 ` Daniel Jacobowitz [this message]
2003-02-19 17:11 ` Andrew Cagney
2003-02-19 17:17 ` Daniel Jacobowitz
2003-02-19 17:46 ` Andrew Cagney
2003-02-19 17:56 ` Daniel Jacobowitz
2003-02-19 18:36 ` Andrew Cagney
2003-02-19 18:52 ` Daniel Jacobowitz
2003-02-19 20:22 ` Andrew Cagney
2003-02-19 20:39 ` Daniel Jacobowitz
2003-02-19 21:21 ` Andrew Cagney
2003-02-20 19:32 ` Daniel Jacobowitz
2003-02-19 21:45 ` Andrew Cagney
2003-02-20 19:32 ` Daniel Jacobowitz
2003-02-25 16:24 ` Michal Ludvig
2003-02-25 19:43 ` Andrew Cagney
2003-02-25 21:00 ` Michal Ludvig
2003-02-25 21:12 ` Andrew Cagney
2003-02-26 8:04 ` Michal Ludvig
2003-02-27 18:27 ` Andrew Cagney
2003-02-28 13:02 ` Michal Ludvig
2003-02-28 15:48 ` Andrew Cagney
2003-03-05 17:38 ` Michal Ludvig
2003-03-05 18:25 ` Andrew Cagney
2003-03-06 16:00 ` Michal Ludvig
2003-03-06 20:13 ` Andrew Cagney
2003-03-06 22:42 ` [RFA] Dummy frames on x86-64 Michal Ludvig
2003-03-07 14:50 ` Andrew Cagney
2003-02-25 22:41 ` [patch/rfc] Add a sentinel frame Andrew Cagney
2003-02-25 21:21 Michael Elizabeth Chastain
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=20030219165623.GA7961@nevyn.them.org \
--to=drow@mvista.com \
--cc=gdb-patches@sources.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