From 905abb3f14417c53440d68bc2fb94a187c71bc05 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Fri, 13 Sep 2002 22:53:36 +0000 Subject: [PATCH] 2002-09-13 Andrew Cagney * frame.c (find_saved_register): Delete function. * frame.h (find_saved_register): Delete declaration. Fix PR gdb/631. --- gdb/ChangeLog | 6 ++++++ gdb/frame.c | 37 ------------------------------------- gdb/frame.h | 2 -- 3 files changed, 6 insertions(+), 39 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6ef623374c0..fc6535f08c1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2002-09-13 Andrew Cagney + + * frame.c (find_saved_register): Delete function. + * frame.h (find_saved_register): Delete declaration. + Fix PR gdb/631. + Fri Sep 13 14:59:55 2002 Andrew Cagney * mips-tdep.c (read_next_frame_reg): Re-hack using diff --git a/gdb/frame.c b/gdb/frame.c index 3b17bf5abf0..2da03059389 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -78,43 +78,6 @@ frame_find_by_id (struct frame_id id) return NULL; } -/* FIND_SAVED_REGISTER () - - Return the address in which frame FRAME's value of register REGNUM - has been saved in memory. Or return zero if it has not been saved. - If REGNUM specifies the SP, the value we return is actually - the SP value, not an address where it was saved. */ - -CORE_ADDR -find_saved_register (struct frame_info *frame, int regnum) -{ - register struct frame_info *frame1 = NULL; - register CORE_ADDR addr = 0; - - if (frame == NULL) /* No regs saved if want current frame */ - return 0; - - /* Note that the following loop assumes that registers used in - frame x will be saved only in the frame that x calls and frames - interior to it. */ - while (1) - { - QUIT; - frame1 = get_next_frame (frame); - if (frame1 == 0) - break; - frame = frame1; - FRAME_INIT_SAVED_REGS (frame1); - if (frame1->saved_regs[regnum]) - { - addr = frame1->saved_regs[regnum]; - break; - } - } - - return addr; -} - void frame_register_unwind (struct frame_info *frame, int regnum, int *optimizedp, enum lval_type *lvalp, diff --git a/gdb/frame.h b/gdb/frame.h index 20ffff00daf..b1fd93cf06f 100644 --- a/gdb/frame.h +++ b/gdb/frame.h @@ -296,8 +296,6 @@ extern void print_frame_info (struct frame_info *, int, int, int); extern void show_frame_info (struct frame_info *, int, int, int); -extern CORE_ADDR find_saved_register (struct frame_info *, int); - extern struct frame_info *block_innermost_frame (struct block *); extern struct frame_info *find_frame_addr_in_frame_chain (CORE_ADDR); -- 2.30.2