[RFC] Infinite backtraces...

Randolph Chung randolph@tausq.org
Fri Dec 3 18:03:00 GMT 2004


> > yeah, but i would have expected that you should get an error when 
> > unwinding from 0 ("Cannot find bounds of current function ..."). this
> > should automatically stop the backtrace.
> > 
> > would you mind sending me the output of "info reg" frame frame 5 and 6,
> > "maint print unwind __pthread_create_system" and "disassemble
> > __pthread_create_system"?

argh, i was wrong... the stub unwinder handles the case when pc == 0,
and then it assumes that the rp doesn't get modified by default.

there's also a bug in the outer __pthread_create_system frame; the stub
unwinder doesn't set the rp appropriately. can you try the attached
patch? it should convert your infinite backtrace into an error ;-)

randolph



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

	* hppa-tdep.c (hppa_stub_frame_unwind_cache): Set RP appropriately
	for export stub frames.

Index: hppa-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/hppa-tdep.c,v
retrieving revision 1.182
diff -u -p -r1.182 hppa-tdep.c
--- hppa-tdep.c	23 Nov 2004 21:05:20 -0000	1.182
+++ hppa-tdep.c	3 Dec 2004 17:56:56 -0000
@@ -2119,8 +2120,9 @@ hppa_stub_frame_unwind_cache (struct fra
       if (u && u->stub_unwind.stub_type == EXPORT)
 	{
           info->saved_regs[HPPA_PCOQ_HEAD_REGNUM].addr = info->base - 24;
+          info->saved_regs[HPPA_RP_REGNUM].addr = info->base - 24;
 
 	  return info;
 	}
     }
 



More information about the Gdb-patches mailing list