------- Comment #2 from matz at gcc dot gnu dot org 2006-09-21 13:39 -------
Some more analysis of the original bugreport (
https://bugzilla.novell.com/show_bug.cgi?id=201157 ) :
For gcc version 4.1.2 20060731 (prerelease) (SUSE Linux),
r4-r7 contain before the call:
86, 87, 88, 89
and after the call:
87, 88, 89, 4611686018427403552
(gdb) p/x $r7
$2 = 0x4000000000003d20
(gdb) info symbol $r7
test() + 64 in section .text
(gdb) b *$r7
Breakpoint 4 at 0x4000000000003d20: file unw.cc, line 85.
(gdb) l 85
80 }
81
82 void test()
83 {
84 try {
85 doIt();
86 } catch( Ex& ) { }
87 }
88
89 int main(char** argv, int argc)
The address in r7 is the return address of the call. I googled a bit for
"unwind ia64 r4" and found e.g. this:
http://www.gelato.unsw.edu.au/archives/linux-ia64/0506/14430.html
This is a patch for the kernel, but it's about using some wrong code
in it's own unwinder leading to clobber r4-7, so perhaps similar code is
used in libunwind?
Looks like the unwind information is broken, the addresses for the register
contents for r4-r7 is off-by-8.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29166