diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ebe87246b30..9ba340054a6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,175 @@ +Tue Feb 27 23:56:23 2001 Andrew Cagney + + From Steven Johnson: + * regcache.h: New file. + + * value.h (read_register_bytes, read_register_gen) + (write_register_gen, write_register_bytes) + (read_register, read_register_pid) + (read_signed_register, read_signed_register_pid) + (write_register, write_register_pid) + (register_cached, set_register_cached) + (register_changed, register_buffer) + (registers_changed, supply_register): Move declaration from here. + * regcache.h: To here. + * gdbcore.h (registers_fetched): Ditto. + * inferior.h (registers, registers_valid): Ditto. + + * regcache.c (generic_target_read_pc, read_pc_pid, read_pc, + generic_target_write_pc, write_pc_pid, write_pc, + generic_target_read_sp, read_sp, generic_target_write_sp, + write_sp, generic_target_read_fp, read_fp, + generic_target_write_fp, write_fp): Add note that these functions + will be moved from this file. + + * a29k-tdep.c: Include "regcache.h". + * a68v-nat.c: Ditto. + * abug-rom.c: Ditto. + * alpha-nat.c: Ditto. + * alpha-tdep.c: Ditto. + * alphabsd-nat.c: Ditto. + * arc-tdep.c: Ditto. + * arm-linux-nat.c: Ditto. + * arm-linux-tdep.c: Ditto. + * arm-tdep.c: Ditto. + * blockframe.c: Ditto. + * core-aout.c: Ditto. + * core-sol2.c: Ditto. + * corelow.c: Ditto. + * cpu32bug-rom.c: Ditto. + * cxux-nat.c: Ditto. + * d10v-tdep.c: Ditto. + * d30v-tdep.c: Ditto. + * dbug-rom.c: Ditto. + * dink32-rom.c: Ditto. + * dve3900-rom.c: Ditto. + * findvar.c: Ditto. + * fr30-tdep.c: Ditto. + * frame.c: Ditto. + * go32-nat.c: Ditto. + * h8300-tdep.c: Ditto. + * h8500-tdep.c: Ditto. + * hp300ux-nat.c: Ditto. + * hppa-tdep.c: Ditto. + * hppab-nat.c: Ditto. + * hppah-nat.c: Ditto. + * hppam3-nat.c: Ditto. + * hpux-thread.c: Ditto. + * i386-linux-nat.c: Ditto. + * i386-linux-tdep.c: Ditto. + * i386-tdep.c: Ditto. + * i386aix-nat.c: Ditto. + * i386b-nat.c: Ditto. + * i386bsd-nat.c: Ditto. + * i386gnu-nat.c: Ditto. + * i386ly-tdep.c: Ditto. + * i386m3-nat.c: Ditto. + * i386mach-nat.c: Ditto. + * i386nbsd-nat.c: Ditto. + * i386v4-nat.c: Ditto. + * i387-nat.c: Ditto. + * i387-tdep.c: Ditto. + * i960-tdep.c: Ditto. + * ia64-aix-nat.c: Ditto. + * ia64-linux-nat.c: Ditto. + * ia64-tdep.c: Ditto. + * infptrace.c: Ditto. + * infrun.c: Ditto. + * irix4-nat.c: Ditto. + * irix5-nat.c: Ditto. + * lin-lwp.c: Ditto. + * lin-thread.c: Ditto. + * lynx-nat.c: Ditto. + * m3-nat.c: Ditto. + * m32r-rom.c: Ditto. + * m32r-tdep.c: Ditto. + * m68hc11-tdep.c: Ditto. + * m68k-tdep.c: Ditto. + * m68klinux-nat.c: Ditto. + * m68knbsd-nat.c: Ditto. + * m68knbsd-tdep.c: Ditto. + * m88k-nat.c: Ditto. + * m88k-tdep.c: Ditto. + * mac-nat.c: Ditto. + * mcore-rom.c: Ditto. + * mcore-tdep.c: Ditto. + * mi/mi-main.c: Ditto. + * mips-nat.c: Ditto. + * mips-tdep.c: Ditto. + * mipsm3-nat.c: Ditto. + * mipsv4-nat.c: Ditto. + * mn10200-tdep.c: Ditto. + * mn10300-tdep.c: Ditto. + * monitor.c: Ditto. + * ns32km3-nat.c: Ditto. + * ns32knbsd-nat.c: Ditto. + * ocd.c: Ditto. + * pa64solib.c: Ditto. + * ppc-bdm.c: Ditto. + * ppc-linux-nat.c: Ditto. + * ppc-linux-tdep.c: Ditto. + * ppcbug-rom.c: Ditto. + * ppcnbsd-nat.c: Ditto. + * ptx4-nat.c: Ditto. + * regcache.c: Ditto. + * remote-adapt.c: Ditto. + * remote-array.c: Ditto. + * remote-bug.c: Ditto. + * remote-e7000.c: Ditto. + * remote-eb.c: Ditto. + * remote-es.c: Ditto. + * remote-est.c: Ditto. + * remote-hms.c: Ditto. + * remote-mips.c: Ditto. + * remote-mm.c: Ditto. + * remote-nindy.c: Ditto. + * remote-os9k.c: Ditto. + * remote-rdi.c: Ditto. + * remote-rdp.c: Ditto. + * remote-sds.c: Ditto. + * remote-sim.c: Ditto. + * remote-st.c: Ditto. + * remote-udi.c: Ditto. + * remote-utils.c: Ditto. + * remote-vx.c: Ditto. + * remote-vx29k.c: Ditto. + * remote-vx68.c: Ditto. + * remote-vx960.c: Ditto. + * remote-vxmips.c: Ditto. + * remote-vxsparc.c: Ditto. + * remote.c: Ditto. + * rom68k-rom.c: Ditto. + * rs6000-nat.c: Ditto. + * rs6000-tdep.c: Ditto. + * sh-tdep.c: Ditto. + * sh3-rom.c: Ditto. + * sol-thread.c: Ditto. + * solib-svr4.c: Ditto. + * somsolib.c: Ditto. + * sparc-nat.c: Ditto. + * sparc-tdep.c: Ditto. + * sparcl-tdep.c: Ditto. + * sparclet-rom.c: Ditto. + * sun3-nat.c: Ditto. + * sun386-nat.c: Ditto. + * symm-nat.c: Ditto. + * target.c: Ditto. + * thread-db.c: Ditto. + * thread.c: Ditto. + * tic80-tdep.c: Ditto. + * tracepoint.c: Ditto. + * ultra3-nat.c: Ditto. + * umax-xdep.c: Ditto. + * uw-thread.c: Ditto. + * v850-tdep.c: Ditto. + * v850ice.c: Ditto. + * valops.c: Ditto. + * w65-tdep.c: Ditto. + * w89k-rom.c: Ditto. + * win32-nat.c: Ditto. + * wince.c: Ditto. + * z8k-tdep.c: Ditto. + 2001-02-28 Matt Hiller * MAINTAINERS: Add Matt Hiller to Write After Approval list. diff --git a/gdb/a29k-tdep.c b/gdb/a29k-tdep.c index 1a2d929ee8b..3f26ff93469 100644 --- a/gdb/a29k-tdep.c +++ b/gdb/a29k-tdep.c @@ -27,6 +27,7 @@ #include "symtab.h" #include "inferior.h" #include "gdbcmd.h" +#include "regcache.h" /* If all these bits in an instruction word are zero, it is a "tag word" which precedes a function entry point and gives stack traceback info. diff --git a/gdb/a68v-nat.c b/gdb/a68v-nat.c index 7ad39a67629..e7624154f93 100644 --- a/gdb/a68v-nat.c +++ b/gdb/a68v-nat.c @@ -1,5 +1,6 @@ /* Host-dependent code for Apollo-68ks for GDB, the GNU debugger. - Copyright 1986, 1987, 1989, 1991 Free Software Foundation, Inc. + Copyright 1986, 1987, 1989, 1991, 2001 Free Software Foundation, + Inc. This file is part of GDB. @@ -20,6 +21,7 @@ #include "defs.h" #include "inferior.h" +#include "regcache.h" #ifndef _ISP__M68K #define _ISP__M68K 1 diff --git a/gdb/abug-rom.c b/gdb/abug-rom.c index 68f48a2304f..75b6f60f127 100644 --- a/gdb/abug-rom.c +++ b/gdb/abug-rom.c @@ -1,5 +1,5 @@ /* Remote debugging interface for ABug Rom monitor for GDB, the GNU debugger. - Copyright 1995, 1996, 1998 Free Software Foundation, Inc. + Copyright 1995, 1996, 1998, 2001 Free Software Foundation, Inc. Written by Rob Savoye of Cygnus Support @@ -25,6 +25,7 @@ #include "target.h" #include "monitor.h" #include "serial.h" +#include "regcache.h" /* Prototypes for local functions. */ diff --git a/gdb/alpha-nat.c b/gdb/alpha-nat.c index eb12b0d9797..adfa81af4e6 100644 --- a/gdb/alpha-nat.c +++ b/gdb/alpha-nat.c @@ -1,5 +1,6 @@ /* Low level Alpha interface, for GDB when running native. - Copyright 1993, 1995, 1996, 1998 Free Software Foundation, Inc. + Copyright 1993, 1995, 1996, 1998, 2001 Free Software Foundation, + Inc. This file is part of GDB. @@ -22,6 +23,7 @@ #include "inferior.h" #include "gdbcore.h" #include "target.h" +#include "regcache.h" #include #ifdef __linux__ #include diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index 571c3d62575..894a4c21fe5 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -1,5 +1,6 @@ /* Target-dependent code for the ALPHA architecture, for GDB, the GNU Debugger. - Copyright 1993, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. + Copyright 1993, 94, 95, 96, 97, 1998, 2001 Free Software + Foundation, Inc. This file is part of GDB. @@ -30,6 +31,7 @@ #include "objfiles.h" #include "gdb_string.h" #include "linespec.h" +#include "regcache.h" /* FIXME: Some of this code should perhaps be merged with mips-tdep.c. */ diff --git a/gdb/alphabsd-nat.c b/gdb/alphabsd-nat.c index 43cdb750908..e77b31b13aa 100644 --- a/gdb/alphabsd-nat.c +++ b/gdb/alphabsd-nat.c @@ -1,5 +1,5 @@ /* Native-dependent code for Alpha BSD's. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright 2000, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -20,6 +20,7 @@ #include "defs.h" #include "inferior.h" +#include "regcache.h" #include #include diff --git a/gdb/arc-tdep.c b/gdb/arc-tdep.c index 701ee554122..29a542d6b25 100644 --- a/gdb/arc-tdep.c +++ b/gdb/arc-tdep.c @@ -26,6 +26,7 @@ #include "floatformat.h" #include "symtab.h" #include "gdbcmd.h" +#include "regcache.h" /* Local functions */ diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c index f0815bc2962..5d1487e934e 100644 --- a/gdb/arm-linux-nat.c +++ b/gdb/arm-linux-nat.c @@ -1,5 +1,5 @@ /* GNU/Linux on ARM native support. - Copyright 1999, 2000 Free Software Foundation, Inc. + Copyright 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -22,6 +22,7 @@ #include "inferior.h" #include "gdbcore.h" #include "gdb_string.h" +#include "regcache.h" #include #include diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c index f50f7121f49..293a8b72057 100644 --- a/gdb/arm-linux-tdep.c +++ b/gdb/arm-linux-tdep.c @@ -1,5 +1,5 @@ /* GNU/Linux on ARM target support. - Copyright 1999, 2000 Free Software Foundation, Inc. + Copyright 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -25,6 +25,7 @@ #include "floatformat.h" #include "gdbcore.h" #include "frame.h" +#include "regcache.h" /* For arm_linux_skip_solib_resolver. */ #include "symtab.h" diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 3ca6dbebe21..0a0ec414a3e 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -1,6 +1,6 @@ /* Common target dependent code for GDB on ARM systems. - Copyright 1988, 1989, 1991, 1992, 1993, 1995, 1996, 1997, 1998, 1999, 2000 - Free Software Foundation, Inc. + Copyright 1988, 1989, 1991, 1992, 1993, 1995, 1996, 1997, 1998, + 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -29,6 +29,7 @@ #include "coff/internal.h" /* Internal format of COFF symbols in BFD */ #include "dis-asm.h" /* For register flavors. */ #include /* for isupper () */ +#include "regcache.h" /* Each OS has a different mechanism for accessing the various registers stored in the sigcontext structure. diff --git a/gdb/blockframe.c b/gdb/blockframe.c index eec0e109e82..0b0dce1fda8 100644 --- a/gdb/blockframe.c +++ b/gdb/blockframe.c @@ -1,7 +1,7 @@ /* Get info from stack frames; convert between frames, blocks, functions and pc values. - Copyright 1986, 87, 88, 89, 91, 94, 95, 96, 97, 1998 - Free Software Foundation, Inc. + Copyright 1986, 87, 88, 89, 91, 94, 95, 96, 97, 1998, 2001 Free + Software Foundation, Inc. This file is part of GDB. @@ -31,6 +31,7 @@ #include "target.h" /* for target_has_stack */ #include "inferior.h" /* for read_pc */ #include "annotate.h" +#include "regcache.h" /* Prototypes for exported functions. */ diff --git a/gdb/core-aout.c b/gdb/core-aout.c index 367090ff6d4..edd94e2fc8c 100644 --- a/gdb/core-aout.c +++ b/gdb/core-aout.c @@ -1,5 +1,5 @@ /* Extract registers from a "standard" core file, for GDB. - Copyright (C) 1988-1998 Free Software Foundation, Inc. + Copyright 1988-1998, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -38,6 +38,7 @@ #include "gdbcore.h" #include "value.h" /* For supply_register. */ #include "inferior.h" /* For ARCH_NUM_REGS. */ +#include "regcache.h" /* These are needed on various systems to expand REGISTER_U_ADDR. */ #ifndef USG diff --git a/gdb/core-sol2.c b/gdb/core-sol2.c index 5a32c041b85..e56e46a3b1b 100644 --- a/gdb/core-sol2.c +++ b/gdb/core-sol2.c @@ -1,5 +1,5 @@ /* Machine independent support for Solaris 2 core files for GDB. - Copyright 1994, 2000 Free Software Foundation, Inc. + Copyright 1994, 2000, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -42,6 +42,7 @@ #include #include #include "gdb_string.h" +#include "regcache.h" #include "inferior.h" #include "target.h" diff --git a/gdb/corelow.c b/gdb/corelow.c index 05baf334cbd..5c5eba9d755 100644 --- a/gdb/corelow.c +++ b/gdb/corelow.c @@ -35,6 +35,7 @@ #include "target.h" #include "gdbcore.h" #include "gdbthread.h" +#include "regcache.h" #ifndef O_BINARY #define O_BINARY 0 diff --git a/gdb/cpu32bug-rom.c b/gdb/cpu32bug-rom.c index 6b77506a5a7..25a30463682 100644 --- a/gdb/cpu32bug-rom.c +++ b/gdb/cpu32bug-rom.c @@ -1,5 +1,5 @@ /* Remote debugging interface for CPU32Bug Rom monitor for GDB, the GNU debugger. - Copyright 1995 Free Software Foundation, Inc. + Copyright 1995, 2001 Free Software Foundation, Inc. Written by Stu Grossman of Cygnus Support @@ -25,6 +25,7 @@ #include "target.h" #include "monitor.h" #include "serial.h" +#include "regcache.h" static void cpu32bug_open (char *args, int from_tty); diff --git a/gdb/cxux-nat.c b/gdb/cxux-nat.c index 74b201049ad..f1fa0759709 100644 --- a/gdb/cxux-nat.c +++ b/gdb/cxux-nat.c @@ -1,5 +1,6 @@ /* Native support for Motorola 88k running Harris CX/UX. - Copyright 1988, 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. + Copyright 1988, 1990, 1991, 1992, 1993, 1994, 2001 Free Software + Foundation, Inc. This file is part of GDB. @@ -33,6 +34,7 @@ #include "symfile.h" #include "objfiles.h" #include "symtab.h" +#include "regcache.h" #ifndef USER /* added to support BCS ptrace_user */ #define USER ptrace_user diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c index f0d749a292f..6b3ae87be46 100644 --- a/gdb/d10v-tdep.c +++ b/gdb/d10v-tdep.c @@ -35,6 +35,7 @@ #include "objfiles.h" #include "language.h" #include "arch-utils.h" +#include "regcache.h" #include "floatformat.h" #include "sim-d10v.h" diff --git a/gdb/d30v-tdep.c b/gdb/d30v-tdep.c index a94a4d9e91e..84ed9580ec4 100644 --- a/gdb/d30v-tdep.c +++ b/gdb/d30v-tdep.c @@ -33,6 +33,7 @@ #include "dis-asm.h" #include "symfile.h" #include "objfiles.h" +#include "regcache.h" #include "language.h" /* For local_hex_string() */ diff --git a/gdb/dbug-rom.c b/gdb/dbug-rom.c index dff1a3be3af..6a660ebcd0f 100644 --- a/gdb/dbug-rom.c +++ b/gdb/dbug-rom.c @@ -1,5 +1,5 @@ /* Remote debugging interface to dBUG ROM monitor for GDB, the GNU debugger. - Copyright 1996, 1999 Free Software Foundation, Inc. + Copyright 1996, 1999, 2001 Free Software Foundation, Inc. Written by Stan Shebs of Cygnus Support. @@ -30,6 +30,7 @@ #include "target.h" #include "monitor.h" #include "serial.h" +#include "regcache.h" static void dbug_open (char *args, int from_tty); diff --git a/gdb/dink32-rom.c b/gdb/dink32-rom.c index 2ad9c6153dc..cb2caaa2c3f 100644 --- a/gdb/dink32-rom.c +++ b/gdb/dink32-rom.c @@ -1,6 +1,6 @@ /* Remote debugging interface for DINK32 (PowerPC) ROM monitor for GDB, the GNU debugger. - Copyright 1997 Free Software Foundation, Inc. + Copyright 1997, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -26,6 +26,7 @@ #include "serial.h" #include "symfile.h" /* For generic_load() */ #include "inferior.h" /* For write_pc() */ +#include "regcache.h" static void dink32_open (char *args, int from_tty); diff --git a/gdb/dve3900-rom.c b/gdb/dve3900-rom.c index 5c6755a3bb0..974306130c5 100644 --- a/gdb/dve3900-rom.c +++ b/gdb/dve3900-rom.c @@ -1,6 +1,6 @@ /* Remote debugging interface for Densan DVE-R3900 ROM monitor for GDB, the GNU debugger. - Copyright 1997 Free Software Foundation, Inc. + Copyright 1997, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -28,6 +28,7 @@ #include "command.h" #include "gdb_string.h" #include +#include "regcache.h" /* Type of function passed to bfd_map_over_sections. */ diff --git a/gdb/findvar.c b/gdb/findvar.c index 88ca3158879..969097fdefd 100644 --- a/gdb/findvar.c +++ b/gdb/findvar.c @@ -30,6 +30,7 @@ #include "gdb_string.h" #include "floatformat.h" #include "symfile.h" /* for overlay functions */ +#include "regcache.h" /* This is used to indicate that we don't know the format of the floating point number. Typically, this is useful for native ports, where the actual format diff --git a/gdb/fr30-tdep.c b/gdb/fr30-tdep.c index c06542adf96..5198bf3197a 100644 --- a/gdb/fr30-tdep.c +++ b/gdb/fr30-tdep.c @@ -1,5 +1,5 @@ /* Target-dependent code for the Fujitsu FR30. - Copyright 1999, Free Software Foundation, Inc. + Copyright 1999, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -28,6 +28,7 @@ #include "gdb_string.h" #include "gdbcore.h" #include "symfile.h" +#include "regcache.h" /* An expression that tells us whether the function invocation represented by FI does not have a frame on the stack associated with it. */ diff --git a/gdb/frame.c b/gdb/frame.c index e29729171c9..f68bc543563 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -24,6 +24,7 @@ #include "target.h" #include "value.h" #include "inferior.h" /* for inferior_pid */ +#include "regcache.h" /* FIND_SAVED_REGISTER () diff --git a/gdb/gdbcore.h b/gdb/gdbcore.h index c3db1da0828..e57f5140e4d 100644 --- a/gdb/gdbcore.h +++ b/gdb/gdbcore.h @@ -108,8 +108,6 @@ extern void validate_files (void); extern CORE_ADDR register_addr (int regno, CORE_ADDR blockend); -extern void registers_fetched (void); - #if !defined (KERNEL_U_ADDR) extern CORE_ADDR kernel_u_addr; #define KERNEL_U_ADDR kernel_u_addr diff --git a/gdb/go32-nat.c b/gdb/go32-nat.c index 582ff1626ff..461c783918f 100644 --- a/gdb/go32-nat.c +++ b/gdb/go32-nat.c @@ -29,6 +29,7 @@ #include "floatformat.h" #include "buildsym.h" #include "i387-nat.h" +#include "regcache.h" #include /* required for __DJGPP_MINOR__ */ #include diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c index 84e190b14a9..909459824d9 100644 --- a/gdb/h8300-tdep.c +++ b/gdb/h8300-tdep.c @@ -1,5 +1,5 @@ /* Target-machine dependent code for Hitachi H8/300, for GDB. - Copyright (C) 1988, 1990, 1991 Free Software Foundation, Inc. + Copyright 1988, 1990, 1991, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -33,6 +33,7 @@ #include "gdbcore.h" #include "gdb_string.h" #include "value.h" +#include "regcache.h" extern int h8300hmode, h8300smode; diff --git a/gdb/h8500-tdep.c b/gdb/h8500-tdep.c index 2f20c157aa6..38b5db0c8c2 100644 --- a/gdb/h8500-tdep.c +++ b/gdb/h8500-tdep.c @@ -1,5 +1,5 @@ /* Target-dependent code for Hitachi H8/500, for GDB. - Copyright 1993, 1994, 1995 Free Software Foundation, Inc. + Copyright 1993, 1994, 1995, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -32,6 +32,7 @@ #include "value.h" #include "dis-asm.h" #include "gdbcore.h" +#include "regcache.h" #define UNSIGNED_SHORT(X) ((X) & 0xffff) diff --git a/gdb/hp300ux-nat.c b/gdb/hp300ux-nat.c index ca0a802d42e..0f64e4df2df 100644 --- a/gdb/hp300ux-nat.c +++ b/gdb/hp300ux-nat.c @@ -1,5 +1,6 @@ /* HP/UX native interface for HP 300's, for GDB when running under Unix. - Copyright 1986, 1987, 1989, 1991, 1992, 1993 Free Software Foundation, Inc. + Copyright 1986, 1987, 1989, 1991, 1992, 1993, 2001 Free Software + Foundation, Inc. This file is part of GDB. @@ -21,6 +22,7 @@ #include "defs.h" #include "frame.h" #include "inferior.h" +#include "regcache.h" /* Defining this means some system include files define some extra stuff. */ #define WOPR diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index 551fd8ed645..a320f33ca30 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -1,5 +1,6 @@ /* Target-dependent code for the HP PA architecture, for GDB. - Copyright 1986, 1987, 1989-1996, 1999-2000 Free Software Foundation, Inc. + Copyright 1986, 1987, 1989-1996, 1999-2000, 2001 Free Software + Foundation, Inc. Contributed by the Center for Software Science at the University of Utah (pa-gdb-bugs@cs.utah.edu). @@ -26,6 +27,7 @@ #include "bfd.h" #include "inferior.h" #include "value.h" +#include "regcache.h" /* For argument passing to the inferior */ #include "symtab.h" diff --git a/gdb/hppab-nat.c b/gdb/hppab-nat.c index 17a4dc763a3..d2666172edb 100644 --- a/gdb/hppab-nat.c +++ b/gdb/hppab-nat.c @@ -1,7 +1,8 @@ /* Machine-dependent hooks for the unix child process stratum. This code is for the HP PA-RISC cpu. - Copyright 1986, 1987, 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. + Copyright 1986, 1987, 1989, 1990, 1991, 1992, 1993, 2001 Free + Software Foundation, Inc. Contributed by the Center for Software Science at the University of Utah (pa-gdb-bugs@cs.utah.edu). @@ -26,6 +27,7 @@ #include "defs.h" #include "inferior.h" #include "target.h" +#include "regcache.h" #include /* Use an extra level of indirection for ptrace calls. diff --git a/gdb/hppah-nat.c b/gdb/hppah-nat.c index 840813d6c27..aa50588071b 100644 --- a/gdb/hppah-nat.c +++ b/gdb/hppah-nat.c @@ -30,6 +30,7 @@ #include #include "gdbcore.h" #include "gdb_wait.h" +#include "regcache.h" #include extern CORE_ADDR text_end; diff --git a/gdb/hppam3-nat.c b/gdb/hppam3-nat.c index a3d4e5b0070..07239b7d7ee 100644 --- a/gdb/hppam3-nat.c +++ b/gdb/hppam3-nat.c @@ -1,5 +1,5 @@ /* Low level interface to HP800 running mach 4.0. - Copyright (C) 1995 Free Software Foundation, Inc. + Copyright 1995, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -21,6 +21,7 @@ #include "defs.h" #include "inferior.h" #include "floatformat.h" +#include "regcache.h" #include diff --git a/gdb/hpux-thread.c b/gdb/hpux-thread.c index 4df446eb609..90ce323ee49 100644 --- a/gdb/hpux-thread.c +++ b/gdb/hpux-thread.c @@ -1,5 +1,5 @@ /* Low level interface for debugging HPUX/DCE threads for GDB, the GNU debugger. - Copyright 1996, 1999 Free Software Foundation, Inc. + Copyright 1996, 1999, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -39,6 +39,7 @@ #include "gdbthread.h" #include "target.h" #include "inferior.h" +#include "regcache.h" #include #include #include "gdbcore.h" diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c index c92d96c08e0..47e78708a24 100644 --- a/gdb/i386-linux-nat.c +++ b/gdb/i386-linux-nat.c @@ -21,6 +21,7 @@ #include "defs.h" #include "inferior.h" #include "gdbcore.h" +#include "regcache.h" #include #include diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c index e7fbc38196b..ee6ad8f7cf5 100644 --- a/gdb/i386-linux-tdep.c +++ b/gdb/i386-linux-tdep.c @@ -1,5 +1,5 @@ /* Target-dependent code for Linux running on i386's, for GDB. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright 2000, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -22,6 +22,7 @@ #include "gdbcore.h" #include "frame.h" #include "value.h" +#include "regcache.h" /* For i386_linux_skip_solib_resolver. */ #include "symtab.h" diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index fd95baa9338..d2f4b22712c 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -30,6 +30,7 @@ #include "gdbcmd.h" #include "command.h" #include "arch-utils.h" +#include "regcache.h" static long i386_get_frame_setup (CORE_ADDR); diff --git a/gdb/i386aix-nat.c b/gdb/i386aix-nat.c index c32f151a2ba..0d646decef6 100644 --- a/gdb/i386aix-nat.c +++ b/gdb/i386aix-nat.c @@ -1,5 +1,6 @@ /* Intel 386 native support. - Copyright (C) 1988, 1989, 1991, 1992 Free Software Foundation, Inc. + Copyright 1988, 1989, 1991, 1992, 2001 Free Software Foundation, + Inc. This file is part of GDB. @@ -23,6 +24,7 @@ #include "inferior.h" #include "language.h" #include "gdbcore.h" +#include "regcache.h" #ifdef USG #include diff --git a/gdb/i386b-nat.c b/gdb/i386b-nat.c index 12a27a9085c..8a4f2f3edf4 100644 --- a/gdb/i386b-nat.c +++ b/gdb/i386b-nat.c @@ -1,5 +1,6 @@ /* Native-dependent code for BSD Unix running on i386's, for GDB. - Copyright 1988, 1989, 1991, 1992, 1994, 1996 Free Software Foundation, Inc. + Copyright 1988, 1989, 1991, 1992, 1994, 1996, 2001 Free Software + Foundation, Inc. This file is part of GDB. @@ -27,6 +28,7 @@ #include #include "inferior.h" #include "gdbcore.h" /* for registers_fetched() */ +#include "regcache.h" void fetch_inferior_registers (int regno) diff --git a/gdb/i386bsd-nat.c b/gdb/i386bsd-nat.c index a866a9b5ce9..e991ba0fa71 100644 --- a/gdb/i386bsd-nat.c +++ b/gdb/i386bsd-nat.c @@ -1,5 +1,5 @@ /* Native-dependent code for modern i386 BSD's. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright 2000, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -20,6 +20,7 @@ #include "defs.h" #include "inferior.h" +#include "regcache.h" #include #include diff --git a/gdb/i386gnu-nat.c b/gdb/i386gnu-nat.c index fca14e47114..8dfc3fdd29b 100644 --- a/gdb/i386gnu-nat.c +++ b/gdb/i386gnu-nat.c @@ -1,5 +1,6 @@ /* Low level interface to i386 running the GNU Hurd. - Copyright (C) 1992, 1995, 1996, 2000 Free Software Foundation, Inc. + Copyright 1992, 1995, 1996, 2000, 2001 Free Software Foundation, + Inc. This file is part of GDB. @@ -21,6 +22,7 @@ #include "defs.h" #include "inferior.h" #include "floatformat.h" +#include "regcache.h" #include "gdb_assert.h" #include diff --git a/gdb/i386ly-tdep.c b/gdb/i386ly-tdep.c index 0122479a19b..e0c028770ee 100644 --- a/gdb/i386ly-tdep.c +++ b/gdb/i386ly-tdep.c @@ -1,5 +1,5 @@ /* Target-dependent code for Intel 386 running LynxOS. - Copyright 1993 Free Software Foundation, Inc. + Copyright 1993, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -22,6 +22,7 @@ #include "inferior.h" #include "target.h" #include "gdbcore.h" +#include "regcache.h" /* Return the PC of the caller from the call frame. Assumes the subr prologue has already been executed, and the frame pointer setup. If this is the diff --git a/gdb/i386m3-nat.c b/gdb/i386m3-nat.c index 5f3d130693e..fff34baeeb0 100644 --- a/gdb/i386m3-nat.c +++ b/gdb/i386m3-nat.c @@ -1,5 +1,5 @@ /* Low level interface to I386 running mach 3.0. - Copyright (C) 1992 Free Software Foundation, Inc. + Copyright 1992, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -21,6 +21,7 @@ #include "defs.h" #include "inferior.h" #include "floatformat.h" +#include "regcache.h" #include diff --git a/gdb/i386mach-nat.c b/gdb/i386mach-nat.c index 1759b0fb215..ef513d79a3c 100644 --- a/gdb/i386mach-nat.c +++ b/gdb/i386mach-nat.c @@ -1,5 +1,6 @@ /* Native dependent code for Mach 386's for GDB, the GNU debugger. - Copyright (C) 1986, 1987, 1989, 1991, 1992 Free Software Foundation, Inc. + Copyright 1986, 1987, 1989, 1991, 1992, 2001 Free Software + Foundation, Inc. This file is part of GDB. @@ -22,6 +23,7 @@ #include "frame.h" #include "inferior.h" #include "gdbcore.h" +#include "regcache.h" #include #include diff --git a/gdb/i386nbsd-nat.c b/gdb/i386nbsd-nat.c index 0c069d12e60..d7444114e8b 100644 --- a/gdb/i386nbsd-nat.c +++ b/gdb/i386nbsd-nat.c @@ -1,6 +1,6 @@ /* Native-dependent code for NetBSD/i386, for GDB. - Copyright 1988, 1989, 1991, 1992, 1994, 1996, 2000 - Free Software Foundation, Inc. + Copyright 1988, 1989, 1991, 1992, 1994, 1996, 2000, 2001 Free + Software Foundation, Inc. This file is part of GDB. @@ -26,6 +26,7 @@ #include #include "inferior.h" #include "gdbcore.h" /* for registers_fetched() */ +#include "regcache.h" #define RF(dst, src) \ memcpy(®isters[REGISTER_BYTE(dst)], &src, sizeof(src)) diff --git a/gdb/i386v4-nat.c b/gdb/i386v4-nat.c index 97506476c73..ee0fb5178d6 100644 --- a/gdb/i386v4-nat.c +++ b/gdb/i386v4-nat.c @@ -1,5 +1,6 @@ /* Native-dependent code for SVR4 Unix running on i386's, for GDB. - Copyright 1988, 1989, 1991, 1992, 1996, 1998 Free Software Foundation, Inc. + Copyright 1988, 1989, 1991, 1992, 1996, 1998, 2001 Free Software + Foundation, Inc. This file is part of GDB. @@ -21,6 +22,7 @@ #include "defs.h" #include "value.h" #include "inferior.h" +#include "regcache.h" #ifdef HAVE_SYS_REG_H #include diff --git a/gdb/i387-nat.c b/gdb/i387-nat.c index 49357c47096..f22b4078c21 100644 --- a/gdb/i387-nat.c +++ b/gdb/i387-nat.c @@ -21,6 +21,7 @@ #include "defs.h" #include "inferior.h" #include "value.h" +#include "regcache.h" #include "i387-nat.h" diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c index 88b65a44814..ea3e48ddc45 100644 --- a/gdb/i387-tdep.c +++ b/gdb/i387-tdep.c @@ -1,5 +1,6 @@ /* Intel 387 floating point stuff. - Copyright (C) 1988, 89, 91, 98, 99, 2000 Free Software Foundation, Inc. + Copyright 1988, 89, 91, 98, 99, 2000, 2001 Free Software + Foundation, Inc. This file is part of GDB. @@ -25,6 +26,7 @@ #include "value.h" #include "gdbcore.h" #include "floatformat.h" +#include "regcache.h" /* FIXME: Eliminate the next two functions when we have the time to diff --git a/gdb/i960-tdep.c b/gdb/i960-tdep.c index 27fc2062b7e..35e47f1a626 100644 --- a/gdb/i960-tdep.c +++ b/gdb/i960-tdep.c @@ -1,5 +1,6 @@ /* Target-machine dependent code for the Intel 960 - Copyright 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. + Copyright 1991, 1992, 1993, 1994, 1995, 2001 Free Software + Foundation, Inc. Contributed by Intel Corporation. examine_prologue and other parts contributed by Wind River Systems. @@ -28,6 +29,7 @@ #include "target.h" #include "gdbcore.h" #include "inferior.h" +#include "regcache.h" static CORE_ADDR next_insn (CORE_ADDR memaddr, unsigned int *pword1, unsigned int *pword2); diff --git a/gdb/ia64-aix-nat.c b/gdb/ia64-aix-nat.c index 3d747882c76..c41cc7cc88c 100644 --- a/gdb/ia64-aix-nat.c +++ b/gdb/ia64-aix-nat.c @@ -22,6 +22,7 @@ #include "inferior.h" #include "target.h" #include "gdbcore.h" +#include "regcache.h" #include #include "symtab.h" diff --git a/gdb/ia64-linux-nat.c b/gdb/ia64-linux-nat.c index bd07c3b96b1..50217f12582 100644 --- a/gdb/ia64-linux-nat.c +++ b/gdb/ia64-linux-nat.c @@ -1,5 +1,5 @@ /* Functions specific to running gdb native on IA-64 running Linux. - Copyright 1999, 2000 Free Software Foundation, Inc. + Copyright 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -22,6 +22,7 @@ #include "inferior.h" #include "target.h" #include "gdbcore.h" +#include "regcache.h" #include #include diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c index eb7472749fe..5efd58a92a5 100644 --- a/gdb/ia64-tdep.c +++ b/gdb/ia64-tdep.c @@ -25,6 +25,7 @@ #include "gdbcore.h" #include "arch-utils.h" #include "floatformat.h" +#include "regcache.h" #include "objfiles.h" #include "elf/common.h" /* for DT_PLTGOT value */ diff --git a/gdb/inferior.h b/gdb/inferior.h index 69464b5e53e..7ec1e87b3ec 100644 --- a/gdb/inferior.h +++ b/gdb/inferior.h @@ -111,16 +111,6 @@ extern int inferior_ignoring_leading_exec_events; extern struct environ *inferior_environ; -/* Character array containing an image of the inferior programs' - registers. */ - -extern char *registers; - -/* Character array containing the current state of each register - (unavailable<0, valid=0, invalid>0). */ - -extern signed char *register_valid; - extern void clear_proceed_status (void); extern void proceed (CORE_ADDR, enum target_signal, int); diff --git a/gdb/infptrace.c b/gdb/infptrace.c index e4637ee28f1..0770d572625 100644 --- a/gdb/infptrace.c +++ b/gdb/infptrace.c @@ -24,6 +24,7 @@ #include "inferior.h" #include "target.h" #include "gdb_string.h" +#include "regcache.h" #include "gdb_wait.h" diff --git a/gdb/infrun.c b/gdb/infrun.c index 5266c88ca32..e200d6d4c8e 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -35,6 +35,7 @@ #include "top.h" #include #include "inf-loop.h" +#include "regcache.h" /* Prototypes for local functions */ diff --git a/gdb/irix4-nat.c b/gdb/irix4-nat.c index 506d57bcd66..dc244759569 100644 --- a/gdb/irix4-nat.c +++ b/gdb/irix4-nat.c @@ -1,6 +1,6 @@ /* Native support for the SGI Iris running IRIX version 4, for GDB. - Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1995 - Free Software Foundation, Inc. + Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1995, 2001 Free + Software Foundation, Inc. Contributed by Alessandro Forin(af@cs.cmu.edu) at CMU and by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin. Implemented for Irix 4.x by Garrett A. Wollman. @@ -25,6 +25,7 @@ #include "defs.h" #include "inferior.h" #include "gdbcore.h" +#include "regcache.h" #include #include diff --git a/gdb/irix5-nat.c b/gdb/irix5-nat.c index 5fe41fa004b..88933928c7c 100644 --- a/gdb/irix5-nat.c +++ b/gdb/irix5-nat.c @@ -1,6 +1,6 @@ /* Native support for the SGI Iris running IRIX version 5, for GDB. - Copyright 1988, 89, 90, 91, 92, 93, 94, 95, 96, 98, 1999 - Free Software Foundation, Inc. + Copyright 1988, 89, 90, 91, 92, 93, 94, 95, 96, 98, 1999, 2001 Free + Software Foundation, Inc. Contributed by Alessandro Forin(af@cs.cmu.edu) at CMU and by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin. Implemented for Irix 4.x by Garrett A. Wollman. @@ -27,6 +27,7 @@ #include "inferior.h" #include "gdbcore.h" #include "target.h" +#include "regcache.h" #include "gdb_string.h" #include diff --git a/gdb/lin-lwp.c b/gdb/lin-lwp.c index 94af2e82684..c2a654ea521 100644 --- a/gdb/lin-lwp.c +++ b/gdb/lin-lwp.c @@ -1,5 +1,5 @@ /* Multi-threaded debugging support for Linux (LWP layer). - Copyright 2000 Free Software Foundation, Inc. + Copyright 2000, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -29,6 +29,7 @@ #include "gdbthread.h" #include "inferior.h" #include "target.h" +#include "regcache.h" #define DEBUG 1 diff --git a/gdb/lin-thread.c b/gdb/lin-thread.c index b3fd14ca961..6a88b8968c3 100644 --- a/gdb/lin-thread.c +++ b/gdb/lin-thread.c @@ -1,6 +1,6 @@ /* Multi-threaded debugging support for the thread_db interface, used on operating systems such as Solaris and Linux. - Copyright 1999 Free Software Foundation, Inc. + Copyright 1999, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -101,6 +101,7 @@ #include "target.h" #include "inferior.h" #include "gdbcmd.h" +#include "regcache.h" #include "gdb_wait.h" diff --git a/gdb/lynx-nat.c b/gdb/lynx-nat.c index 38bd6d3ddfb..3e376c32424 100644 --- a/gdb/lynx-nat.c +++ b/gdb/lynx-nat.c @@ -1,5 +1,5 @@ /* Native-dependent code for LynxOS. - Copyright 1993, 1994 Free Software Foundation, Inc. + Copyright 1993, 1994, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -23,6 +23,7 @@ #include "inferior.h" #include "target.h" #include "gdbcore.h" +#include "regcache.h" #include #include diff --git a/gdb/m3-nat.c b/gdb/m3-nat.c index cb3cccf301f..33de4f6bbcb 100644 --- a/gdb/m3-nat.c +++ b/gdb/m3-nat.c @@ -57,6 +57,7 @@ #include "gdb_wait.h" #include "gdbcmd.h" #include "gdbcore.h" +#include "regcache.h" #if 0 #include diff --git a/gdb/m32r-rom.c b/gdb/m32r-rom.c index 2dfac770ea2..65a61ad2227 100644 --- a/gdb/m32r-rom.c +++ b/gdb/m32r-rom.c @@ -37,6 +37,7 @@ #include "objfiles.h" /* for ALL_OBJFILES etc. */ #include "inferior.h" /* for write_pc() */ #include +#include "regcache.h" extern void report_transfer_performance (unsigned long, time_t, time_t); diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c index e8684033c88..5165fd2dcf0 100644 --- a/gdb/m32r-tdep.c +++ b/gdb/m32r-tdep.c @@ -1,5 +1,5 @@ /* Target-dependent code for the Mitsubishi m32r for GDB, the GNU debugger. - Copyright 1996, Free Software Foundation, Inc. + Copyright 1996, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -28,6 +28,7 @@ #include "gdb_string.h" #include "gdbcore.h" #include "symfile.h" +#include "regcache.h" /* Function: m32r_use_struct_convention Return nonzero if call_function should allocate stack space for a diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c index 64f78108454..a636b34c0e8 100644 --- a/gdb/m68hc11-tdep.c +++ b/gdb/m68hc11-tdep.c @@ -1,5 +1,5 @@ /* Target-dependent code for Motorola 68HC11 & 68HC12 - Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Copyright 1999, 2000, 2001 Free Software Foundation, Inc. Contributed by Stephane Carrez, stcarrez@worldnet.fr This file is part of GDB. @@ -33,6 +33,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "symfile.h" #include "objfiles.h" #include "arch-utils.h" +#include "regcache.h" #include "target.h" #include "opcode/m68hc11.h" diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c index c66615bea23..d4b717621e1 100644 --- a/gdb/m68k-tdep.c +++ b/gdb/m68k-tdep.c @@ -26,6 +26,7 @@ #include "value.h" #include "gdb_string.h" #include "inferior.h" +#include "regcache.h" #define P_LINKL_FP 0x480e diff --git a/gdb/m68klinux-nat.c b/gdb/m68klinux-nat.c index b78b8a5acb3..b7adda55c9d 100644 --- a/gdb/m68klinux-nat.c +++ b/gdb/m68klinux-nat.c @@ -1,5 +1,5 @@ /* Motorola m68k native support for Linux - Copyright (C) 1996,1998 Free Software Foundation, Inc. + Copyright 1996, 1998, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -23,6 +23,7 @@ #include "inferior.h" #include "language.h" #include "gdbcore.h" +#include "regcache.h" #ifdef USG #include diff --git a/gdb/m68knbsd-nat.c b/gdb/m68knbsd-nat.c index 6279f65ef27..0595c2c5e33 100644 --- a/gdb/m68knbsd-nat.c +++ b/gdb/m68knbsd-nat.c @@ -1,5 +1,6 @@ /* Native-dependent code for Motorola m68k's running NetBSD, for GDB. - Copyright 1988, 1989, 1991, 1992, 1994, 1996 Free Software Foundation, Inc. + Copyright 1988, 1989, 1991, 1992, 1994, 1996, 2001 Free Software + Foundation, Inc. This file is part of GDB. @@ -25,6 +26,7 @@ #include #include "inferior.h" #include "gdbcore.h" +#include "regcache.h" void fetch_inferior_registers (int regno) diff --git a/gdb/m68knbsd-tdep.c b/gdb/m68knbsd-tdep.c index 0b49cac58ee..520d14fa47f 100644 --- a/gdb/m68knbsd-tdep.c +++ b/gdb/m68knbsd-tdep.c @@ -21,6 +21,7 @@ #include "defs.h" #include "gdbtypes.h" +#include "regcache.h" int m68knbsd_use_struct_convention (int gcc_p, struct type *type) diff --git a/gdb/m88k-nat.c b/gdb/m88k-nat.c index 0ce30e71b1a..164f12dadbd 100644 --- a/gdb/m88k-nat.c +++ b/gdb/m88k-nat.c @@ -1,5 +1,6 @@ /* Native-dependent Motorola 88xxx support for GDB, the GNU Debugger. - Copyright 1988, 1990, 1991, 1992 Free Software Foundation, Inc. + Copyright 1988, 1990, 1991, 1992, 2001 Free Software Foundation, + Inc. This file is part of GDB. @@ -21,6 +22,7 @@ #include "defs.h" #include "frame.h" #include "inferior.h" +#include "regcache.h" #include #include diff --git a/gdb/m88k-tdep.c b/gdb/m88k-tdep.c index afe1ca2d7e1..1148bc875e1 100644 --- a/gdb/m88k-tdep.c +++ b/gdb/m88k-tdep.c @@ -1,5 +1,6 @@ /* Target-machine dependent code for Motorola 88000 series, for GDB. - Copyright 1988, 1990, 1991, 1994, 1995 Free Software Foundation, Inc. + Copyright 1988, 1990, 1991, 1994, 1995, 2001 Free Software + Foundation, Inc. This file is part of GDB. @@ -26,6 +27,7 @@ #include "symtab.h" #include "setjmp.h" #include "value.h" +#include "regcache.h" /* Size of an instruction */ #define BYTES_PER_88K_INSN 4 diff --git a/gdb/mac-nat.c b/gdb/mac-nat.c index 864fcabaf20..12fdb299447 100644 --- a/gdb/mac-nat.c +++ b/gdb/mac-nat.c @@ -1,5 +1,5 @@ /* Target-vector operations for controlling Mac applications, for GDB. - Copyright (C) 1995 Free Software Foundation, Inc. + Copyright 1995, 2001 Free Software Foundation, Inc. Written by Stan Shebs. Contributed by Cygnus Support. This file is part of GDB. @@ -36,6 +36,7 @@ #include "gdb_string.h" #include "gdbthread.h" #include "gdbcmd.h" +#include "regcache.h" #include diff --git a/gdb/mcore-rom.c b/gdb/mcore-rom.c index 7470cb8dc15..1be7842df9d 100644 --- a/gdb/mcore-rom.c +++ b/gdb/mcore-rom.c @@ -1,6 +1,6 @@ /* Remote debugging interface to Motorola picobug monitor for gdb, the GNU debugger. - Copyright 1999 Free Software Foundation, Inc. + Copyright 1999, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -24,6 +24,7 @@ #include "target.h" #include "monitor.h" #include "gdb_string.h" +#include "regcache.h" /* Functions used only in this file. */ diff --git a/gdb/mcore-tdep.c b/gdb/mcore-tdep.c index c99a2de34f7..d7678e3d663 100644 --- a/gdb/mcore-tdep.c +++ b/gdb/mcore-tdep.c @@ -1,5 +1,5 @@ /* Target-machine dependent code for Motorola MCore for GDB, the GNU debugger - Copyright (C) 1999 Free Software Foundation, Inc. + Copyright 1999, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -22,6 +22,7 @@ #include "symtab.h" #include "value.h" #include "gdbcmd.h" +#include "regcache.h" /* Functions declared and used only in this file */ diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index 1472039ba3f..5851d710289 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -1,5 +1,5 @@ /* MI Command Set. - Copyright (C) 2000, Free Software Foundation, Inc. + Copyright 2000, 2001 Free Software Foundation, Inc. Contributed by Cygnus Solutions (a Red Hat company). This file is part of GDB. @@ -37,6 +37,7 @@ #include "event-top.h" #include "gdbcore.h" /* for write_memory() */ #include "value.h" /* for write_register_bytes() */ +#include "regcache.h" #include #include diff --git a/gdb/mips-nat.c b/gdb/mips-nat.c index cf8a31a837c..895db11793b 100644 --- a/gdb/mips-nat.c +++ b/gdb/mips-nat.c @@ -1,5 +1,6 @@ /* Low level DECstation interface to ptrace, for GDB when running native. - Copyright 1988, 1989, 1991, 1992, 1995 Free Software Foundation, Inc. + Copyright 1988, 1989, 1991, 1992, 1995, 2001 Free Software + Foundation, Inc. Contributed by Alessandro Forin(af@cs.cmu.edu) at CMU and by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin. @@ -23,6 +24,7 @@ #include "defs.h" #include "inferior.h" #include "gdbcore.h" +#include "regcache.h" #include #include #include diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 569d0769560..034a71ff67f 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -37,6 +37,7 @@ #include "gdbtypes.h" #include "target.h" #include "arch-utils.h" +#include "regcache.h" #include "opcode/mips.h" #include "elf/mips.h" diff --git a/gdb/mipsm3-nat.c b/gdb/mipsm3-nat.c index ba43b8d9097..b1abf1530d0 100644 --- a/gdb/mipsm3-nat.c +++ b/gdb/mipsm3-nat.c @@ -1,5 +1,5 @@ /* Definitions to make GDB run on a mips box under Mach 3.0 - Copyright (C) 1992 Free Software Foundation, Inc. + Copyright (C) 1992, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -26,6 +26,7 @@ #include "defs.h" #include "inferior.h" +#include "regcache.h" #include diff --git a/gdb/mipsv4-nat.c b/gdb/mipsv4-nat.c index cca40065705..702835555f9 100644 --- a/gdb/mipsv4-nat.c +++ b/gdb/mipsv4-nat.c @@ -1,5 +1,5 @@ /* Native support for MIPS running SVR4, for GDB. - Copyright 1994, 1995 Free Software Foundation, Inc. + Copyright 1994, 1995, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -22,6 +22,7 @@ #include "inferior.h" #include "gdbcore.h" #include "target.h" +#include "regcache.h" #include #include diff --git a/gdb/mn10200-tdep.c b/gdb/mn10200-tdep.c index 59cf2380469..d58c8e5fe30 100644 --- a/gdb/mn10200-tdep.c +++ b/gdb/mn10200-tdep.c @@ -1,5 +1,5 @@ /* Target-dependent code for the Matsushita MN10200 for GDB, the GNU debugger. - Copyright 1997 Free Software Foundation, Inc. + Copyright 1997, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -28,6 +28,7 @@ #include "gdb_string.h" #include "gdbcore.h" #include "symfile.h" +#include "regcache.h" /* Should call_function allocate stack space for a struct return? */ diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c index 0e03810d51d..444df210dc4 100644 --- a/gdb/mn10300-tdep.c +++ b/gdb/mn10300-tdep.c @@ -29,6 +29,7 @@ #include "gdb_string.h" #include "gdbcore.h" #include "symfile.h" +#include "regcache.h" extern void _initialize_mn10300_tdep (void); static CORE_ADDR mn10300_analyze_prologue (struct frame_info *fi, diff --git a/gdb/monitor.c b/gdb/monitor.c index 7e3580e1b11..d2b02464e19 100644 --- a/gdb/monitor.c +++ b/gdb/monitor.c @@ -51,6 +51,7 @@ #include "inferior.h" #include "gdb_regex.h" #include "srec.h" +#include "regcache.h" static char *dev_name; static struct target_ops *targ_ops; diff --git a/gdb/ns32km3-nat.c b/gdb/ns32km3-nat.c index 23d3a826fbc..89b988e65c3 100644 --- a/gdb/ns32km3-nat.c +++ b/gdb/ns32km3-nat.c @@ -1,5 +1,5 @@ /* Low level interface to ns532 running mach 3.0. - Copyright (C) 1992 Free Software Foundation, Inc. + Copyright 1992, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -20,6 +20,7 @@ #include "defs.h" #include "inferior.h" +#include "regcache.h" #include diff --git a/gdb/ns32knbsd-nat.c b/gdb/ns32knbsd-nat.c index 460f78e9d0d..e1efdacbcd1 100644 --- a/gdb/ns32knbsd-nat.c +++ b/gdb/ns32knbsd-nat.c @@ -1,5 +1,6 @@ /* Functions specific to running gdb native on an ns32k running NetBSD - Copyright 1989, 1992, 1993, 1994, 1996 Free Software Foundation, Inc. + Copyright 1989, 1992, 1993, 1994, 1996, 2001 Free Software + Foundation, Inc. This file is part of GDB. @@ -28,6 +29,7 @@ #include "inferior.h" #include "target.h" #include "gdbcore.h" +#include "regcache.h" #define RF(dst, src) \ memcpy(®isters[REGISTER_BYTE(dst)], &src, sizeof(src)) diff --git a/gdb/ocd.c b/gdb/ocd.c index 240bd672f20..42f2bba62ff 100644 --- a/gdb/ocd.c +++ b/gdb/ocd.c @@ -34,6 +34,7 @@ #include #include "serial.h" #include "ocd.h" +#include "regcache.h" /* Prototypes for local functions */ diff --git a/gdb/pa64solib.c b/gdb/pa64solib.c index 45a575b727f..f71d1b1c247 100644 --- a/gdb/pa64solib.c +++ b/gdb/pa64solib.c @@ -1,5 +1,5 @@ /* Handle HP ELF shared libraries for GDB, the GNU Debugger. - Copyright 1999 Free Software Foundation, Inc. + Copyright 1999, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -49,6 +49,7 @@ #include "gdbcmd.h" #include "assert.h" #include "language.h" +#include "regcache.h" #include diff --git a/gdb/ppc-bdm.c b/gdb/ppc-bdm.c index 0be1cfa717c..d38b420a726 100644 --- a/gdb/ppc-bdm.c +++ b/gdb/ppc-bdm.c @@ -35,6 +35,7 @@ #include "serial.h" #include "ocd.h" #include "ppc-tdep.h" +#include "regcache.h" static void bdm_ppc_open (char *name, int from_tty); diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c index d562eca6f60..66e6e831a77 100644 --- a/gdb/ppc-linux-nat.c +++ b/gdb/ppc-linux-nat.c @@ -1,5 +1,6 @@ /* PPC linux native support. - Copyright (C) 1988, 1989, 1991, 1992, 1994, 1996 Free Software Foundation, Inc. + Copyright 1988, 1989, 1991, 1992, 1994, 1996, 2001 Free Software + Foundation, Inc. This file is part of GDB. @@ -21,6 +22,7 @@ #include "frame.h" #include "inferior.h" #include "gdbcore.h" +#include "regcache.h" #include #include diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c index 624d1d7368c..feef7c89bcb 100644 --- a/gdb/ppc-linux-tdep.c +++ b/gdb/ppc-linux-tdep.c @@ -1,6 +1,7 @@ /* Target-dependent code for GDB, the GNU debugger. - Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000 - Free Software Foundation, Inc. + + Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, + 1997, 2000, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -28,6 +29,7 @@ #include "gdbcmd.h" #include "symfile.h" #include "objfiles.h" +#include "regcache.h" #include "ppc-tdep.h" diff --git a/gdb/ppcbug-rom.c b/gdb/ppcbug-rom.c index 16a7f9dd2b2..edeacb8b09b 100644 --- a/gdb/ppcbug-rom.c +++ b/gdb/ppcbug-rom.c @@ -1,6 +1,6 @@ /* Remote debugging interface for PPCbug (PowerPC) Rom monitor for GDB, the GNU debugger. - Copyright 1995 Free Software Foundation, Inc. + Copyright 1995, 2001 Free Software Foundation, Inc. Written by Stu Grossman of Cygnus Support @@ -26,6 +26,7 @@ #include "target.h" #include "monitor.h" #include "serial.h" +#include "regcache.h" static void ppcbug_supply_register (char *regname, int regnamelen, char *val, int vallen) diff --git a/gdb/ppcnbsd-nat.c b/gdb/ppcnbsd-nat.c index 044115b24f0..49550bba64a 100644 --- a/gdb/ppcnbsd-nat.c +++ b/gdb/ppcnbsd-nat.c @@ -1,5 +1,6 @@ /* Native-dependent code for PowerPC's running NetBSD, for GDB. - Copyright 1988, 1989, 1991, 1992, 1994, 1996, 2000 Free Software Foundation, Inc. + Copyright 1988, 1989, 1991, 1992, 1994, 1996, 2000, 2001 Free + Software Foundation, Inc. This file is part of GDB. @@ -27,6 +28,7 @@ #include "inferior.h" #include "gdbcore.h" #include "ppc-tdep.h" +#include "regcache.h" #define RF(dst, src) \ memcpy(®isters[REGISTER_BYTE(dst)], &src, sizeof(src)) diff --git a/gdb/ptx4-nat.c b/gdb/ptx4-nat.c index af313c06134..66ed8a732b7 100644 --- a/gdb/ptx4-nat.c +++ b/gdb/ptx4-nat.c @@ -1,5 +1,6 @@ /* Native-dependent code for ptx 4.0 - Copyright 1988, 1989, 1991, 1992 Free Software Foundation, Inc. + Copyright 1988, 1989, 1991, 1992, 2001 Free Software Foundation, + Inc. This file is part of GDB. @@ -21,6 +22,7 @@ #include "defs.h" #include "inferior.h" #include "gdbcore.h" +#include "regcache.h" #include #include #include diff --git a/gdb/regcache.c b/gdb/regcache.c index 953892c73f8..49ce169ca24 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -25,6 +25,7 @@ #include "target.h" #include "gdbarch.h" #include "gdbcmd.h" +#include "regcache.h" /* * DATA STRUCTURE @@ -554,6 +555,14 @@ supply_register (int regnum, char *val) /* read_pc, write_pc, read_sp, write_sp, read_fp, write_fp, etc. Special handling for registers PC, SP, and FP. */ +/* NOTE: cagney/2001-02-18: The functions generic_target_read_pc(), + read_pc_pid(), read_pc(), generic_target_write_pc(), + write_pc_pid(), write_pc(), generic_target_read_sp(), read_sp(), + generic_target_write_sp(), write_sp(), generic_target_read_fp(), + read_fp(), generic_target_write_fp(), write_fp will eventually be + moved out of the reg-cache into either frame.[hc] or to the + multi-arch framework. The are not part of the raw register cache. */ + /* This routine is getting awfully cluttered with #if's. It's probably time to turn this into READ_PC and define it in the tm.h file. Ditto for write_pc. diff --git a/gdb/regcache.h b/gdb/regcache.h new file mode 100644 index 00000000000..682156aa612 --- /dev/null +++ b/gdb/regcache.h @@ -0,0 +1,71 @@ +/* Cache and manage the values of registers for GDB, the GNU debugger. + Copyright 1986, 87, 89, 91, 94, 95, 96, 1998, 2000, 2001 + Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef REGCACHE_H +#define REGCACHE_H + +/* Character array containing an image of the inferior programs' + registers. */ + +extern char *registers; + +/* Character array containing the current state of each register + (unavailable<0, valid=0, invalid>0). */ + +extern signed char *register_valid; + +extern int register_cached (int regnum); + +extern void set_register_cached (int regnum, int state); + +extern void register_changed (int regnum); + +extern char *register_buffer (int regnum); + +extern void registers_changed (void); + +extern void registers_fetched (void); + +extern void read_register_bytes (int regbyte, char *myaddr, int len); + +extern void read_register_gen (int regnum, char *myaddr); + +extern void write_register_gen (int regnum, char *myaddr); + +extern void write_register_bytes (int regbyte, char *myaddr, int len); + +/* Rename to read_unsigned_register()? */ +extern ULONGEST read_register (int regnum); + +/* Rename to read_unsigned_register_pid()? */ +extern ULONGEST read_register_pid (int regnum, int pid); + +extern LONGEST read_signed_register (int regnum); + +extern LONGEST read_signed_register_pid (int regnum, int pid); + +extern void write_register (int regnum, LONGEST val); + +extern void write_register_pid (int regnum, CORE_ADDR val, int pid); + +extern void supply_register (int regnum, char *val); + +#endif /* REGCACHE_H */ diff --git a/gdb/remote-adapt.c b/gdb/remote-adapt.c index 9ca6167ce02..9c69a07ab45 100644 --- a/gdb/remote-adapt.c +++ b/gdb/remote-adapt.c @@ -43,6 +43,7 @@ #include "terminal.h" #include "target.h" #include "gdbcore.h" +#include "regcache.h" /* This processor is getting rusty but I am trying to keep it up to date at least with data structure changes. diff --git a/gdb/remote-array.c b/gdb/remote-array.c index 7cb63765474..6ffd30fe500 100644 --- a/gdb/remote-array.c +++ b/gdb/remote-array.c @@ -37,6 +37,7 @@ #include "remote-utils.h" #include "inferior.h" #include "version.h" +#include "regcache.h" extern int baud_rate; diff --git a/gdb/remote-bug.c b/gdb/remote-bug.c index e381ae915cc..8d0f80265d2 100644 --- a/gdb/remote-bug.c +++ b/gdb/remote-bug.c @@ -24,6 +24,7 @@ #include "defs.h" #include "inferior.h" #include "gdb_string.h" +#include "regcache.h" #include #include #include diff --git a/gdb/remote-e7000.c b/gdb/remote-e7000.c index 904ce1f4e54..323ee0db976 100644 --- a/gdb/remote-e7000.c +++ b/gdb/remote-e7000.c @@ -45,6 +45,7 @@ #include "serial.h" #include "remote-utils.h" #include "symfile.h" +#include "regcache.h" #include #include diff --git a/gdb/remote-eb.c b/gdb/remote-eb.c index 7246c909ee4..bcbc230d25b 100644 --- a/gdb/remote-eb.c +++ b/gdb/remote-eb.c @@ -28,6 +28,7 @@ #include "defs.h" #include "gdb_string.h" +#include "regcache.h" #include "inferior.h" #include "bfd.h" diff --git a/gdb/remote-es.c b/gdb/remote-es.c index 764af505ee1..74fbfb19332 100644 --- a/gdb/remote-es.c +++ b/gdb/remote-es.c @@ -109,6 +109,7 @@ #include "remote-utils.h" #include "gdbcore.h" #include "serial.h" +#include "regcache.h" /* Prototypes for local functions */ diff --git a/gdb/remote-est.c b/gdb/remote-est.c index 23d55412133..4a6274f6af9 100644 --- a/gdb/remote-est.c +++ b/gdb/remote-est.c @@ -1,5 +1,5 @@ /* Remote debugging interface for EST-300 ICE, for GDB - Copyright 1995 Free Software Foundation, Inc. + Copyright 1995, 2001 Free Software Foundation, Inc. Contributed by Cygnus Support. Written by Steve Chamberlain for Cygnus Support. @@ -27,6 +27,7 @@ #include "target.h" #include "monitor.h" #include "serial.h" +#include "regcache.h" static void est_open (char *args, int from_tty); diff --git a/gdb/remote-hms.c b/gdb/remote-hms.c index 834f5963dc0..0b402faf63c 100644 --- a/gdb/remote-hms.c +++ b/gdb/remote-hms.c @@ -1,5 +1,5 @@ /* Remote debugging interface for Hitachi HMS Monitor Version 1.0 - Copyright 1995,1999 Free Software Foundation, Inc. + Copyright 1995, 1999, 2001 Free Software Foundation, Inc. Contributed by Cygnus Support. Written by Steve Chamberlain (sac@cygnus.com). @@ -25,6 +25,7 @@ #include "target.h" #include "monitor.h" #include "serial.h" +#include "regcache.h" static void hms_open (char *args, int from_tty); static void diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c index 1dd0fcfb39e..b4d7ad0d658 100644 --- a/gdb/remote-mips.c +++ b/gdb/remote-mips.c @@ -30,6 +30,7 @@ #include "target.h" #include "remote-utils.h" #include "gdb_string.h" +#include "regcache.h" #include #include diff --git a/gdb/remote-mm.c b/gdb/remote-mm.c index f4680317cdb..938f0e8c048 100644 --- a/gdb/remote-mm.c +++ b/gdb/remote-mm.c @@ -41,6 +41,7 @@ #include "terminal.h" #include "minimon.h" #include "target.h" +#include "regcache.h" /* Offset of member MEMBER in a struct of type TYPE. */ #define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER) diff --git a/gdb/remote-nindy.c b/gdb/remote-nindy.c index 7902e0bcdf2..32fd69560e7 100644 --- a/gdb/remote-nindy.c +++ b/gdb/remote-nindy.c @@ -108,6 +108,7 @@ #include "gdbcore.h" #include "command.h" #include "floatformat.h" +#include "regcache.h" #include #include diff --git a/gdb/remote-os9k.c b/gdb/remote-os9k.c index 16b90569560..e9d62103d51 100644 --- a/gdb/remote-os9k.c +++ b/gdb/remote-os9k.c @@ -50,6 +50,7 @@ #include "symfile.h" #include "objfiles.h" #include "gdb-stabs.h" +#include "regcache.h" struct cmd_list_element *showlist; extern struct target_ops rombug_ops; /* Forward declaration */ diff --git a/gdb/remote-rdi.c b/gdb/remote-rdi.c index d97cb65c2c9..4d208e57316 100644 --- a/gdb/remote-rdi.c +++ b/gdb/remote-rdi.c @@ -33,6 +33,7 @@ #include "gdbcore.h" #include "breakpoint.h" #include "completer.h" +#include "regcache.h" #ifdef USG #include diff --git a/gdb/remote-rdp.c b/gdb/remote-rdp.c index 470a82b0276..db8f6f76541 100644 --- a/gdb/remote-rdp.c +++ b/gdb/remote-rdp.c @@ -47,6 +47,7 @@ #include "remote-utils.h" #include "gdb_string.h" #include "gdbcore.h" +#include "regcache.h" #ifdef HAVE_TIME_H #include diff --git a/gdb/remote-sds.c b/gdb/remote-sds.c index f7c364a21d0..08f16e7863e 100644 --- a/gdb/remote-sds.c +++ b/gdb/remote-sds.c @@ -36,6 +36,7 @@ #include "gdb-stabs.h" #include "gdbthread.h" #include "gdbcore.h" +#include "regcache.h" #ifdef USG #include diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c index 81baf52b834..cd746b96b7b 100644 --- a/gdb/remote-sim.c +++ b/gdb/remote-sim.c @@ -36,6 +36,7 @@ #include "remote-sim.h" #include "remote-utils.h" #include "command.h" +#include "regcache.h" /* Prototypes */ diff --git a/gdb/remote-st.c b/gdb/remote-st.c index d688770ffb9..049eaec6442 100644 --- a/gdb/remote-st.c +++ b/gdb/remote-st.c @@ -41,6 +41,7 @@ #include "gdb_string.h" #include #include "serial.h" +#include "regcache.h" extern struct target_ops st2000_ops; /* Forward declaration */ diff --git a/gdb/remote-udi.c b/gdb/remote-udi.c index a741ef76a86..14a7345715f 100644 --- a/gdb/remote-udi.c +++ b/gdb/remote-udi.c @@ -46,6 +46,7 @@ #include "gdbcmd.h" #include "bfd.h" #include "gdbcore.h" /* For download function */ +#include "regcache.h" /* access the register store directly, without going through the normal handler functions. This avoids an extra data copy. */ diff --git a/gdb/remote-utils.c b/gdb/remote-utils.c index e723a5612e1..9efa90095b1 100644 --- a/gdb/remote-utils.c +++ b/gdb/remote-utils.c @@ -1,6 +1,6 @@ /* Generic support for remote debugging interfaces. - Copyright 1993, 1994, 1998 Free Software Foundation, Inc. + Copyright 1993, 1994, 1998, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -50,6 +50,7 @@ #include "gdbcore.h" /* for exec_bfd */ #include "inferior.h" /* for generic_mourn_inferior */ #include "remote-utils.h" +#include "regcache.h" void _initialize_sr_support (void); diff --git a/gdb/remote-vx.c b/gdb/remote-vx.c index f49fa7217db..49bd19fd886 100644 --- a/gdb/remote-vx.c +++ b/gdb/remote-vx.c @@ -32,6 +32,7 @@ #include "symfile.h" #include "objfiles.h" #include "gdb-stabs.h" +#include "regcache.h" #include "gdb_string.h" #include diff --git a/gdb/remote-vx29k.c b/gdb/remote-vx29k.c index 1d5230c689b..798cd088396 100644 --- a/gdb/remote-vx29k.c +++ b/gdb/remote-vx29k.c @@ -30,6 +30,7 @@ #include "command.h" #include "symtab.h" #include "symfile.h" /* for struct complaint */ +#include "regcache.h" #include "gdb_string.h" #include diff --git a/gdb/remote-vx68.c b/gdb/remote-vx68.c index 8dd97f2a165..2ebaa633f77 100644 --- a/gdb/remote-vx68.c +++ b/gdb/remote-vx68.c @@ -31,6 +31,7 @@ #include "command.h" #include "symtab.h" #include "symfile.h" /* for struct complaint */ +#include "regcache.h" #include "gdb_string.h" #include diff --git a/gdb/remote-vx960.c b/gdb/remote-vx960.c index 4a2af5c55f2..08568bc4ca6 100644 --- a/gdb/remote-vx960.c +++ b/gdb/remote-vx960.c @@ -31,6 +31,7 @@ #include "command.h" #include "symtab.h" #include "symfile.h" /* for struct complaint */ +#include "regcache.h" #include "gdb_string.h" #include diff --git a/gdb/remote-vxmips.c b/gdb/remote-vxmips.c index a06edaf0bce..8be4a2f9464 100644 --- a/gdb/remote-vxmips.c +++ b/gdb/remote-vxmips.c @@ -31,6 +31,7 @@ #include "command.h" #include "symtab.h" #include "symfile.h" /* for struct complaint */ +#include "regcache.h" #include "gdb_string.h" #include diff --git a/gdb/remote-vxsparc.c b/gdb/remote-vxsparc.c index b9a1a250a0b..014f1d457ef 100644 --- a/gdb/remote-vxsparc.c +++ b/gdb/remote-vxsparc.c @@ -31,6 +31,7 @@ #include "command.h" #include "symtab.h" #include "symfile.h" /* for struct complaint */ +#include "regcache.h" #include "gdb_string.h" #include diff --git a/gdb/remote.c b/gdb/remote.c index c80fa092294..5e8db0edafd 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -35,6 +35,7 @@ #include "gdb-stabs.h" #include "gdbthread.h" #include "remote.h" +#include "regcache.h" #include #include diff --git a/gdb/rom68k-rom.c b/gdb/rom68k-rom.c index 5bb3a183c23..e6b8b50b4c5 100644 --- a/gdb/rom68k-rom.c +++ b/gdb/rom68k-rom.c @@ -1,5 +1,6 @@ /* Remote target glue for the ROM68K ROM monitor. - Copyright 1988, 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. + Copyright 1988, 1991, 1992, 1993, 1994, 1995, 2001 Free Software + Foundation, Inc. This file is part of GDB. @@ -23,6 +24,7 @@ #include "target.h" #include "monitor.h" #include "serial.h" +#include "regcache.h" static void rom68k_open (char *args, int from_tty); diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c index 18541350342..dc6676d4141 100644 --- a/gdb/rs6000-nat.c +++ b/gdb/rs6000-nat.c @@ -30,6 +30,7 @@ #include "libbfd.h" /* For bfd_cache_lookup (FIXME) */ #include "bfd.h" #include "gdb-stabs.h" +#include "regcache.h" #include #include diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 94d09a62c00..c209e9e50d0 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -30,6 +30,7 @@ #include "symfile.h" #include "objfiles.h" #include "arch-utils.h" +#include "regcache.h" #include "bfd/libbfd.h" /* for bfd_default_set_arch_mach */ #include "coff/internal.h" /* for libcoff.h */ diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c index 032bfe92c15..f24a2bff95b 100644 --- a/gdb/sh-tdep.c +++ b/gdb/sh-tdep.c @@ -38,6 +38,7 @@ #include "gdb_string.h" #include "arch-utils.h" #include "floatformat.h" +#include "regcache.h" #include "solib-svr4.h" diff --git a/gdb/sh3-rom.c b/gdb/sh3-rom.c index a470488c242..989e0fb78ac 100644 --- a/gdb/sh3-rom.c +++ b/gdb/sh3-rom.c @@ -25,6 +25,7 @@ #include "serial.h" #include "srec.h" #include "arch-utils.h" +#include "regcache.h" static serial_t parallel; static int parallel_in_use; diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c index f266902f78e..eea3bfaac2d 100644 --- a/gdb/sol-thread.c +++ b/gdb/sol-thread.c @@ -1,5 +1,6 @@ /* Low level interface for debugging Solaris threads for GDB, the GNU debugger. - Copyright 1996, 1997, 1998, 2000 Free Software Foundation, Inc. + Copyright 1996, 1997, 1998, 2000, 2001 Free Software Foundation, + Inc. This file is part of GDB. @@ -58,6 +59,7 @@ #include #include "gdbcmd.h" #include "gdbcore.h" +#include "regcache.h" extern struct target_ops sol_thread_ops; /* Forward declaration */ extern struct target_ops sol_core_ops; /* Forward declaration */ diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c index 1c451f39f42..8ef307f3f7b 100644 --- a/gdb/solib-svr4.c +++ b/gdb/solib-svr4.c @@ -21,6 +21,7 @@ #define _SYSCALL32 /* for Sparc64 cross Sparc32 */ #include "defs.h" +#include "regcache.h" #include diff --git a/gdb/somsolib.c b/gdb/somsolib.c index 8bb3e79e950..2887fbbac05 100644 --- a/gdb/somsolib.c +++ b/gdb/somsolib.c @@ -39,6 +39,7 @@ #include "gdbcmd.h" #include "assert.h" #include "language.h" +#include "regcache.h" #include diff --git a/gdb/sparc-nat.c b/gdb/sparc-nat.c index 143b3688258..ed47b8e42b7 100644 --- a/gdb/sparc-nat.c +++ b/gdb/sparc-nat.c @@ -1,5 +1,6 @@ /* Functions specific to running gdb native on a SPARC running SunOS4. - Copyright 1989, 1992, 1993, 1994, 1996 Free Software Foundation, Inc. + Copyright 1989, 1992, 1993, 1994, 1996, 2001 Free Software + Foundation, Inc. This file is part of GDB. @@ -22,6 +23,8 @@ #include "inferior.h" #include "target.h" #include "gdbcore.h" +#include "sparc-nat.c" +#include "regcache.h" #include #include diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c index e30ebb54cdc..4b1cfdc8a65 100644 --- a/gdb/sparc-tdep.c +++ b/gdb/sparc-tdep.c @@ -30,6 +30,7 @@ #include "value.h" #include "bfd.h" #include "gdb_string.h" +#include "regcache.h" #ifdef USE_PROC_FS #include diff --git a/gdb/sparcl-tdep.c b/gdb/sparcl-tdep.c index 59f710cc883..635eafe4794 100644 --- a/gdb/sparcl-tdep.c +++ b/gdb/sparcl-tdep.c @@ -23,6 +23,7 @@ #include "breakpoint.h" #include "target.h" #include "serial.h" +#include "regcache.h" #include #if (!defined(__GO32__) && !defined(_WIN32)) || defined(__CYGWIN32__) diff --git a/gdb/sparclet-rom.c b/gdb/sparclet-rom.c index 921c6a53f08..5dcdd3c98f5 100644 --- a/gdb/sparclet-rom.c +++ b/gdb/sparclet-rom.c @@ -1,5 +1,5 @@ /* Remote target glue for the SPARC Sparclet ROM monitor. - Copyright 1995, 1996 Free Software Foundation, Inc. + Copyright 1995, 1996, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -27,6 +27,7 @@ #include "srec.h" #include "symtab.h" #include "symfile.h" /* for generic_load */ +#include "regcache.h" #include extern void report_transfer_performance (unsigned long, time_t, time_t); diff --git a/gdb/sun3-nat.c b/gdb/sun3-nat.c index 8e27e64d60d..8891e79949a 100644 --- a/gdb/sun3-nat.c +++ b/gdb/sun3-nat.c @@ -1,5 +1,6 @@ /* Host-dependent code for Sun-3 for GDB, the GNU debugger. - Copyright 1986, 1987, 1989, 1991, 1992 Free Software Foundation, Inc. + Copyright 1986, 1987, 1989, 1991, 1992, 2001 Free Software + Foundation, Inc. This file is part of GDB. @@ -21,6 +22,7 @@ #include "defs.h" #include "inferior.h" #include "gdbcore.h" +#include "regcache.h" #include #define KERNEL /* To get floating point reg definitions */ diff --git a/gdb/sun386-nat.c b/gdb/sun386-nat.c index 326084e26ba..939d3af02cd 100644 --- a/gdb/sun386-nat.c +++ b/gdb/sun386-nat.c @@ -1,5 +1,6 @@ /* Native support for Sun 386i's for GDB, the GNU debugger. - Copyright (C) 1986, 1987, 1989, 1991, 1992 Free Software Foundation, Inc. + Copyright 1986, 1987, 1989, 1991, 1992, 2001 Free Software + Foundation, Inc. Changes for sun386i by Jean Daniel Fekete (jdf@litp.univ-p6-7.fr), C2V Paris, April 89. @@ -24,6 +25,7 @@ #include "frame.h" #include "inferior.h" #include "gdbcore.h" +#include "regcache.h" #include #include diff --git a/gdb/symm-nat.c b/gdb/symm-nat.c index 144c111a9cf..67541db9368 100644 --- a/gdb/symm-nat.c +++ b/gdb/symm-nat.c @@ -27,6 +27,7 @@ #include "inferior.h" #include "symtab.h" #include "target.h" +#include "regcache.h" /* FIXME: What is the _INKERNEL define for? */ #define _INKERNEL diff --git a/gdb/target.c b/gdb/target.c index ba4ddc2fce0..ec4162bc2d0 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -33,6 +33,7 @@ #include "gdb_wait.h" #include "dcache.h" #include +#include "regcache.h" extern int errno; diff --git a/gdb/thread-db.c b/gdb/thread-db.c index f425bf489e5..70283d07963 100644 --- a/gdb/thread-db.c +++ b/gdb/thread-db.c @@ -1,5 +1,5 @@ /* libthread_db assisted debugging support, generic parts. - Copyright 1999, 2000 Free Software Foundation, Inc. + Copyright 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -31,6 +31,7 @@ #include "symfile.h" #include "objfiles.h" #include "target.h" +#include "regcache.h" #ifndef LIBTHREAD_DB_SO #define LIBTHREAD_DB_SO "libthread_db.so.1" diff --git a/gdb/thread.c b/gdb/thread.c index eeeca495530..4282a4889aa 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -31,6 +31,7 @@ #include "gdbthread.h" #include "command.h" #include "gdbcmd.h" +#include "regcache.h" #include #include diff --git a/gdb/tic80-tdep.c b/gdb/tic80-tdep.c index 2ea2d44e7b4..f1686244604 100644 --- a/gdb/tic80-tdep.c +++ b/gdb/tic80-tdep.c @@ -1,5 +1,5 @@ /* Target-dependent code for the TI TMS320C80 (MVP) for GDB, the GNU debugger. - Copyright 1996, Free Software Foundation, Inc. + Copyright 1996, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -28,6 +28,7 @@ #include "gdb_string.h" #include "gdbcore.h" #include "symfile.h" +#include "regcache.h" /* Function: frame_find_saved_regs Return the frame_saved_regs structure for the frame. diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index a1feb18fc2e..b8598e717de 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -1,5 +1,5 @@ /* Tracing functionality for remote targets in custom GDB protocol - Copyright 1997, 1998 Free Software Foundation, Inc. + Copyright 1997, 1998, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -33,6 +33,7 @@ #include "remote.h" #include "linespec.h" #include "completer.h" +#include "regcache.h" #include "ax.h" #include "ax-gdb.h" diff --git a/gdb/ultra3-nat.c b/gdb/ultra3-nat.c index 02ff8ec3ff3..f8d8f33e04c 100644 --- a/gdb/ultra3-nat.c +++ b/gdb/ultra3-nat.c @@ -1,5 +1,6 @@ /* Native-dependent code for GDB, for NYU Ultra3 running Sym1 OS. - Copyright (C) 1988, 1989, 1991, 1992 Free Software Foundation, Inc. + Copyright 1988, 1989, 1991, 1992, 2001 Free Software Foundation, + Inc. Contributed by David Wood (wood@nyu.edu) at New York University. This file is part of GDB. @@ -25,6 +26,7 @@ #include "inferior.h" #include "symtab.h" #include "value.h" +#include "regcache.h" #include #include diff --git a/gdb/umax-xdep.c b/gdb/umax-xdep.c index 84431fe47a5..f7c5bd38faf 100644 --- a/gdb/umax-xdep.c +++ b/gdb/umax-xdep.c @@ -1,5 +1,6 @@ /* umax host stuff. - Copyright (C) 1986, 1987, 1989, 1991 Free Software Foundation, Inc. + Copyright 1986, 1987, 1989, 1991, 2001 Free Software Foundation, + Inc. This file is part of GDB. @@ -21,6 +22,7 @@ #include "defs.h" #include "frame.h" #include "inferior.h" +#include "regcache.h" #include #include diff --git a/gdb/uw-thread.c b/gdb/uw-thread.c index 17e98fd3d62..a3b98a4780f 100644 --- a/gdb/uw-thread.c +++ b/gdb/uw-thread.c @@ -1,7 +1,7 @@ /* Low level interface for debugging UnixWare user-mode threads for GDB, the GNU debugger. - Copyright 1999, 2000 Free Software Foundation, Inc. + Copyright 1999, 2000, 2001 Free Software Foundation, Inc. Written by Nick Duffek . This file is part of GDB. @@ -101,6 +101,7 @@ #include "gdbthread.h" #include "target.h" #include "inferior.h" +#include "regcache.h" #include /* includes , which requires boolean_t from diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c index 6e107404ddc..4ada8b0316d 100644 --- a/gdb/v850-tdep.c +++ b/gdb/v850-tdep.c @@ -29,6 +29,7 @@ #include "gdbcore.h" #include "symfile.h" #include "arch-utils.h" +#include "regcache.h" static char *v850_generic_reg_names[] = REGISTER_NAMES; diff --git a/gdb/v850ice.c b/gdb/v850ice.c index 897313894c6..8f65de3d558 100644 --- a/gdb/v850ice.c +++ b/gdb/v850ice.c @@ -1,5 +1,5 @@ /* ICE interface for the NEC V850 for GDB, the GNU debugger. - Copyright 1996, 2000 Free Software Foundation, Inc. + Copyright 1996, 2000, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -30,6 +30,7 @@ #include "gdbcore.h" #include "value.h" #include "command.h" +#include "regcache.h" #include #include diff --git a/gdb/valops.c b/gdb/valops.c index ce15c2007eb..c093d5396ac 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -1,6 +1,6 @@ /* Perform non-arithmetic operations on values, for GDB. - Copyright 1986, 87, 89, 91, 92, 93, 94, 95, 96, 97, 1998 - Free Software Foundation, Inc. + Copyright 1986, 87, 89, 91, 92, 93, 94, 95, 96, 97, 1998, 2001 Free + Software Foundation, Inc. This file is part of GDB. @@ -30,6 +30,7 @@ #include "demangle.h" #include "language.h" #include "gdbcmd.h" +#include "regcache.h" #include #include "gdb_string.h" diff --git a/gdb/value.h b/gdb/value.h index c586e82e990..d83e0c8bcdc 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -465,40 +465,6 @@ extern void release_value (value_ptr val); extern int record_latest_value (value_ptr val); -extern void registers_changed (void); - -extern void read_register_bytes (int regbyte, char *myaddr, int len); - -extern void write_register_bytes (int regbyte, char *myaddr, int len); - -extern void read_register_gen (int regnum, char *myaddr); - -extern void write_register_gen (int regnum, char *myaddr); - -/* Rename to read_unsigned_register()? */ -extern ULONGEST read_register (int regnum); - -extern LONGEST read_signed_register (int regnum); - -/* Rename to read_unsigned_register_pid()? */ -extern ULONGEST read_register_pid (int regnum, int pid); - -extern LONGEST read_signed_register_pid (int regnum, int pid); - -extern void write_register (int regnum, LONGEST val); - -extern void write_register_pid (int regnum, CORE_ADDR val, int pid); - -extern void supply_register (int regnum, char *val); - -extern int register_cached (int regnum); - -extern void set_register_cached (int regnum, int state); - -extern void register_changed (int regnum); - -extern char *register_buffer (int regnum); - extern void modify_field (char *addr, LONGEST fieldval, int bitpos, int bitsize); diff --git a/gdb/w65-tdep.c b/gdb/w65-tdep.c index 3f76cf5de66..bf7146740a8 100644 --- a/gdb/w65-tdep.c +++ b/gdb/w65-tdep.c @@ -1,5 +1,5 @@ /* Target-machine dependent code for WDC-65816, for GDB. - Copyright (C) 1995 Free Software Foundation, Inc. + Copyright 1995, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -31,6 +31,7 @@ #include "gdbtypes.h" #include "dis-asm.h" #include "gdbcore.h" +#include "regcache.h" /* Return the saved PC from this frame. */ diff --git a/gdb/w89k-rom.c b/gdb/w89k-rom.c index e33a3c5ff1f..0829815ba90 100644 --- a/gdb/w89k-rom.c +++ b/gdb/w89k-rom.c @@ -1,7 +1,7 @@ /* Remote target glue for the WinBond ROM monitor running on the "Cougar" W89k eval board. - Copyright 1995 Free Software Foundation, Inc. + Copyright 1995, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -26,6 +26,7 @@ #include "monitor.h" #include "serial.h" #include "xmodem.h" +#include "regcache.h" static void w89k_open (char *args, int from_tty); diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c index 71e10e952bf..67d1728ba89 100644 --- a/gdb/win32-nat.c +++ b/gdb/win32-nat.c @@ -1,5 +1,6 @@ /* Target-vector operations for controlling win32 child processes, for GDB. - Copyright 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software + Foundation, Inc. Contributed by Cygnus Solutions, A Red Hat Company. This file is part of GDB. @@ -17,8 +18,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. - */ + Boston, MA 02111-1307, USA. */ /* by Steve Chamberlain, sac@cygnus.com */ @@ -31,6 +31,7 @@ #include "gdbcore.h" #include "command.h" #include "completer.h" +#include "regcache.h" #include #include #include diff --git a/gdb/wince.c b/gdb/wince.c index bcbe212dab7..3b4f67cb3ee 100644 --- a/gdb/wince.c +++ b/gdb/wince.c @@ -55,6 +55,7 @@ #include #include "wince-stub.h" #include +#include "regcache.h" /* The ui's event loop. */ extern int (*ui_loop_hook) (int signo); diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 71e10e952bf..67d1728ba89 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -1,5 +1,6 @@ /* Target-vector operations for controlling win32 child processes, for GDB. - Copyright 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software + Foundation, Inc. Contributed by Cygnus Solutions, A Red Hat Company. This file is part of GDB. @@ -17,8 +18,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. - */ + Boston, MA 02111-1307, USA. */ /* by Steve Chamberlain, sac@cygnus.com */ @@ -31,6 +31,7 @@ #include "gdbcore.h" #include "command.h" #include "completer.h" +#include "regcache.h" #include #include #include diff --git a/gdb/z8k-tdep.c b/gdb/z8k-tdep.c index 98eb22f92e4..4b6d8e25c44 100644 --- a/gdb/z8k-tdep.c +++ b/gdb/z8k-tdep.c @@ -1,5 +1,5 @@ /* Target-machine dependent code for Zilog Z8000, for GDB. - Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. + Copyright (C) 1992, 1993, 1994, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -31,6 +31,7 @@ #include "gdbtypes.h" #include "dis-asm.h" #include "gdbcore.h" +#include "regcache.h" #include "value.h" /* For read_register() */