This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
PATCH: S/390: document fp state machine
- From: Jim Blandy <jimb at zwingli dot cygnus dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 4 Dec 2001 19:10:25 -0500 (EST)
- Subject: PATCH: S/390: document fp state machine
2001-12-04 Jim Blandy <jimb@redhat.com>
* s390-tdep.c (s390_get_frame_info): More doc fixes.
Index: gdb/s390-tdep.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/s390-tdep.c,v
retrieving revision 2.25
diff -c -r2.25 s390-tdep.c
*** gdb/s390-tdep.c 2001/12/04 23:52:34 2.25
--- gdb/s390-tdep.c 2001/12/05 00:06:00
***************
*** 209,221 ****
int fprs_saved[S390_NUM_FPRS];
int regidx, instrlen;
int const_pool_state;
! int frame_pointer_found, varargs_state;
int loop_cnt, gdb_gpr_store, gdb_fpr_store;
- int frame_pointer_regidx = 0xf;
int offset, expected_offset;
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
--- 209,229 ----
int fprs_saved[S390_NUM_FPRS];
int regidx, instrlen;
int const_pool_state;
! int varargs_state;
int loop_cnt, gdb_gpr_store, gdb_fpr_store;
int offset, expected_offset;
int err = 0;
disassemble_info info;
+ /* Have we seen an instruction initializing the frame pointer yet?
+ If we've seen an `lr %r11, %r15', then frame_pointer_found is
+ non-zero, and frame_pointer_regidx == 11. Otherwise,
+ frame_pointer_found is zero and frame_pointer_regidx is 15,
+ indicating that we're using the stack pointer as our frame
+ pointer. */
+ int frame_pointer_found = 0;
+ int frame_pointer_regidx = 0xf;
+
/* 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
***************
*** 236,242 ****
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
--- 244,250 ----
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 = 0;
int save_link_regidx, subtract_sp_regidx;
/* What we've seen so far regarding r12 --- the GOT (Global Offset
***************
*** 250,260 ****
When got_state is 1, then got_load_addr is the address of the
load instruction, and got_load_len is the length of that
instruction. */
! int got_state;
CORE_ADDR got_load_addr = 0, got_load_len = 0;
- const_pool_state = save_link_state = got_state = varargs_state = 0;
- frame_pointer_found = 0;
memset (gprs_saved, 0, sizeof (gprs_saved));
memset (fprs_saved, 0, sizeof (fprs_saved));
info.read_memory_func = dis_asm_read_memory;
--- 258,268 ----
When got_state is 1, then got_load_addr is the address of the
load instruction, and got_load_len is the length of that
instruction. */
! int got_state= 0;
CORE_ADDR got_load_addr = 0, got_load_len = 0;
+
+ const_pool_state = varargs_state = 0;
memset (gprs_saved, 0, sizeof (gprs_saved));
memset (fprs_saved, 0, sizeof (fprs_saved));
info.read_memory_func = dis_asm_read_memory;