http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53927



--- Comment #1 from Tom Tromey <tromey at gcc dot gnu.org> 2013-01-24 20:24:18 
UTC ---

It seems that I read the wrong frame info in my original report.

However, the bug still exists.  Here is a new and hopefully more

correct example showing the bug.



I used a relatively recent git master gcc for this.

I just followed the directions in the original report.



The static link info for 'nested':



    <aa>   DW_AT_static_link : 1 byte block: 50     (DW_OP_reg0 (rax))



In the 'nested' frame this is:



(gdb) p/x $rax

$1 = 0x7fffffffe370



In the outer 'nestee' frame:



(gdb) p $pc

$2 = (void (*)()) 0x4004e9 <nestee+99>



The frame info as shown by readelf --debug-dump=frames-interp:



00000060 00000024 00000064 FDE cie=00000000 pc=00400486..004004fe

   LOC           CFA      rbx   rbp   ra      

0000000000400486 rsp+8    u     u     c-8   

0000000000400487 rsp+16   u     c-16  c-8   

000000000040048a rbp+16   u     c-16  c-8   

000000000040048f rbp+16   c-24  c-16  c-8     <--- this row

00000000004004fd rsp+8    c-24  c-16  c-8   





So the CFA we want is $rbp + 16 in the outermost 'nestee' frame:



(gdb) p/x $rbp + 16

$3 = 0x7fffffffe3b0



... but this is different from $1.

Reply via email to