From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18448 invoked by alias); 5 Aug 2004 14:15:59 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 18440 invoked from network); 5 Aug 2004 14:15:58 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 5 Aug 2004 14:15:58 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i75EFqe3011309 for ; Thu, 5 Aug 2004 10:15:58 -0400 Received: from localhost.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i75EFla08000; Thu, 5 Aug 2004 10:15:52 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id EBD8B2B9D; Thu, 5 Aug 2004 10:15:40 -0400 (EDT) Message-ID: <4112410C.3020708@gnu.org> Date: Thu, 05 Aug 2004 14:15:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040801 MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: [obish] Garbage collect deprecated fp/pc/sp functions Content-Type: multipart/mixed; boundary="------------030207080106070209080306" X-SW-Source: 2004-08/txt/msg00113.txt.bz2 This is a multi-part message in MIME format. --------------030207080106070209080306 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 76 Our frame-ified architectures never call these, removed. committed, Andrew --------------030207080106070209080306 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 7595 2004-08-05 Andrew Cagney * gdbarch.sh (deprecated_frame_saved_pc): Delete. * gdbarch.h, gdbarch.c: Re-generate. * regcache.c (deprecated_read_fp, deprecated_write_sp): Delete. * inferior.h (deprecated_read_fp, deprecated_write_sp): Delete. * frame.h: Delete deprecated_read_fp from comments. * arch-utils.c (deprecated_init_frame_pc_default): Delete. * arch-utils.h (deprecated_init_frame_pc_default): Delete. Index: doc/ChangeLog 2004-08-05 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete reference to deprecated_read_fp. Index: arch-utils.c =================================================================== RCS file: /cvs/src/src/gdb/arch-utils.c,v retrieving revision 1.121 diff -p -u -r1.121 arch-utils.c --- arch-utils.c 2 Aug 2004 21:58:43 -0000 1.121 +++ arch-utils.c 5 Aug 2004 14:09:39 -0000 @@ -228,17 +228,6 @@ no_op_reg_to_regnum (int reg) return reg; } -CORE_ADDR -deprecated_init_frame_pc_default (int fromleaf, struct frame_info *prev) -{ - if (fromleaf && DEPRECATED_SAVED_PC_AFTER_CALL_P ()) - return DEPRECATED_SAVED_PC_AFTER_CALL (get_next_frame (prev)); - else if (get_next_frame (prev) != NULL) - return DEPRECATED_FRAME_SAVED_PC (get_next_frame (prev)); - else - return read_pc (); -} - void default_elf_make_msymbol_special (asymbol *sym, struct minimal_symbol *msym) { Index: arch-utils.h =================================================================== RCS file: /cvs/src/src/gdb/arch-utils.h,v retrieving revision 1.74 diff -p -u -r1.74 arch-utils.h --- arch-utils.h 20 Jun 2004 18:10:13 -0000 1.74 +++ arch-utils.h 5 Aug 2004 14:09:39 -0000 @@ -72,10 +72,6 @@ extern gdbarch_convert_from_func_ptr_add extern int no_op_reg_to_regnum (int reg); -/* Versions of init_frame_pc(). Do nothing; do the default. */ - -extern CORE_ADDR deprecated_init_frame_pc_default (int fromleaf, struct frame_info *prev); - /* Do nothing version of elf_make_msymbol_special. */ void default_elf_make_msymbol_special (asymbol *sym, struct minimal_symbol *msym); Index: frame.h =================================================================== RCS file: /cvs/src/src/gdb/frame.h,v retrieving revision 1.142 diff -p -u -r1.142 frame.h --- frame.h 2 Aug 2004 19:44:39 -0000 1.142 +++ frame.h 5 Aug 2004 14:09:39 -0000 @@ -650,7 +650,7 @@ extern void deprecated_update_frame_pc_h /* FIXME: cagney/2002-12-18: Has the frame's base changed? Or to be more exact, was that initial guess at the frame's base as returned - by deprecated_read_fp() wrong? If it was, fix it. This shouldn't + by the deleted read_fp() wrong? If it was, fix it. This shouldn't be necessary since the code should be getting the frame's base correct from the outset. Index: gdbarch.sh =================================================================== RCS file: /cvs/src/src/gdb/gdbarch.sh,v retrieving revision 1.342 diff -p -u -r1.342 gdbarch.sh --- gdbarch.sh 3 Aug 2004 03:52:01 -0000 1.342 +++ gdbarch.sh 5 Aug 2004 14:09:40 -0000 @@ -575,10 +575,6 @@ v:=:CORE_ADDR:deprecated_function_start_ m::void:remote_translate_xfer_address:struct regcache *regcache, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len:regcache, gdb_addr, gdb_len, rem_addr, rem_len:::generic_remote_translate_xfer_address::0 # v:=:CORE_ADDR:frame_args_skip::::0:::0 -# DEPRECATED_FRAME_SAVED_PC has been replaced by UNWIND_PC. Please -# note, per UNWIND_PC's doco, that while the two have similar -# interfaces they have very different underlying implementations. -F:=:CORE_ADDR:deprecated_frame_saved_pc:struct frame_info *fi:fi M::CORE_ADDR:unwind_pc:struct frame_info *next_frame:next_frame M::CORE_ADDR:unwind_sp:struct frame_info *next_frame:next_frame # DEPRECATED_FRAME_LOCALS_ADDRESS as been replaced by the per-frame Index: inferior.h =================================================================== RCS file: /cvs/src/src/gdb/inferior.h,v retrieving revision 1.65 diff -p -u -r1.65 inferior.h --- inferior.h 12 May 2004 22:19:02 -0000 1.65 +++ inferior.h 5 Aug 2004 14:09:40 -0000 @@ -176,10 +176,6 @@ extern void generic_target_write_pc (COR extern CORE_ADDR read_sp (void); -extern void deprecated_write_sp (CORE_ADDR); - -extern CORE_ADDR deprecated_read_fp (void); - extern CORE_ADDR unsigned_pointer_to_address (struct type *type, const void *buf); extern void unsigned_address_to_pointer (struct type *type, void *buf, Index: regcache.c =================================================================== RCS file: /cvs/src/src/gdb/regcache.c,v retrieving revision 1.125 diff -p -u -r1.125 regcache.c --- regcache.c 4 Aug 2004 17:50:55 -0000 1.125 +++ regcache.c 5 Aug 2004 14:09:40 -0000 @@ -1066,19 +1066,18 @@ regcache_raw_collect (const struct regca } -/* read_pc, write_pc, read_sp, deprecated_read_fp, etc. Special - handling for registers PC, SP, and FP. */ +/* read_pc, write_pc, read_sp, etc. Special handling for registers + PC, SP, and FP. */ -/* NOTE: cagney/2001-02-18: The functions read_pc_pid(), read_pc(), - read_sp(), and deprecated_read_fp(), will eventually be replaced by - per-frame methods. Instead of relying on the global INFERIOR_PTID, - they will use the contextual information provided by the FRAME. - These functions do not belong in the register cache. */ +/* NOTE: cagney/2001-02-18: The functions read_pc_pid(), read_pc() and + read_sp(), will eventually be replaced by per-frame methods. + Instead of relying on the global INFERIOR_PTID, they will use the + contextual information provided by the FRAME. These functions do + not belong in the register cache. */ /* NOTE: cagney/2003-06-07: The functions generic_target_write_pc(), - write_pc_pid(), write_pc(), and deprecated_read_fp(), all need to - be replaced by something that does not rely on global state. But - what? */ + write_pc_pid() and write_pc(), all need to be replaced by something + that does not rely on global state. But what? */ CORE_ADDR read_pc_pid (ptid_t ptid) @@ -1157,22 +1156,6 @@ read_sp (void) internal_error (__FILE__, __LINE__, "read_sp: Unable to find SP"); } -void -deprecated_write_sp (CORE_ADDR val) -{ - gdb_assert (SP_REGNUM >= 0); - write_register (SP_REGNUM, val); -} - -CORE_ADDR -deprecated_read_fp (void) -{ - if (DEPRECATED_FP_REGNUM >= 0) - return read_register (DEPRECATED_FP_REGNUM); - else - internal_error (__FILE__, __LINE__, "deprecated_read_fp"); -} - static void reg_flush_command (char *command, int from_tty) { Index: doc/gdbint.texinfo =================================================================== RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v retrieving revision 1.215 diff -p -u -r1.215 gdbint.texinfo --- doc/gdbint.texinfo 3 Aug 2004 02:02:24 -0000 1.215 +++ doc/gdbint.texinfo 5 Aug 2004 14:09:41 -0000 @@ -3834,9 +3834,9 @@ Number of bits in a short integer; defau @findex read_sp @findex read_fp @anchor{TARGET_READ_SP} These change the behavior of @code{read_pc}, -@code{write_pc}, @code{read_sp} and @code{deprecated_read_fp}. For most -targets, these may be left undefined. @value{GDBN} will call the read -and write register functions with the relevant @code{_REGNUM} argument. +@code{write_pc} and @code{read_sp}. For most targets, these may be +left undefined. @value{GDBN} will call the read and write register +functions with the relevant @code{_REGNUM} argument. These macros are useful when a target keeps one of these registers in a hard to get at place; for example, part in a segment register and part --------------030207080106070209080306--