aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2001-12-05 00:07:50 +0000
committerJim Blandy <jimb@codesourcery.com>2001-12-05 00:07:50 +0000
commit7286245e1f4bd8f5ed8407ffdb0fad5439709967 (patch)
treef788c4b2e59100f54fec19c0f8222d1d25675671 /gdb
parente699dc4eb094399d5b85c4073b769128014ebc10 (diff)
downloadfsf-binutils-gdb-7286245e1f4bd8f5ed8407ffdb0fad5439709967.zip
fsf-binutils-gdb-7286245e1f4bd8f5ed8407ffdb0fad5439709967.tar.gz
fsf-binutils-gdb-7286245e1f4bd8f5ed8407ffdb0fad5439709967.tar.bz2
* s390-tdep.c (s390_get_frame_info): More doc fixes.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog2
-rw-r--r--gdb/s390-tdep.c20
2 files changed, 16 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 96e37e8..d6dbbae 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,7 @@
2001-12-04 Jim Blandy <jimb@redhat.com>
+ * s390-tdep.c (s390_get_frame_info): More doc fixes.
+
* s390-tdep.c (s390_get_frame_info): Doc fixes.
2001-12-04 Orjan Friberg <orjanf@axis.com>
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index e0ea2af..2d28d9c 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -209,13 +209,21 @@ s390_get_frame_info (CORE_ADDR pc, struct frame_extra_info *fextra_info,
int fprs_saved[S390_NUM_FPRS];
int regidx, instrlen;
int const_pool_state;
- int frame_pointer_found, varargs_state;
+ int 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;
+ /* 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,7 +244,7 @@ s390_get_frame_info (CORE_ADDR pc, struct frame_extra_info *fextra_info,
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_state = 0;
int save_link_regidx, subtract_sp_regidx;
/* What we've seen so far regarding r12 --- the GOT (Global Offset
@@ -250,11 +258,11 @@ s390_get_frame_info (CORE_ADDR pc, struct frame_extra_info *fextra_info,
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;
+ int got_state= 0;
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;
+ 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;