While debugging gdb, I ran across a really nasty little issue: the gcc
guys (for the "bleeding edge", at least) have generated an optimization
such that if the last thing in function x is a function call to y, it
will short circut the return from x, and set things up so it returns
directly from y. (A special case of tail recursion optimizations.)
If you try to n (or s) over that, the debugged program runs away because
gdb doesn't know about that magic. The real example is
regcache_raw_read, which ends in a memcpy. Instead of jsr-ing to the
memcpy and then returning, it fiddles with the stack and jmps to memcpy.
Is this a known issue, and is it being worked, or have I just run across
something
new to worry about?
Sounds both new, and, er, painful. GDB would be, er, what would gdb be
doing?