aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2cfi.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/dwarf2cfi.c')
-rw-r--r--gdb/dwarf2cfi.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/gdb/dwarf2cfi.c b/gdb/dwarf2cfi.c
index 30c2db7..c431862 100644
--- a/gdb/dwarf2cfi.c
+++ b/gdb/dwarf2cfi.c
@@ -1746,13 +1746,19 @@ cfi_frame_chain (struct frame_info *fi)
}
/* Sets the pc of the frame. */
-void
+CORE_ADDR
cfi_init_frame_pc (int fromleaf, struct frame_info *fi)
{
- if (fi->next)
- get_reg ((char *) &(fi->pc), UNWIND_CONTEXT (fi->next), PC_REGNUM);
+ if (get_next_frame (fi))
+ {
+ CORE_ADDR pc;
+ /* FIXME: cagney/2002-12-04: This is straight wrong. It's
+ assuming that the PC is CORE_ADDR (a host quantity) in size. */
+ get_reg (&pc, UNWIND_CONTEXT (get_next_frame (fi)), PC_REGNUM);
+ return pc;
+ }
else
- fi->pc = read_pc ();
+ return read_pc ();
}
/* Initialize unwind context informations of the frame. */