diff options
author | Jim Blandy <jimb@codesourcery.com> | 2001-12-04 23:51:55 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2001-12-04 23:51:55 +0000 |
commit | 6df29de21eb8a3a303ad00880e12da9f374f1357 (patch) | |
tree | 8c230d9b58fd609daaf4195aa755a86e27a80d39 /gdb/s390-tdep.c | |
parent | 1ea5c32521e1acff5f3fb8d40e113655a0682234 (diff) | |
download | gdb-6df29de21eb8a3a303ad00880e12da9f374f1357.zip gdb-6df29de21eb8a3a303ad00880e12da9f374f1357.tar.gz gdb-6df29de21eb8a3a303ad00880e12da9f374f1357.tar.bz2 |
* s390-tdep.c (s390_get_frame_info): Doc fixes.
Diffstat (limited to 'gdb/s390-tdep.c')
-rw-r--r-- | gdb/s390-tdep.c | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index f91b696..e0ea2af 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -208,8 +208,7 @@ s390_get_frame_info (CORE_ADDR pc, struct frame_extra_info *fextra_info, int gprs_saved[S390_NUM_GPRS]; int fprs_saved[S390_NUM_FPRS]; int regidx, instrlen; - int save_link_regidx, subtract_sp_regidx; - int const_pool_state, save_link_state; + int const_pool_state; int frame_pointer_found, varargs_state; int loop_cnt, gdb_gpr_store, gdb_fpr_store; int frame_pointer_regidx = 0xf; @@ -217,6 +216,29 @@ s390_get_frame_info (CORE_ADDR pc, struct frame_extra_info *fextra_info, int err = 0; disassemble_info info; + /* What we've seen so far regarding saving the back chain link: + 0 -- nothing yet; sp still has the same value it had at the entry + point. Since not all functions allocate frames, this is a + valid state for the prologue to finish in. + 1 -- We've saved the original sp in some register other than the + frame pointer (hard-coded to be %r11, yuck). + save_link_regidx is the register we saved it in. + 2 -- We've seen the initial `bras' instruction of the sequence for + reserving more than 32k of stack: + bras %rX, .+8 + .long N + s %r15, 0(%rX) + where %rX is not the constant pool register. + subtract_sp_regidx is %rX, and fextra_info->stack_bought is N. + 3 -- We've reserved space for a new stack frame. This means we + either saw a simple `ahi %r15,-N' in state 1, or the final + `s %r15, ...' in state 2. + 4 -- The frame and link are now fully initialized. We've + reserved space for the new stack frame, and stored the old + stack pointer captured in the back chain pointer field. */ + int save_link_state; + int save_link_regidx, subtract_sp_regidx; + /* What we've seen so far regarding r12 --- the GOT (Global Offset Table) pointer. We expect to see `l %r12, N(%r13)', which loads r12 with the offset from the constant pool to the GOT, and then @@ -493,7 +515,8 @@ s390_get_frame_info (CORE_ADDR pc, struct frame_extra_info *fextra_info, /* Alternatively check for the complex construction for buying more than 32k of stack BRAS gprx,.+8 - long vals %r15,0(%gprx) gprx currently r1 */ + long val + s %r15,0(%gprx) gprx currently r1 */ if ((save_link_state == 1) && (instr[0] == 0xa7) && ((instr[1] & 0xf) == 0x5) && (instr[2] == 0) && (instr[3] == 0x4) && ((instr[1] >> 4) != CONST_POOL_REGIDX)) |