Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch] segfault in get_prev_frame
@ 2004-11-10 22:48 Randolph Chung
  2004-11-10 23:23 ` Andrew Cagney
  0 siblings, 1 reply; 2+ messages in thread
From: Randolph Chung @ 2004-11-10 22:48 UTC (permalink / raw)
  To: gdb-patches

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/


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-11-10 23:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-10 22:48 [patch] segfault in get_prev_frame Randolph Chung
2004-11-10 23:23 ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox