From: Andrew Cagney <cagney@gnu.org>
To: Mark Kettenis <kettenis@chello.nl>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH] Remove zero PC check from blockframe.c:inside_main_func()
Date: Wed, 31 Dec 2003 19:58:00 -0000 [thread overview]
Message-ID: <3FF32A62.8050607@gnu.org> (raw)
In-Reply-To: <200312141822.hBEIMFZ7014165@elgar.kettenis.dyndns.org>
> Date: Sat, 13 Dec 2003 19:22:47 -0500
> From: Andrew Cagney <cagney@gnu.org>
>
> > RCS file: /cvs/src/src/gdb/frame.c,v
> > retrieving revision 1.153
> > diff -u -p -r1.153 frame.c
> > --- frame.c 10 Dec 2003 17:40:42 -0000 1.153
> > +++ frame.c 13 Dec 2003 21:47:43 -0000
> > @@ -1732,6 +1732,7 @@ struct frame_info *
> > get_prev_frame (struct frame_info *this_frame)
> > {
> > struct frame_info *prev_frame;
> > + CORE_ADDR pc;
> >
> > if (frame_debug)
> > {
> > @@ -1961,7 +1962,8 @@ get_prev_frame (struct frame_info *this_
> > because (well ignoring the PPC) a dummy frame can be located
> > using THIS_FRAME's frame ID. */
> >
> > - if (frame_pc_unwind (this_frame) == 0)
> > + pc = frame_pc_unwind (this_frame);
> > + if (this_frame->level >= 0 && pc == 0)
> > {
> > /* The allocated PREV_FRAME will be reclaimed when the frame
> > obstack is next purged.
>
> Can it be deleted?
>
> I think so. I tested i386-unknown-freebsd4.7, i386-pc-solaris2.9,
> x86_64-unknown-freebsd5.2 and alpha-unknown-freenbsd5.2, and things
> didn't change.
>
> This would likely affect the initial call sequence made to the unwinder
> - frame_pc_unwind may not be called first (?). But I also think that
> the reason for insisting on an explicit pc unwind may have also been
> removed - the new code is written more robustly anyway.
>
> I think I agree. So shall I remove the code?
Yes, just watch for comments claiming that the pc is unwound first
though though. I believe it's now really entirely determined by the
per-architecture frame sniffers.
Andrew
next prev parent reply other threads:[~2003-12-31 19:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-13 15:09 Mark Kettenis
2003-12-13 19:02 ` Andrew Cagney
2003-12-13 22:07 ` Mark Kettenis
2003-12-14 0:23 ` Andrew Cagney
2003-12-14 18:22 ` Mark Kettenis
2003-12-31 19:58 ` Andrew Cagney [this message]
2003-12-21 21:20 ` Mark Kettenis
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=3FF32A62.8050607@gnu.org \
--to=cagney@gnu.org \
--cc=gdb-patches@sources.redhat.com \
--cc=kettenis@chello.nl \
/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