support for mips-irix on-stack trampolines
On mips-irix, the debugger has trouble stepping over the following
line of code:
S: Shape'Class := R; <<<<---- STOP here
Here is what happens:
(gdb) n
warning: GDB can't find the start of the function at 0x7fff2bd8.
GDB is unable to find the start of the function at 0x7fff2bd8
and thus can't determine the size of that function's stack frame.
This means that GDB may be unable to access that stack frame, or
the frames below it.
This problem is most likely caused by an invalid program counter or
stack pointer.
However, if you think GDB should simply search farther back
from 0x7fff2bd8 for code which looks like the beginning of a
function, you can increase the range of the search using the `set
heuristic-fence-post' command.
0x7fff2bd8 in ?? ()
The program does in fact jump to this code location, which is a trampoline
located on the stack (there is an implicit call to a routine internally
generated by the Ada expander). As it is on the stack, GDB is naturally
unable to find the bounds of the current function, or any debugging
information, and is thus unable to continue.
This patch adds support for this sort of trampoline.
gdb/ChangeLog:
* mips-irix-tdep.c (mips_irix_n32_stack_tramp_frame_init): New
function.
(mips_irix_n32_stack_tramp_frame): New static global.
(mips_irix_init_abi): Add mips_irix_n32_stack_tramp_frame to
list of unwinder.