From d49d1e0a2f67889077fff8ad80e9ed5e43ff169f Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Sun, 21 Apr 2002 15:52:35 +0000 Subject: [PATCH] * frame.c (find_saved_register): Delete #ifdef HAVE_REGISTER_WINDOWS code. * config/sparc/tm-sparc.h: Update comments. * config/i960/tm-i960.h (HAVE_REGISTER_WINDOWS): Delete macro. * gdbint.texinfo (Target Architecture Definition): Delete definition of HAVE_REGISTER_WINDOWS. --- gdb/ChangeLog | 7 +++++++ gdb/config/i960/tm-i960.h | 2 -- gdb/config/sparc/tm-sparc.h | 5 ++--- gdb/doc/ChangeLog | 5 +++++ gdb/doc/gdbint.texinfo | 4 ---- gdb/frame.c | 33 --------------------------------- 6 files changed, 14 insertions(+), 42 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5d55cc8..ec6276c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,12 @@ 2002-04-21 Andrew Cagney + * frame.c (find_saved_register): Delete #ifdef + HAVE_REGISTER_WINDOWS code. + * config/sparc/tm-sparc.h: Update comments. + * config/i960/tm-i960.h (HAVE_REGISTER_WINDOWS): Delete macro. + +2002-04-21 Andrew Cagney + * i960-tdep.c (i960_find_saved_register): New function. (i960_get_saved_register): New function. * config/i960/tm-i960.h (GET_SAVED_REGISTER): Define. diff --git a/gdb/config/i960/tm-i960.h b/gdb/config/i960/tm-i960.h index c01ac14..40bec42 100644 --- a/gdb/config/i960/tm-i960.h +++ b/gdb/config/i960/tm-i960.h @@ -116,8 +116,6 @@ extern CORE_ADDR saved_pc_after_call (); /* The i960 has register windows, sort of. */ -#define HAVE_REGISTER_WINDOWS - extern void i960_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp, diff --git a/gdb/config/sparc/tm-sparc.h b/gdb/config/sparc/tm-sparc.h index 4db7ab7..2078d4c 100644 --- a/gdb/config/sparc/tm-sparc.h +++ b/gdb/config/sparc/tm-sparc.h @@ -468,9 +468,8 @@ extern CORE_ADDR sparc_skip_prologue (CORE_ADDR, int); /* time of the register saves. */ \ int sp_offset; -/* We need to override GET_SAVED_REGISTER so that we can deal with the way - outs change into ins in different frames. HAVE_REGISTER_WINDOWS can't - deal with this case and also handle flat frames at the same time. */ +/* We need to override GET_SAVED_REGISTER so that we can deal with the + way outs change into ins in different frames. */ void sparc_get_saved_register (char *raw_buffer, int *optimized, diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index c5241c4..6cb5b17 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,8 @@ +2002-04-21 Andrew Cagney + + * gdbint.texinfo (Target Architecture Definition): Delete + definition of HAVE_REGISTER_WINDOWS. + 2002-04-19 Eli Zaretskii * gdbint.texinfo (Releasing GDB, Coding): Fix typos. Reported by diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo index 5c4ee76..408e043 100644 --- a/gdb/doc/gdbint.texinfo +++ b/gdb/doc/gdbint.texinfo @@ -3044,10 +3044,6 @@ pointer. It examines the current state of the machine as needed. Define this if you need to supply your own definition for the function @code{get_saved_register}. -@item HAVE_REGISTER_WINDOWS -@findex HAVE_REGISTER_WINDOWS -Define this if the target has register windows. - @item REGISTER_IN_WINDOW_P (@var{regnum}) @findex REGISTER_IN_WINDOW_P Define this to be an expression that is 1 if the given register is in diff --git a/gdb/frame.c b/gdb/frame.c index 819ee2c..2753150 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -43,39 +43,6 @@ find_saved_register (struct frame_info *frame, int regnum) if (frame == NULL) /* No regs saved if want current frame */ return 0; -#ifdef HAVE_REGISTER_WINDOWS - /* We assume that a register in a register window will only be saved - in one place (since the name changes and/or disappears as you go - towards inner frames), so we only call get_frame_saved_regs on - the current frame. This is directly in contradiction to the - usage below, which assumes that registers used in a frame must be - saved in a lower (more interior) frame. This change is a result - of working on a register window machine; get_frame_saved_regs - always returns the registers saved within a frame, within the - context (register namespace) of that frame. */ - - /* However, note that we don't want this to return anything if - nothing is saved (if there's a frame inside of this one). Also, - callers to this routine asking for the stack pointer want the - stack pointer saved for *this* frame; this is returned from the - next frame. */ - - if (REGISTER_IN_WINDOW_P (regnum)) - { - frame1 = get_next_frame (frame); - if (!frame1) - return 0; /* Registers of this frame are active. */ - - /* Get the SP from the next frame in; it will be this - current frame. */ - if (regnum != SP_REGNUM) - frame1 = frame; - - FRAME_INIT_SAVED_REGS (frame1); - return frame1->saved_regs[regnum]; /* ... which might be zero */ - } -#endif /* HAVE_REGISTER_WINDOWS */ - /* Note that this next routine assumes that registers used in frame x will be saved only in the frame that x calls and frames interior to it. This is not true on the sparc, but the -- 2.7.4