[RFA] Tru64 stack unwinding fix

Joel Brobecker brobecker@gnat.com
Tue Jun 18 18:20:00 GMT 2002


> > Ok to commit?
> 
> Yes (you're in a better position then most to test it).  The change to 
> handle FP and alloca() is very important and something often missed.

Thanks. This is now in (I also corrected the little typo you found
in one of the comments).

> I suspect a non-ada aware GDB and a breakpoint on 
> *__hstTransferRegistersPC would do the trick :-)

Yes it did, silly me :-).

Just for the record, here is the output before my patch:
<<
(gdb) b __hstTransferRegistersPC
Breakpoint 2 at 0x3ff8057d43c
(gdb) c
Continuing.

Breakpoint 2, 0x000003ff8057d43c in __hstTransferRegistersPC ()
   from /usr/shlib/libpthread.so
(gdb) bt
#0  0x000003ff8057d43c in __hstTransferRegistersPC ()
   from /usr/shlib/libpthread.so
#1  0x000003ff8056e8e4 in __osTransferContext () from /usr/shlib/libpthread.so
warning: Hit beginning of text section without finding
warning: enclosing function for address 0x13
>>

> I think someone should re-implement read_next_frame_reg() using:
> 
> /* Unwind the stack frame so that the value of REGNUM, in the previous
>     frame is returned.  If VALUEP is NULL, don't fetch/compute the
>     value.  Instead just return the location of the value.  */
> 
> extern void frame_register_unwind (struct frame_info *frame, int regnum,
>                                     int *optimizedp, enum lval_type *lvalp,
>                                     CORE_ADDR *addrp, int *realnump,
>                                     void *valuep);
> 
> as this will work with CFI and generic dummy frames.

Ack, I'll try to do this when I have a spare moment...

Thanks for the quick review.
-- 
Joel



More information about the Gdb-patches mailing list