Thomas Schwinge, le Sun 19 Nov 2006 22:33:46 +0000, a écrit :
> printf ("%s:fa[0] = %u\tfa[1] = %u\tra = %u\n", __func__, fa[0], fa[1],
> $ gcc-4.0 test.c && ./a.out
> main:fa = 3216472808 fa[1] = 3084724428 ra = 3084724428
> func:fa[0] = 3216472808 fa[1] = 134513645 ra = 134513645
> #v-
>
> This is what I would expect.
Mmm, only by chance: don't expect fa[0], fa[1], ... to give you useful
information, only the _value_ of the pointer returned by
__builtin_frame_address() really makes sense. But
> #v+
> main:fa = 3220364948 fa[1] = 3220365064 ra = 3085416652
> func:fa[0] = 3220364952 fa[1] = 134513639 ra = 134513639
> #v-
Yes, looking at asm shows
80483bf: 8d 45 fc lea 0xfffffffc(%ebp),%eax
for the call to __builtin_frame_address(0) in main(), which seems odd to
me.
Samuel
_______________________________________________
Bug-hurd mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-hurd