This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[just for the record]: Detect end-of-stack on S/390
- From: Jim Blandy <jimb at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: 18 Apr 2003 17:00:31 -0500
- Subject: [just for the record]: Detect end-of-stack on S/390
This patch depends on the new prologue analyzer patch I just posted.
2003-04-18 Jim Blandy <jimb at redhat dot com>
* s390-tdep.c (struct frame_extra_info): new member:
'stack_bought_valid'.
(s390_get_frame_info): Set fextra_info->stack_bought_valid if we
initialize fextra_info->stack_bought.
(s390_frameless_function_invocation): Don't trust the value of
fextra_info_ptr->stack_bought unless
fextra_info->stack_bought_valid is set.
*** gdb/s390-tdep.c.~1~ Fri Apr 18 15:29:03 2003
--- gdb/s390-tdep.c Fri Apr 18 15:22:13 2003
***************
*** 114,119 ****
--- 114,120 ----
CORE_ADDR sig_fixed_saved_pc_valid;
CORE_ADDR sig_fixed_saved_pc;
CORE_ADDR frame_pointer_saved_pc; /* frame pointer needed for alloca */
+ CORE_ADDR stack_bought_valid;
CORE_ADDR stack_bought; /* amount we decrement the stack pointer by */
CORE_ADDR sigcontext;
};
***************
*** 1347,1352 ****
--- 1348,1354 ----
if (frame_size != -1)
{
+ fextra_info->stack_bought_valid = 1;
fextra_info->stack_bought = frame_size;
}
***************
*** 1562,1568 ****
s390_get_frame_info (s390_sniff_pc_function_start (get_frame_pc (fi), fi),
fextra_info_ptr, fi, 1);
}
! frameless = ((fextra_info_ptr->stack_bought == 0));
}
return frameless;
--- 1564,1571 ----
s390_get_frame_info (s390_sniff_pc_function_start (get_frame_pc (fi), fi),
fextra_info_ptr, fi, 1);
}
! frameless = (fextra_info_ptr->stack_bought_valid
! && fextra_info_ptr->stack_bought == 0);
}
return frameless;