On Sep 21, 2009, at 13:21, Mike Gran wrote:
There is another curious thing, which may be unrelated
#6 0x00007f7ffdb80605 in scm_lfwrite_str (str=0x6e4720,
port=0x5bcba0) at ports.c:1276
#7 0x00007f7ffdb848fc in iprin1 (exp=0xfffffffffffffff8,
port=0x5bcba0, pstate=0xdd6770) at print.c:723
#8 0x00007f7ffdb84f18 in scm_prin1 (exp=0x6e4720, port=0x5bcba0,
writingp=0) at print.c:890
In the above, 'exp' is an SCM string that is being passed down from
func to
func. It is weird that its address jumps from 0x6e4720 to
0xfffffffffffffff8 then back to 0x6e4720. That shouldn't happen.
That happens sometimes during optimization, especially if you've got
an ABI where arguments are passed in registers -- or if, like on 32-
bit x86 and I'd guess probably 64-bit, the compiler optimizes calls to
certain static functions by altering the ABI and passing arguments in
registers -- and the value is no longer needed locally so the incoming
argument register can be reused.
I've seen some cases where GDB can tell you that an argument's value
is unavailable because of optimization, but I don't know what
combination of GCC version, GDB version, and debug info format might
be needed to get that sort of info.
Compiling without optimization, or making the function non-static, may
make debugging work better.
Ken