From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16826 invoked by alias); 14 Nov 2004 01:14:50 -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 16815 invoked from network); 14 Nov 2004 01:14:46 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 14 Nov 2004 01:14:46 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id iAE1EeKS005780 for ; Sat, 13 Nov 2004 20:14:45 -0500 Received: from localhost.redhat.com (vpn50-32.rdu.redhat.com [172.16.50.32]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id iAE1EYr16579; Sat, 13 Nov 2004 20:14:34 -0500 Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 83DF1129D8C; Sat, 13 Nov 2004 20:13:08 -0500 (EST) Message-ID: <4196B124.80100@gnu.org> Date: Sun, 14 Nov 2004 01:14:00 -0000 From: Andrew Cagney User-Agent: Mozilla Thunderbird 0.8 (X11/20041020) MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: [commit] Delete deprecated_registers Content-Type: multipart/mixed; boundary="------------010507050102070404090607" X-SW-Source: 2004-11/txt/msg00300.txt.bz2 This is a multi-part message in MIME format. --------------010507050102070404090607 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 394 This deletes the deprecated_registers[] array from regcache.[hc]. I've built this on a PPC, and checked all the gdb_mbuild.sh list - the latter needed a few tweaks to keep things building, see the ChangeLog for the list. If anyone listed in the write-after-approval list find's a need to tweak something (or updated deprecated_registers), I'd view it as pretty obvious. committed, Andrew --------------010507050102070404090607 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 7531 2004-11-13 Andrew Cagney * regcache.h (deprecated_register_valid): Delete. (deprecated_registers): Delete. * regcache.c (deprecated_register_valid): Delete. (deprecated_registers): Delete. (deprecated_read_register_byte, _initialize_regcache) (deprecated_write_register_bytes, build_regcache): Update. * config/powerpc/ppc-sim.mt (TDEPFILES): Remove ppc-bdm.o and remote-sds.o. * config/powerpc/ppc-eabi.mt (TDEPFILES): Ditto. * config/mips/embed.mt (TDEPFILES): Remove remote-mips.o. Index: regcache.c =================================================================== RCS file: /cvs/src/src/gdb/regcache.c,v retrieving revision 1.128 diff -p -u -r1.128 regcache.c --- regcache.c 11 Oct 2004 16:35:28 -0000 1.128 +++ regcache.c 14 Nov 2004 01:07:13 -0000 @@ -400,23 +400,6 @@ struct regcache *current_regcache; user). Therefore all registers must be written back to the target when appropriate. */ -/* REGISTERS contains the cached register values (in target byte order). */ - -char *deprecated_registers; - -/* DEPRECATED_REGISTER_VALID is 0 if the register needs to be fetched, - 1 if it has been fetched, and - -1 if the register value was not available. - - "Not available" indicates that the target is not not able to supply - the register at this state. The register may become available at a - later time (after the next resume). This often occures when GDB is - manipulating a target that contains only a snapshot of the entire - system being debugged - some of the registers in such a system may - not have been saved. */ - -signed char *deprecated_register_valid; - /* The thread/process associated with the current set of registers. */ static ptid_t registers_ptid; @@ -434,7 +417,7 @@ static ptid_t registers_ptid; int register_cached (int regnum) { - return deprecated_register_valid[regnum]; + return current_regcache->register_valid_p[regnum]; } /* Record that REGNUM's value is cached if STATE is >0, uncached but @@ -559,15 +542,6 @@ deprecated_read_register_bytes (int in_s if (REGISTER_NAME (regnum) != NULL && *REGISTER_NAME (regnum) != '\0') /* Force the cache to fetch the entire register. */ deprecated_read_register_gen (regnum, reg_buf); - else - /* Legacy note: even though this register is ``invalid'' we - still need to return something. It would appear that some - code relies on apparent gaps in the register array also - being returned. */ - /* FIXME: cagney/2001-08-18: This is just silly. It defeats - the entire register read/write flow of control. Must - resist temptation to return 0xdeadbeef. */ - memcpy (reg_buf, &deprecated_registers[reg_start], reg_len); /* Legacy note: This function, for some reason, allows a NULL input buffer. If the buffer is NULL, the registers are still @@ -851,10 +825,6 @@ deprecated_write_register_bytes (int myr Update it from the target before scribbling on it. */ deprecated_read_register_gen (regnum, regbuf); - memcpy (&deprecated_registers[overlapstart], - myaddr + (overlapstart - myregstart), - overlapend - overlapstart); - target_store_registers (regnum); } } @@ -1178,8 +1148,6 @@ build_regcache (void) { current_regcache = regcache_xmalloc (current_gdbarch); current_regcache->readonly_p = 0; - deprecated_registers = deprecated_grub_regcache_for_registers (current_regcache); - deprecated_register_valid = current_regcache->register_valid_p; } static void @@ -1442,8 +1410,6 @@ _initialize_regcache (void) { regcache_descr_handle = gdbarch_data_register_post_init (init_regcache_descr); DEPRECATED_REGISTER_GDBARCH_SWAP (current_regcache); - DEPRECATED_REGISTER_GDBARCH_SWAP (deprecated_registers); - DEPRECATED_REGISTER_GDBARCH_SWAP (deprecated_register_valid); deprecated_register_gdbarch_swap (NULL, 0, build_regcache); observer_attach_target_changed (regcache_observer_target_changed); Index: regcache.h =================================================================== RCS file: /cvs/src/src/gdb/regcache.h,v retrieving revision 1.44 diff -p -u -r1.44 regcache.h --- regcache.h 3 Aug 2004 02:02:23 -0000 1.44 +++ regcache.h 14 Nov 2004 01:07:13 -0000 @@ -181,28 +181,7 @@ extern void deprecated_read_register_byt extern void deprecated_write_register_bytes (int regbyte, char *myaddr, int len); -/* Character array containing the current state of each register - (unavailable<0, invalid=0, valid>0) for the most recently - referenced thread. This global is often found in close proximity - to code that is directly manipulating the deprecated_registers[] - array. In such cases, it should be possible to replace the lot - with a call to regcache_raw_supply(). If you find yourself in dire - straits, still needing access to the cache status bit, the - regcache_valid_p() and set_register_cached() functions are - available. */ -extern signed char *deprecated_register_valid; - -/* Character array containing an image of the inferior programs' - registers for the most recently referenced thread. - - NOTE: cagney/2002-11-14: Target side code should be using - regcache_raw_supply() and/or regcache_collect() while architecture - side code should use the more generic regcache methods. */ - -extern char *deprecated_registers; - -/* NOTE: cagney/2002-11-05: This function, and its co-conspirator - deprecated_registers[], have been superseeded by +/* NOTE: cagney/2002-11-05: This function has been superseeded by regcache_raw_supply(). */ extern void deprecated_registers_fetched (void); Index: config/mips/embed.mt =================================================================== RCS file: /cvs/src/src/gdb/config/mips/embed.mt,v retrieving revision 1.6 diff -p -u -r1.6 embed.mt --- config/mips/embed.mt 31 Oct 2004 18:20:00 -0000 1.6 +++ config/mips/embed.mt 14 Nov 2004 01:07:13 -0000 @@ -1,3 +1,3 @@ -TDEPFILES= mips-tdep.o remote-mips.o mips-mdebug-tdep.o +TDEPFILES= mips-tdep.o mips-mdebug-tdep.o SIM_OBS = remote-sim.o SIM = ../sim/mips/libsim.a Index: config/powerpc/ppc-eabi.mt =================================================================== RCS file: /cvs/src/src/gdb/config/powerpc/ppc-eabi.mt,v retrieving revision 1.6 diff -p -u -r1.6 ppc-eabi.mt --- config/powerpc/ppc-eabi.mt 13 Sep 2004 20:55:41 -0000 1.6 +++ config/powerpc/ppc-eabi.mt 14 Nov 2004 01:07:13 -0000 @@ -1,3 +1,3 @@ # Target: PowerPC running eabi -TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o dink32-rom.o ppc-bdm.o ocd.o remote-sds.o ppc-sysv-tdep.o solib.o solib-svr4.o +TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o dink32-rom.o ocd.o ppc-sysv-tdep.o solib.o solib-svr4.o DEPRECATED_TM_FILE= tm-ppc-eabi.h Index: config/powerpc/ppc-sim.mt =================================================================== RCS file: /cvs/src/src/gdb/config/powerpc/ppc-sim.mt,v retrieving revision 1.6 diff -p -u -r1.6 ppc-sim.mt --- config/powerpc/ppc-sim.mt 13 Sep 2004 20:55:41 -0000 1.6 +++ config/powerpc/ppc-sim.mt 14 Nov 2004 01:07:13 -0000 @@ -1,5 +1,5 @@ # Target: PowerPC running eabi and including the simulator -TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o dink32-rom.o ppc-bdm.o ocd.o remote-sds.o ppc-sysv-tdep.o solib.o solib-svr4.o +TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o dink32-rom.o ocd.o ppc-sysv-tdep.o solib.o solib-svr4.o DEPRECATED_TM_FILE= tm-ppc-eabi.h SIM_OBS = remote-sim.o --------------010507050102070404090607--