Re: Bug in powerpc gdb?
I also experienced problems with the stack unwinder
when using more recent gcc optimization. The attached
patch may help (I thought I had sent it to the GDB
site but am unable to find it in the database).
HTH
-- Till
(CC me for questions/comments, I'm not subscribed)
Patch against gdb-6.2.1. To apply, run
patch -p0 < 'this_file'
from the gdb-6.2.1 topdir. It's always a good
idea to try with the '--dry-run' option first.
Provides:
fixes a bug (triggered by newer gcc optimizations)
in the rs6000/powerpc stack unwinder.
Prerequisites:
n/a
Till Straumann, 3/14/2005
Index: gdb/rs6000-tdep.c
===================================================================
RCS file: /afs/slac/g/spear/cvsrep/tools/gdb/gdb/rs6000-tdep.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -c -r1.1.1.1 -r1.2
*** gdb/rs6000-tdep.c 10 Nov 2004 18:25:48 -0000 1.1.1.1
--- gdb/rs6000-tdep.c 10 Nov 2004 18:39:09 -0000 1.2
***************
*** 1184,1190 ****
the search if we have no valid frame yet or if the return
address is not yet saved in the frame. */
if (fdata->frameless == 0
! && (lr_reg == -1 || fdata->nosavedpc == 0))
break;
if (op == 0x4e800020 /* blr */
--- 1184,1190 ----
the search if we have no valid frame yet or if the return
address is not yet saved in the frame. */
if (fdata->frameless == 0
! && (lr_reg != -1 && fdata->nosavedpc == 0))
break;
if (op == 0x4e800020 /* blr */
Reply to: