From: Randolph Chung <randolph@tausq.org>
To: gdb-patches@sources.redhat.com
Subject: [patch] segfault in get_prev_frame
Date: Wed, 10 Nov 2004 22:48:00 -0000 [thread overview]
Message-ID: <20041110224801.GN15714@tausq.org> (raw)
sigh, found a bug in the inside_entry_func logic that i just
committed...
if you jump backwards in a backtrace (i.e you are at frame 0, and you
do "frame 4") you will get a segfault because the frame unwinder is not
yet filled in. using get_frame_type will do the necessary lazy
initialization.
ok to check in?
randolph
2004-11-10 Randolph Chung <tausq@debian.org>
* frame.c (get_prev_frame): Use get_frame_type to retrieve the frame's
type.
Index: frame.c
===================================================================
RCS file: /cvs/src/src/gdb/frame.c,v
retrieving revision 1.194
diff -u -p -r1.194 frame.c
--- frame.c 10 Nov 2004 21:17:56 -0000 1.194
+++ frame.c 10 Nov 2004 22:41:40 -0000
@@ -1239,7 +1239,7 @@ get_prev_frame (struct frame_info *this_
stop at main, we should at least stop at the entry point of the
application. */
if (!backtrace_past_entry
- && this_frame->unwind->type != DUMMY_FRAME && this_frame->level >= 0
+ && get_frame_type (this_frame) != DUMMY_FRAME && this_frame->level >= 0
&& inside_entry_func (this_frame))
{
frame_debug_got_null_frame (gdb_stdlog, this_frame, "inside entry func");
--
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
next reply other threads:[~2004-11-10 22:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-10 22:48 Randolph Chung [this message]
2004-11-10 23:23 ` 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=20041110224801.GN15714@tausq.org \
--to=randolph@tausq.org \
--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