diff options
author | David S. Miller <davem@redhat.com> | 2006-04-05 20:01:19 +0000 |
---|---|---|
committer | David S. Miller <davem@redhat.com> | 2006-04-05 20:01:19 +0000 |
commit | 88ca90b9343548da1e597f572b1a5154a63561e4 (patch) | |
tree | 14fb1d1aff1cc48b473a0e52317111d66a1b1e08 /gdb/dwarf2-frame.c | |
parent | 05e109f48ab887a576948fce3f4e264a0723c206 (diff) | |
download | gdb-88ca90b9343548da1e597f572b1a5154a63561e4.tar.gz |
* dwarf2-frame.c (dwarf2_frame_ops init_reg): Add "next_frame"
argument.
(dwarf2_frame_default_init_reg): Likewise.
(dwarf2_frame_set_init_reg): Update init_reg arg.
(dwarf2_frame_init_reg): Take "next_frame" and pass it to
ops->init_reg().
(dwarf2_frame_cache): Pass next_frame to dwarf2_frame_init_reg.
* dwarf2-frame.h (dwarf2-frame_set_init_reg): Update declaration.
* cris-tdep.c (cris_dwarf2_frame_init_reg): Add next_frame arg.
* s390-tdep.c (s390_dwarf2_frame_init_reg): Likewise.
* sh-tdep.c (sh_dwarf2_frame_init_reg): Likewise.
* sparc64-tdep.c (sparc64_dwarf2_frame_init_reg): Likewise.
* sparc-tdep.c (sparc32_struct_return_from_sym): New function.
(sparc32_frame_cache): Call it.
(sparc32_dwarf2_struct_return_p): New function.
(sparc_dwarf2_frame_init_reg): Use it to determine if the function
returns a structure and thus we have to indicate the return PC and
NPC are 4 bytes later than usual.
Diffstat (limited to 'gdb/dwarf2-frame.c')
-rw-r--r-- | gdb/dwarf2-frame.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c index 668500d26c9..d479da2f5aa 100644 --- a/gdb/dwarf2-frame.c +++ b/gdb/dwarf2-frame.c @@ -506,7 +506,8 @@ static struct gdbarch_data *dwarf2_frame_data; struct dwarf2_frame_ops { /* Pre-initialize the register state REG for register REGNUM. */ - void (*init_reg) (struct gdbarch *, int, struct dwarf2_frame_state_reg *); + void (*init_reg) (struct gdbarch *, int, struct dwarf2_frame_state_reg *, + struct frame_info *); /* Check whether the frame preceding NEXT_FRAME will be a signal trampoline. */ @@ -518,7 +519,8 @@ struct dwarf2_frame_ops static void dwarf2_frame_default_init_reg (struct gdbarch *gdbarch, int regnum, - struct dwarf2_frame_state_reg *reg) + struct dwarf2_frame_state_reg *reg, + struct frame_info *next_frame) { /* If we have a register that acts as a program counter, mark it as a destination for the return address. If we have a register that @@ -570,7 +572,8 @@ dwarf2_frame_init (struct obstack *obstack) void dwarf2_frame_set_init_reg (struct gdbarch *gdbarch, void (*init_reg) (struct gdbarch *, int, - struct dwarf2_frame_state_reg *)) + struct dwarf2_frame_state_reg *, + struct frame_info *)) { struct dwarf2_frame_ops *ops = gdbarch_data (gdbarch, dwarf2_frame_data); @@ -581,11 +584,12 @@ dwarf2_frame_set_init_reg (struct gdbarch *gdbarch, static void dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum, - struct dwarf2_frame_state_reg *reg) + struct dwarf2_frame_state_reg *reg, + struct frame_info *next_frame) { struct dwarf2_frame_ops *ops = gdbarch_data (gdbarch, dwarf2_frame_data); - ops->init_reg (gdbarch, regnum, reg); + ops->init_reg (gdbarch, regnum, reg, next_frame); } /* Set the architecture-specific signal trampoline recognition @@ -713,7 +717,7 @@ dwarf2_frame_cache (struct frame_info *next_frame, void **this_cache) int regnum; for (regnum = 0; regnum < num_regs; regnum++) - dwarf2_frame_init_reg (gdbarch, regnum, &cache->reg[regnum]); + dwarf2_frame_init_reg (gdbarch, regnum, &cache->reg[regnum], next_frame); } /* Go through the DWARF2 CFI generated table and save its register |