Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch/rfa] allow unwinding "past main" for dummy frames
@ 2004-12-06  3:31 Randolph Chung
  2004-12-06  3:45 ` Daniel Jacobowitz
  0 siblings, 1 reply; 9+ messages in thread
From: Randolph Chung @ 2004-12-06  3:31 UTC (permalink / raw)
  To: gdb-patches

On hpux, we push a small bit of code on the stack to implement function
calls from gdb. The stack trampoline contains a return address that
points back to the current function. this is needed to properly restore
the space registers (see hppa_hpux_push_dummy_code in hppa-hpux-tdep.c
for a much more detailed explanation).  The upshot of all of this is
that when we do a backtrace from a gdb-called function, a backtrace can
be prematurely truncated at a dummy frame. Since it doesn't make sense
anyway to stop unwinding at dummy frames, this patch skips the "main
function" detection logic for dummy frames. The same logic is already
there for checking against the entry function a bit farther down in
get_prev_frame ().

ok?

randolph

2004-12-05  Randolph Chung  <tausq@debian.org>

	* frame.c (get_prev_frame): Don't terminate unwinding at main if we
	are unwinding through a dummy frame.

Index: frame.c
===================================================================
RCS file: /cvs/src/src/gdb/frame.c,v
retrieving revision 1.195
diff -u -p -r1.195 frame.c
--- frame.c	10 Nov 2004 23:26:33 -0000	1.195
+++ frame.c	6 Dec 2004 03:19:46 -0000
@@ -1200,6 +1200,7 @@ get_prev_frame (struct frame_info *this_
   gdb_assert (this_frame != NULL);
 
   if (this_frame->level >= 0
+      && get_frame_type (this_frame) != DUMMY_FRAME
       && !backtrace_past_main
       && inside_main_func (this_frame))
     /* Don't unwind past main().  Note, this is done _before_ the
-- 
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/


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

end of thread, other threads:[~2004-12-08  1:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-06  3:31 [patch/rfa] allow unwinding "past main" for dummy frames Randolph Chung
2004-12-06  3:45 ` Daniel Jacobowitz
2004-12-06  4:27   ` Randolph Chung
2004-12-06  4:59     ` Daniel Jacobowitz
2004-12-06  6:22       ` Randolph Chung
2004-12-06 15:35         ` Daniel Jacobowitz
2004-12-06 16:54           ` Randolph Chung
2004-12-08  3:27           ` Randolph Chung
2004-12-06 14:11       ` Randolph Chung

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