From 5e5592e692fedaf8b1e6c5371e72007ee39cf93d Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Sat, 5 Apr 2003 15:39:34 +0000 Subject: [PATCH] 2003-04-05 Andrew Cagney * frame.c (get_frame_id): Update comment. (legacy_get_prev_frame): Update comment. * gdbarch.sh: Delete check for EXTRA_FRAME_INFO. * gdbarch.h: Regenerate. * config/sparc/tm-sparc.h (EXTRA_FRAME_INFO): Delete. * frame.h: Delete #ifdef EXTRA_FRAME_INFO code. --- gdb/ChangeLog | 9 +++++++ gdb/config/sparc/tm-sparc.h | 47 ------------------------------------- gdb/frame.c | 8 ++----- gdb/frame.h | 9 +------ gdb/gdbarch.h | 6 ----- gdb/gdbarch.sh | 6 ----- 6 files changed, 12 insertions(+), 73 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2adf96d58db..81918aa082e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,12 @@ +2003-04-05 Andrew Cagney + + * frame.c (get_frame_id): Update comment. + (legacy_get_prev_frame): Update comment. + * gdbarch.sh: Delete check for EXTRA_FRAME_INFO. + * gdbarch.h: Regenerate. + * config/sparc/tm-sparc.h (EXTRA_FRAME_INFO): Delete. + * frame.h: Delete #ifdef EXTRA_FRAME_INFO code. + 2003-04-05 Andrew Cagney * stack.c (print_frame_info): Use get_frame_pc. diff --git a/gdb/config/sparc/tm-sparc.h b/gdb/config/sparc/tm-sparc.h index ef3996232cc..544a562ffae 100644 --- a/gdb/config/sparc/tm-sparc.h +++ b/gdb/config/sparc/tm-sparc.h @@ -406,53 +406,6 @@ extern CORE_ADDR sparc_pc_adjust (CORE_ADDR); /* DEPRECATED_FRAME_CHAIN takes a frame's nominal address and produces the frame's chain-pointer. */ -/* In the case of the Sun 4, the frame-chain's nominal address - is held in the frame pointer register. - - On the Sun4, the frame (in %fp) is %sp for the previous frame. - From the previous frame's %sp, we can find the previous frame's - %fp: it is in the save area just above the previous frame's %sp. - - If we are setting up an arbitrary frame, we'll need to know where - it ends. Hence the following. This part of the frame cache - structure should be checked before it is assumed that this frame's - bottom is in the stack pointer. - - If there isn't a frame below this one, the bottom of this frame is - in the stack pointer. - - If there is a frame below this one, and the frame pointers are - identical, it's a leaf frame and the bottoms are the same also. - - Otherwise the bottom of this frame is the top of the next frame. - - The bottom field is misnamed, since it might imply that memory from - bottom to frame contains this frame. That need not be true if - stack frames are allocated in different segments (e.g. some on a - stack, some on a heap in the data segment). - - GCC 2.6 and later can generate ``flat register window'' code that - makes frames by explicitly saving those registers that need to be - saved. %i7 is used as the frame pointer, and the frame is laid out - so that flat and non-flat calls can be intermixed freely within a - program. Unfortunately for GDB, this means it must detect and - record the flatness of frames. - - Since the prologue in a flat frame also tells us where fp and pc - have been stashed (the frame is of variable size, so their location - is not fixed), it's convenient to record them in the frame info. */ - -#define EXTRA_FRAME_INFO \ - CORE_ADDR bottom; \ - int in_prologue; \ - int flat; \ - /* Following fields only relevant for flat frames. */ \ - CORE_ADDR pc_addr; \ - CORE_ADDR fp_addr; \ - /* Add this to ->frame to get the value of the stack pointer at the */ \ - /* time of the register saves. */ \ - int sp_offset; - /* We need to override DEPRECATED_GET_SAVED_REGISTER so that we can deal with the way outs change into ins in different frames. */ diff --git a/gdb/frame.c b/gdb/frame.c index 92490056898..1c653398842 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -65,9 +65,7 @@ get_frame_id (struct frame_info *fi) fi->unwind->this_id (fi->next, &fi->prologue_cache, &fi->id); fi->id_p = 1; /* FIXME: cagney/2002-12-18: Instead of this hack, should only - store the frame ID in PREV_FRAME. Unfortunatly, some - architectures (HP/UX) still reply on EXTRA_FRAME_INFO and, - hence, still poke at the "struct frame_info" object directly. */ + store the frame ID in PREV_FRAME. */ fi->frame = fi->id.base; } return frame_id_build (fi->frame, get_frame_pc (fi)); @@ -1150,9 +1148,7 @@ legacy_get_prev_frame (struct frame_info *this_frame) frame base, in the frame object. */ /* FIXME: cagney/2002-12-18: Instead of this hack, should only - store the frame ID in PREV_FRAME. Unfortunatly, some - architectures (HP/UX) still reply on EXTRA_FRAME_INFO and, - hence, still poke at the "struct frame_info" object directly. */ + store the frame ID in PREV_FRAME. */ /* FIXME: cagney/2003-04-04: Once ->frame is eliminated, this assignment can go. */ prev->frame = prev->id.base; diff --git a/gdb/frame.h b/gdb/frame.h index 9870fc2b9a0..ad81bd9bb41 100644 --- a/gdb/frame.h +++ b/gdb/frame.h @@ -320,7 +320,7 @@ extern void frame_pop (struct frame_info *frame); /* Describe the saved registers of a frame. */ -#if defined (EXTRA_FRAME_INFO) || defined (FRAME_FIND_SAVED_REGS) +#if defined (FRAME_FIND_SAVED_REGS) /* XXXX - deprecated */ struct frame_saved_regs { @@ -388,13 +388,6 @@ struct frame_info initialized by DEPRECATED_FRAME_INIT_SAVED_REGS(). */ CORE_ADDR *saved_regs; /*NUM_REGS + NUM_PSEUDO_REGS*/ -#ifdef EXTRA_FRAME_INFO - /* XXXX - deprecated */ - /* Anything extra for this structure that may have been defined - in the machine dependent files. */ - EXTRA_FRAME_INFO -#endif - /* Anything extra for this structure that may have been defined in the machine dependent files. */ /* Allocated by frame_extra_info_zalloc () which is called / diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 596f13194d3..8246bc1b42c 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -55,12 +55,6 @@ extern struct gdbarch *current_gdbarch; /* If any of the following are defined, the target wasn't correctly converted. */ -#if GDB_MULTI_ARCH -#if defined (EXTRA_FRAME_INFO) -#error "EXTRA_FRAME_INFO: replaced by struct frame_extra_info" -#endif -#endif - #if GDB_MULTI_ARCH #if defined (FRAME_FIND_SAVED_REGS) #error "FRAME_FIND_SAVED_REGS: replaced by DEPRECATED_FRAME_INIT_SAVED_REGS" diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index fa91815f8ef..7f85063b15b 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -820,12 +820,6 @@ extern struct gdbarch *current_gdbarch; /* If any of the following are defined, the target wasn't correctly converted. */ -#if GDB_MULTI_ARCH -#if defined (EXTRA_FRAME_INFO) -#error "EXTRA_FRAME_INFO: replaced by struct frame_extra_info" -#endif -#endif - #if GDB_MULTI_ARCH #if defined (FRAME_FIND_SAVED_REGS) #error "FRAME_FIND_SAVED_REGS: replaced by DEPRECATED_FRAME_INIT_SAVED_REGS" -- 2.30.2