diff options
author | Jim Blandy <jimb@codesourcery.com> | 2001-12-05 22:20:00 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2001-12-05 22:20:00 +0000 |
commit | 64ec5eb1ce42a32808e7401d35a286ad76e651fb (patch) | |
tree | 5de09a91996b182182d64011b67a56b684f524c4 /gdb | |
parent | 553f1c5f9249ebd79a14c48646d5ecc4279f12a1 (diff) | |
download | gdb-64ec5eb1ce42a32808e7401d35a286ad76e651fb.tar.gz |
* s390-tdep.c (s390_get_frame_info): Recognize argument register
spills that use the `stm' instruction.
(is_arg_reg): New function.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/s390-tdep.c | 21 |
2 files changed, 23 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index dece6474f49..9f2956d6de2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2001-12-05 Jim Blandy <jimb@redhat.com> + + * s390-tdep.c (s390_get_frame_info): Recognize argument register + spills that use the `stm' instruction. + (is_arg_reg): New function. + 2001-12-03 Keith Walker <keith.walker@arm.com> * gdbserver/low-linux.c (arm_register_u_addr): added. (initialize_arch): added for ARM target. diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index cefa9b7e16e..cc282245700 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -180,6 +180,14 @@ s390_stab_reg_to_regnum (int regno) } +/* Return true if REGIDX is the number of a register used to pass + arguments, false otherwise. */ +static int +is_arg_reg (int regidx) +{ + return 2 <= regidx && regidx <= 6; +} + /* s390_get_frame_info based on Hartmuts prologue definition in @@ -405,7 +413,7 @@ s390_get_frame_info (CORE_ADDR pc, struct frame_extra_info *fextra_info, continue; } - /* Check for an fp-relative STG or ST. This is probably + /* Check for an fp-relative STG, ST, or STM. This is probably spilling an argument from a register out into a stack slot. This could be a user instruction, but if we haven't included any other suspicious instructions in the prologue, this @@ -414,9 +422,14 @@ s390_get_frame_info (CORE_ADDR pc, struct frame_extra_info *fextra_info, are more serious, though --- you don't see the proper values of the arguments. */ if ((save_link_state == 3 || save_link_state == 4) - && instr[0] == 0x50 /* st %rA, D(%rX,%rB) */ - && (instr[1] & 0xf) == 0 /* %rX is zero, no index reg */ - && ((instr[2] >> 4) & 0xf) == frame_pointer_regidx) + && ((instr[0] == 0x50 /* st %rA, D(%rX,%rB) */ + && (instr[1] & 0xf) == 0 /* %rX is zero, no index reg */ + && is_arg_reg ((instr[1] >> 4) & 0xf) + && ((instr[2] >> 4) & 0xf) == frame_pointer_regidx) + || (instr[0] == 0x90 /* stm %rA, %rB, D(%rC) */ + && is_arg_reg ((instr[1] >> 4) & 0xf) + && is_arg_reg (instr[1] & 0xf) + && ((instr[2] >> 4) & 0xf) == frame_pointer_regidx))) { valid_prologue = 1; continue; |