This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] The birth of regcache.h
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: [PATCH] The birth of regcache.h
- From: Fernando Nasser <fnasser at cygnus dot com>
- Date: Tue, 12 Sep 2000 12:57:13 +0000
- Organization: Red Hat Canada Ltd. - Toronto
This message is from Steven Johnson <sbjohnson@ozemail.com.au>
His e-mail is having some problems so I am posting this for him.
Here it goes:
----------------------------------------------------------------------------
I have finished creating regcache.h see below:
2000-09-12 Steven Johnson <sbjohnson@ozemail.com.au>
* regcache.h : New header. Collates definitions that used to be
scattered throughout GDB.
* defs.h, gdbcore.h, inferior.h, value.h
: removed previous definitions that now belong in regcache.h
* a29k-tdep.c, a68v-nat.c, alpha-nat.c, alpha-tdep.c,
alphabsd-nat.c,
arc-tdep.c, arm-linux-nat.c, arm-linux-tdep.c, arm-tdep.c,
blockframe.c, breakpoint.c, core-aout.c, corelow.c,
cxux-nat.c, d10v-tdep.c, d30v-tdep.c, dink32-rom.c,
dve3900-rom.c, findvar.c, frame.h, gdbarch.c,
gdbtk/generic/gdbtk-cmds.c, go32-nat.c, h8300-tdep.c,
h8500-tdep.c, hp300ux-nat.c, hppa-tdep.c, hpux-thread.c,
i386-linux-nat.c, i386-linux-tdep.c, i386-tdep.c,
i386gnu-nat.c, i386ly-tdep.c, i386nbsd-nat.c, i387-nat.c,
i387-tdep.c, i960-tdep.c, ia64-linux-nat.c, ia64-tdep.c,
infcmd.c, infrun.c, irix5-nat.c, lin-lwp.c, lin-thread.c,
linux-thread.c, lynx-nat.c, m3-nat.c, m32r-rom.c, m32r-tdep.c,
m68hc11-tdep.c, m68k-tdep.c, m68klinux-nat.c, m88k-tdep.c,
mac-nat.c, mcore-tdep.c, mi-main.c, mips-tdep.c,
mn10200-tdep.c, mn10300-tdep.c, mon960-rom.c, monitor.c,
ns32knbsd-nat.c, ocd.c, pa64solib.c, ppc-bdm.c,
ppc-linux-tdep.c, regcache.c, remote-adapt.c, remote-array.c,
remote-bug.c, remote-e7000.c, remote-eb.c, remote-mips.c,
remote-mm.c, remote-nindy.c, remote-os9k.c, remote-rdi.c,
remote-rdp.c, remote-sds.c, remote-sim.c, remote-st.c,
remote-udi.c, remote-utils.c, remote-vx.c, remote-vx29k.c,
remote.c, rs6000-nat.c, rs6000-tdep.c, sh-tdep.c, solib.c,
somsolib.c, sparc-tdep.c, sparcl-tdep.c, symfile.c, symtab.c,
target.c, thread-db.c, thread.c, tic80-tdep.c, tracepoint.c,
umax-xdep.c, uw-thread.c, v850-tdep.c, v850ice.c, valops.c,
w65-tdep.c, win32-nat.c, wince.c, z8k-tdep.c
: added include of regcache.h to track new header creation.
And the patch for it is here:
diff -C2 -r -b -N ../gdb_cvs/src/gdb/a29k-tdep.c src/gdb/a29k-tdep.c
*** ../gdb_cvs/src/gdb/a29k-tdep.c Thu Aug 31 20:46:37 2000
--- src/gdb/a29k-tdep.c Sat Sep 9 21:09:20 2000
***************
*** 28,31 ****
--- 28,32 ----
#include "inferior.h"
#include "gdbcmd.h"
+ #include "regcache.h"
/* If all these bits in an instruction word are zero, it is a "tag word"
diff -C2 -r -b -N ../gdb_cvs/src/gdb/a68v-nat.c src/gdb/a68v-nat.c
*** ../gdb_cvs/src/gdb/a68v-nat.c Thu Aug 31 20:46:37 2000
--- src/gdb/a68v-nat.c Fri Sep 8 23:01:11 2000
***************
*** 27,30 ****
--- 27,31 ----
#include <ptrace.h>
+ #include "regcache.h"
extern int errno;
diff -C2 -r -b -N ../gdb_cvs/src/gdb/alpha-nat.c src/gdb/alpha-nat.c
*** ../gdb_cvs/src/gdb/alpha-nat.c Thu Aug 31 20:46:37 2000
--- src/gdb/alpha-nat.c Mon Sep 11 22:48:33 2000
***************
*** 23,26 ****
--- 23,28 ----
#include "gdbcore.h"
#include "target.h"
+ #include "regcache.h"
+
#include <sys/ptrace.h>
#ifdef __linux__
diff -C2 -r -b -N ../gdb_cvs/src/gdb/alpha-tdep.c src/gdb/alpha-tdep.c
*** ../gdb_cvs/src/gdb/alpha-tdep.c Thu Aug 31 20:46:38 2000
--- src/gdb/alpha-tdep.c Sat Sep 9 21:17:32 2000
***************
*** 30,33 ****
--- 30,34 ----
#include "objfiles.h"
#include "gdb_string.h"
+ #include "regcache.h"
/* FIXME: Some of this code should perhaps be merged with mips-tdep.c. */
diff -C2 -r -b -N ../gdb_cvs/src/gdb/alphabsd-nat.c src/gdb/alphabsd-nat.c
*** ../gdb_cvs/src/gdb/alphabsd-nat.c Sat Jun 3 05:04:51 2000
--- src/gdb/alphabsd-nat.c Mon Sep 11 22:46:23 2000
***************
*** 21,24 ****
--- 21,25 ----
#include "defs.h"
#include "inferior.h"
+ #include "regcache.h"
#include <sys/types.h>
diff -C2 -r -b -N ../gdb_cvs/src/gdb/arc-tdep.c src/gdb/arc-tdep.c
*** ../gdb_cvs/src/gdb/arc-tdep.c Thu Aug 31 20:46:38 2000
--- src/gdb/arc-tdep.c Sat Sep 9 21:09:50 2000
***************
*** 27,30 ****
--- 27,31 ----
#include "symtab.h"
#include "gdbcmd.h"
+ #include "regcache.h"
/* Local functions */
diff -C2 -r -b -N ../gdb_cvs/src/gdb/arm-linux-nat.c src/gdb/arm-linux-nat.c
*** ../gdb_cvs/src/gdb/arm-linux-nat.c Thu Jul 6 12:00:20 2000
--- src/gdb/arm-linux-nat.c Sat Sep 9 21:11:24 2000
***************
*** 23,26 ****
--- 23,27 ----
#include "gdbcore.h"
#include "gdb_string.h"
+ #include "regcache.h"
#include <sys/user.h>
diff -C2 -r -b -N ../gdb_cvs/src/gdb/arm-linux-tdep.c src/gdb/arm-linux-tdep.c
*** ../gdb_cvs/src/gdb/arm-linux-tdep.c Thu Sep 7 20:18:15 2000
--- src/gdb/arm-linux-tdep.c Sat Sep 9 21:24:33 2000
***************
*** 26,29 ****
--- 26,30 ----
#include "gdbcore.h"
#include "frame.h"
+ #include "regcache.h"
/* For arm_linux_skip_solib_resolver. */
diff -C2 -r -b -N ../gdb_cvs/src/gdb/arm-tdep.c src/gdb/arm-tdep.c
*** ../gdb_cvs/src/gdb/arm-tdep.c Thu Sep 7 20:18:16 2000
--- src/gdb/arm-tdep.c Sat Sep 9 21:23:52 2000
***************
*** 30,33 ****
--- 30,34 ----
#include "dis-asm.h" /* For register flavors. */
#include <ctype.h> /* for isupper () */
+ #include "regcache.h"
/* Each OS has a different mechanism for accessing the various
diff -C2 -r -b -N ../gdb_cvs/src/gdb/blockframe.c src/gdb/blockframe.c
*** ../gdb_cvs/src/gdb/blockframe.c Mon Sep 4 22:21:39 2000
--- src/gdb/blockframe.c Sat Sep 9 21:03:20 2000
***************
*** 32,35 ****
--- 32,36 ----
#include "inferior.h" /* for read_pc */
#include "annotate.h"
+ #include "regcache.h"
/* Prototypes for exported functions. */
diff -C2 -r -b -N ../gdb_cvs/src/gdb/breakpoint.c src/gdb/breakpoint.c
*** ../gdb_cvs/src/gdb/breakpoint.c Thu Aug 31 20:46:40 2000
--- src/gdb/breakpoint.c Mon Sep 11 23:00:37 2000
***************
*** 40,43 ****
--- 40,45 ----
#include "symfile.h"
#include "objfiles.h"
+ #include "regcache.h"
+
#ifdef UI_OUT
#include "ui-out.h"
diff -C2 -r -b -N ../gdb_cvs/src/gdb/core-aout.c src/gdb/core-aout.c
*** ../gdb_cvs/src/gdb/core-aout.c Thu Aug 31 20:46:43 2000
--- src/gdb/core-aout.c Mon Sep 11 22:45:19 2000
***************
*** 39,42 ****
--- 39,43 ----
#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. */
diff -C2 -r -b -N ../gdb_cvs/src/gdb/corelow.c src/gdb/corelow.c
*** ../gdb_cvs/src/gdb/corelow.c Mon Sep 4 22:21:39 2000
--- src/gdb/corelow.c Fri Sep 8 23:02:37 2000
***************
*** 33,36 ****
--- 33,37 ----
#include "gdbcore.h"
#include "gdbthread.h"
+ #include "regcache.h"
#ifndef O_BINARY
diff -C2 -r -b -N ../gdb_cvs/src/gdb/cxux-nat.c src/gdb/cxux-nat.c
*** ../gdb_cvs/src/gdb/cxux-nat.c Thu Aug 31 20:46:44 2000
--- src/gdb/cxux-nat.c Sat Sep 9 21:06:59 2000
***************
*** 34,37 ****
--- 34,38 ----
#include "objfiles.h"
#include "symtab.h"
+ #include "regcache.h"
#ifndef USER /* added to support BCS ptrace_user */
diff -C2 -r -b -N ../gdb_cvs/src/gdb/d10v-tdep.c src/gdb/d10v-tdep.c
*** ../gdb_cvs/src/gdb/d10v-tdep.c Mon Sep 4 22:21:40 2000
--- src/gdb/d10v-tdep.c Sat Sep 9 21:15:13 2000
***************
*** 36,39 ****
--- 36,40 ----
#include "language.h"
#include "arch-utils.h"
+ #include "regcache.h"
#include "floatformat.h"
diff -C2 -r -b -N ../gdb_cvs/src/gdb/d30v-tdep.c src/gdb/d30v-tdep.c
*** ../gdb_cvs/src/gdb/d30v-tdep.c Thu Aug 31 20:46:44 2000
--- src/gdb/d30v-tdep.c Fri Sep 8 22:36:25 2000
***************
*** 34,37 ****
--- 34,38 ----
#include "symfile.h"
#include "objfiles.h"
+ #include "regcache.h"
#include "language.h" /* For local_hex_string() */
diff -C2 -r -b -N ../gdb_cvs/src/gdb/defs.h src/gdb/defs.h
*** ../gdb_cvs/src/gdb/defs.h Mon Sep 4 22:21:40 2000
--- src/gdb/defs.h Fri Sep 8 22:11:26 2000
***************
*** 581,587 ****
bfd_signed_vma bss_off);
- /* From findvar.c */
-
- extern int read_relative_register_raw_bytes (int, char *);
/* Possible lvalue types. Like enum language, this should be in
--- 581,584 ----
diff -C2 -r -b -N ../gdb_cvs/src/gdb/dink32-rom.c src/gdb/dink32-rom.c
*** ../gdb_cvs/src/gdb/dink32-rom.c Thu Aug 31 20:46:45 2000
--- src/gdb/dink32-rom.c Mon Sep 11 23:01:15 2000
***************
*** 27,30 ****
--- 27,31 ----
#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 -C2 -r -b -N ../gdb_cvs/src/gdb/dve3900-rom.c src/gdb/dve3900-rom.c
*** ../gdb_cvs/src/gdb/dve3900-rom.c Thu Aug 31 20:46:46 2000
--- src/gdb/dve3900-rom.c Mon Sep 11 22:27:59 2000
***************
*** 29,32 ****
--- 29,33 ----
#include "gdb_string.h"
#include <time.h>
+ #include "regcache.h"
/* Type of function passed to bfd_map_over_sections. */
diff -C2 -r -b -N ../gdb_cvs/src/gdb/findvar.c src/gdb/findvar.c
*** ../gdb_cvs/src/gdb/findvar.c Thu Aug 31 20:46:48 2000
--- src/gdb/findvar.c Fri Sep 8 22:26:41 2000
***************
*** 31,34 ****
--- 31,36 ----
#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
diff -C2 -r -b -N ../gdb_cvs/src/gdb/frame.h src/gdb/frame.h
*** ../gdb_cvs/src/gdb/frame.h Thu Jul 6 12:00:46 2000
--- src/gdb/frame.h Fri Sep 8 22:11:32 2000
***************
*** 240,245 ****
extern void show_frame_info (struct frame_info *, int, int, int);
- extern CORE_ADDR find_saved_register (struct frame_info *, int);
-
extern struct frame_info *block_innermost_frame (struct block *);
--- 240,243 ----
diff -C2 -r -b -N ../gdb_cvs/src/gdb/gdbarch.c src/gdb/gdbarch.c
*** ../gdb_cvs/src/gdb/gdbarch.c Mon Sep 4 22:21:45 2000
--- src/gdb/gdbarch.c Tue Sep 12 21:08:36 2000
***************
*** 60,63 ****
--- 60,65 ----
#include "floatformat.h"
+
+ #include "regcache.h"
/* Static function declarations */
diff -C2 -r -b -N ../gdb_cvs/src/gdb/gdbcore.h src/gdb/gdbcore.h
*** ../gdb_cvs/src/gdb/gdbcore.h Thu Jul 6 12:01:06 2000
--- src/gdb/gdbcore.h Fri Sep 8 22:11:22 2000
***************
*** 107,112 ****
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;
--- 107,110 ----
diff -C2 -r -b -N ../gdb_cvs/src/gdb/gdbtk/generic/gdbtk-cmds.c
src/gdb/gdbtk/generic/gdbtk-cmds.c
*** ../gdb_cvs/src/gdb/gdbtk/generic/gdbtk-cmds.c Thu Aug 31 20:47:30 2000
--- src/gdb/gdbtk/generic/gdbtk-cmds.c Sat Sep 9 21:36:10 2000
***************
*** 38,41 ****
--- 38,42 ----
#include "frame.h"
#include "tui/tui-file.h"
+ #include "regcache.h"
#include <sys/stat.h>
diff -C2 -r -b -N ../gdb_cvs/src/gdb/go32-nat.c src/gdb/go32-nat.c
*** ../gdb_cvs/src/gdb/go32-nat.c Thu Aug 31 20:46:51 2000
--- src/gdb/go32-nat.c Mon Sep 11 22:50:20 2000
***************
*** 29,32 ****
--- 29,33 ----
#include "floatformat.h"
#include "buildsym.h"
+ #include "regcache.h"
#include <stdio.h> /* required for __DJGPP_MINOR__ */
diff -C2 -r -b -N ../gdb_cvs/src/gdb/h8300-tdep.c src/gdb/h8300-tdep.c
*** ../gdb_cvs/src/gdb/h8300-tdep.c Thu Aug 31 20:46:51 2000
--- src/gdb/h8300-tdep.c Fri Sep 8 22:40:24 2000
***************
*** 34,37 ****
--- 34,38 ----
#include "gdb_string.h"
#include "value.h"
+ #include "regcache.h"
extern int h8300hmode, h8300smode;
diff -C2 -r -b -N ../gdb_cvs/src/gdb/h8500-tdep.c src/gdb/h8500-tdep.c
*** ../gdb_cvs/src/gdb/h8500-tdep.c Thu Aug 31 20:46:52 2000
--- src/gdb/h8500-tdep.c Fri Sep 8 22:33:36 2000
***************
*** 33,36 ****
--- 33,37 ----
#include "dis-asm.h"
#include "gdbcore.h"
+ #include "regcache.h"
#define UNSIGNED_SHORT(X) ((X) & 0xffff)
diff -C2 -r -b -N ../gdb_cvs/src/gdb/hp300ux-nat.c src/gdb/hp300ux-nat.c
*** ../gdb_cvs/src/gdb/hp300ux-nat.c Thu Aug 31 20:46:52 2000
--- src/gdb/hp300ux-nat.c Mon Sep 11 22:28:38 2000
***************
*** 22,25 ****
--- 22,26 ----
#include "frame.h"
#include "inferior.h"
+ #include "regcache.h"
/* Defining this means some system include files define some extra stuff. */
diff -C2 -r -b -N ../gdb_cvs/src/gdb/hppa-tdep.c src/gdb/hppa-tdep.c
*** ../gdb_cvs/src/gdb/hppa-tdep.c Mon Sep 4 22:21:46 2000
--- src/gdb/hppa-tdep.c Fri Sep 8 22:39:44 2000
***************
*** 57,60 ****
--- 57,61 ----
#include "symfile.h"
#include "objfiles.h"
+ #include "regcache.h"
/* To support detection of the pseudo-initial frame
diff -C2 -r -b -N ../gdb_cvs/src/gdb/hpux-thread.c src/gdb/hpux-thread.c
*** ../gdb_cvs/src/gdb/hpux-thread.c Thu Sep 7 20:18:16 2000
--- src/gdb/hpux-thread.c Mon Sep 11 22:50:57 2000
***************
*** 43,46 ****
--- 43,47 ----
#include <sys/stat.h>
#include "gdbcore.h"
+ #include "regcache.h"
extern int child_suppress_run;
diff -C2 -r -b -N ../gdb_cvs/src/gdb/i386-linux-nat.c src/gdb/i386-linux-nat.c
*** ../gdb_cvs/src/gdb/i386-linux-nat.c Thu Aug 31 20:46:53 2000
--- src/gdb/i386-linux-nat.c Sat Sep 9 21:28:34 2000
***************
*** 22,25 ****
--- 22,26 ----
#include "inferior.h"
#include "gdbcore.h"
+ #include "regcache.h"
#include <sys/ptrace.h>
diff -C2 -r -b -N ../gdb_cvs/src/gdb/i386-linux-tdep.c src/gdb/i386-linux-tdep.c
*** ../gdb_cvs/src/gdb/i386-linux-tdep.c Thu Aug 31 20:46:54 2000
--- src/gdb/i386-linux-tdep.c Mon Sep 11 22:13:36 2000
***************
*** 28,31 ****
--- 28,32 ----
#include "symfile.h"
#include "objfiles.h"
+ #include "regcache.h"
diff -C2 -r -b -N ../gdb_cvs/src/gdb/i386-tdep.c src/gdb/i386-tdep.c
*** ../gdb_cvs/src/gdb/i386-tdep.c Thu Aug 31 20:46:54 2000
--- src/gdb/i386-tdep.c Sat Sep 9 21:12:27 2000
***************
*** 31,34 ****
--- 31,35 ----
#include "command.h"
#include "arch-utils.h"
+ #include "regcache.h"
static long i386_get_frame_setup (CORE_ADDR);
diff -C2 -r -b -N ../gdb_cvs/src/gdb/i386gnu-nat.c src/gdb/i386gnu-nat.c
*** ../gdb_cvs/src/gdb/i386gnu-nat.c Sat Mar 11 10:34:50 2000
--- src/gdb/i386gnu-nat.c Mon Sep 11 22:49:29 2000
***************
*** 22,25 ****
--- 22,26 ----
#include "inferior.h"
#include "floatformat.h"
+ #include "regcache.h"
#include <assert.h>
diff -C2 -r -b -N ../gdb_cvs/src/gdb/i386ly-tdep.c src/gdb/i386ly-tdep.c
*** ../gdb_cvs/src/gdb/i386ly-tdep.c Thu Aug 31 20:46:54 2000
--- src/gdb/i386ly-tdep.c Mon Sep 11 22:12:47 2000
***************
*** 23,26 ****
--- 23,27 ----
#include "target.h"
#include "gdbcore.h"
+ #include "regcache.h"
/* Return the PC of the caller from the call frame. Assumes the subr prologue
diff -C2 -r -b -N ../gdb_cvs/src/gdb/i386nbsd-nat.c src/gdb/i386nbsd-nat.c
*** ../gdb_cvs/src/gdb/i386nbsd-nat.c Thu Aug 31 20:46:54 2000
--- src/gdb/i386nbsd-nat.c Fri Sep 8 23:00:06 2000
***************
*** 26,30 ****
#include <machine/frame.h>
#include "inferior.h"
! #include "gdbcore.h" /* for registers_fetched() */
#define RF(dst, src) \
--- 26,30 ----
#include <machine/frame.h>
#include "inferior.h"
! #include "regcache.h" /* for registers_fetched() */
#define RF(dst, src) \
diff -C2 -r -b -N ../gdb_cvs/src/gdb/i387-nat.c src/gdb/i387-nat.c
*** ../gdb_cvs/src/gdb/i387-nat.c Thu Aug 31 20:46:55 2000
--- src/gdb/i387-nat.c Mon Sep 11 22:51:25 2000
***************
*** 22,25 ****
--- 22,26 ----
#include "inferior.h"
#include "value.h"
+ #include "regcache.h"
/* FIXME: kettenis/2000-05-21: Right now more than a few i386 targets
diff -C2 -r -b -N ../gdb_cvs/src/gdb/i387-tdep.c src/gdb/i387-tdep.c
*** ../gdb_cvs/src/gdb/i387-tdep.c Thu Aug 31 20:46:55 2000
--- src/gdb/i387-tdep.c Sat Sep 9 21:13:08 2000
***************
*** 26,29 ****
--- 26,30 ----
#include "gdbcore.h"
#include "floatformat.h"
+ #include "regcache.h"
diff -C2 -r -b -N ../gdb_cvs/src/gdb/i960-tdep.c src/gdb/i960-tdep.c
*** ../gdb_cvs/src/gdb/i960-tdep.c Thu Aug 31 20:46:55 2000
--- src/gdb/i960-tdep.c Sat Sep 9 21:18:45 2000
***************
*** 29,32 ****
--- 29,33 ----
#include "gdbcore.h"
#include "inferior.h"
+ #include "regcache.h"
static CORE_ADDR next_insn (CORE_ADDR memaddr,
diff -C2 -r -b -N ../gdb_cvs/src/gdb/ia64-linux-nat.c src/gdb/ia64-linux-nat.c
*** ../gdb_cvs/src/gdb/ia64-linux-nat.c Thu Aug 31 20:46:55 2000
--- src/gdb/ia64-linux-nat.c Mon Sep 11 22:33:36 2000
***************
*** 23,26 ****
--- 23,27 ----
#include "target.h"
#include "gdbcore.h"
+ #include "regcache.h"
#include <signal.h>
diff -C2 -r -b -N ../gdb_cvs/src/gdb/ia64-tdep.c src/gdb/ia64-tdep.c
*** ../gdb_cvs/src/gdb/ia64-tdep.c Thu Sep 7 20:18:26 2000
--- src/gdb/ia64-tdep.c Sat Sep 9 21:19:22 2000
***************
*** 26,29 ****
--- 26,30 ----
#include "arch-utils.h"
#include "floatformat.h"
+ #include "regcache.h"
#include "objfiles.h"
diff -C2 -r -b -N ../gdb_cvs/src/gdb/infcmd.c src/gdb/infcmd.c
*** ../gdb_cvs/src/gdb/infcmd.c Mon Sep 4 22:21:46 2000
--- src/gdb/infcmd.c Fri Sep 8 22:37:48 2000
***************
*** 40,43 ****
--- 40,44 ----
#include "event-top.h"
#include "parser-defs.h"
+ #include "regcache.h"
/* Functions exported for general use: */
diff -C2 -r -b -N ../gdb_cvs/src/gdb/inferior.h src/gdb/inferior.h
*** ../gdb_cvs/src/gdb/inferior.h Thu Aug 31 20:46:55 2000
--- src/gdb/inferior.h Fri Sep 8 22:09:45 2000
***************
*** 112,125 ****
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);
--- 112,115 ----
***************
*** 134,164 ****
extern int run_stack_dummy (CORE_ADDR, char *);
- extern CORE_ADDR read_pc (void);
-
- extern CORE_ADDR read_pc_pid (int);
-
- extern CORE_ADDR generic_target_read_pc (int);
-
- extern void write_pc (CORE_ADDR);
-
- extern void write_pc_pid (CORE_ADDR, int);
-
- extern void generic_target_write_pc (CORE_ADDR, int);
-
- extern CORE_ADDR read_sp (void);
-
extern CORE_ADDR generic_target_read_sp (void);
-
- extern void write_sp (CORE_ADDR);
-
- extern void generic_target_write_sp (CORE_ADDR);
-
- extern CORE_ADDR read_fp (void);
-
- extern CORE_ADDR generic_target_read_fp (void);
-
- extern void write_fp (CORE_ADDR);
-
- extern void generic_target_write_fp (CORE_ADDR);
extern CORE_ADDR unsigned_pointer_to_address (struct type *type, void *buf);
--- 124,128 ----
diff -C2 -r -b -N ../gdb_cvs/src/gdb/infrun.c src/gdb/infrun.c
*** ../gdb_cvs/src/gdb/infrun.c Mon Sep 4 22:21:46 2000
--- src/gdb/infrun.c Fri Sep 8 22:46:49 2000
***************
*** 36,39 ****
--- 36,40 ----
#include <signal.h>
#include "inf-loop.h"
+ #include "regcache.h"
/* Prototypes for local functions */
diff -C2 -r -b -N ../gdb_cvs/src/gdb/irix5-nat.c src/gdb/irix5-nat.c
*** ../gdb_cvs/src/gdb/irix5-nat.c Thu Aug 31 20:46:56 2000
--- src/gdb/irix5-nat.c Mon Sep 11 22:41:49 2000
***************
*** 28,31 ****
--- 28,32 ----
#include "gdbcore.h"
#include "target.h"
+ #include "regcache.h"
#include "gdb_string.h"
diff -C2 -r -b -N ../gdb_cvs/src/gdb/lin-lwp.c src/gdb/lin-lwp.c
*** ../gdb_cvs/src/gdb/lin-lwp.c Mon Sep 4 04:41:28 2000
--- src/gdb/lin-lwp.c Fri Sep 8 22:49:12 2000
***************
*** 30,33 ****
--- 30,34 ----
#include "inferior.h"
#include "target.h"
+ #include "regcache.h"
#define DEBUG 1
diff -C2 -r -b -N ../gdb_cvs/src/gdb/lin-thread.c src/gdb/lin-thread.c
*** ../gdb_cvs/src/gdb/lin-thread.c Mon Sep 4 22:21:48 2000
--- src/gdb/lin-thread.c Mon Sep 11 22:54:56 2000
***************
*** 102,105 ****
--- 102,106 ----
#include "inferior.h"
#include "gdbcmd.h"
+ #include "regcache.h"
#include "gdb_wait.h"
diff -C2 -r -b -N ../gdb_cvs/src/gdb/linux-thread.c src/gdb/linux-thread.c
*** ../gdb_cvs/src/gdb/linux-thread.c Thu Aug 31 20:46:58 2000
--- src/gdb/linux-thread.c Mon Sep 11 22:53:59 2000
***************
*** 61,64 ****
--- 61,65 ----
#include "gdbcmd.h"
#include "breakpoint.h"
+ #include "regcache.h"
#ifndef PT_ATTACH
diff -C2 -r -b -N ../gdb_cvs/src/gdb/lynx-nat.c src/gdb/lynx-nat.c
*** ../gdb_cvs/src/gdb/lynx-nat.c Thu Aug 31 20:46:58 2000
--- src/gdb/lynx-nat.c Sat Sep 9 21:32:44 2000
***************
*** 24,27 ****
--- 24,28 ----
#include "target.h"
#include "gdbcore.h"
+ #include "regcache.h"
#include <sys/ptrace.h>
diff -C2 -r -b -N ../gdb_cvs/src/gdb/m3-nat.c src/gdb/m3-nat.c
*** ../gdb_cvs/src/gdb/m3-nat.c Thu Aug 31 20:46:58 2000
--- src/gdb/m3-nat.c Fri Sep 8 22:53:04 2000
***************
*** 57,60 ****
--- 57,61 ----
#include "gdbcmd.h"
#include "gdbcore.h"
+ #include "regcache.h"
#if 0
diff -C2 -r -b -N ../gdb_cvs/src/gdb/m32r-rom.c src/gdb/m32r-rom.c
*** ../gdb_cvs/src/gdb/m32r-rom.c Thu Aug 31 20:46:58 2000
--- src/gdb/m32r-rom.c Mon Sep 11 23:02:45 2000
***************
*** 37,40 ****
--- 37,41 ----
#include "objfiles.h" /* for ALL_OBJFILES etc. */
#include "inferior.h" /* for write_pc() */
+ #include "regcache.h"
#include <ctype.h>
diff -C2 -r -b -N ../gdb_cvs/src/gdb/m32r-tdep.c src/gdb/m32r-tdep.c
*** ../gdb_cvs/src/gdb/m32r-tdep.c Thu Aug 31 20:46:59 2000
--- src/gdb/m32r-tdep.c Mon Sep 11 22:38:26 2000
***************
*** 29,32 ****
--- 29,33 ----
#include "gdbcore.h"
#include "symfile.h"
+ #include "regcache.h"
/* Function: m32r_use_struct_convention
diff -C2 -r -b -N ../gdb_cvs/src/gdb/m68hc11-tdep.c src/gdb/m68hc11-tdep.c
*** ../gdb_cvs/src/gdb/m68hc11-tdep.c Thu Sep 7 20:18:26 2000
--- src/gdb/m68hc11-tdep.c Sat Sep 9 21:14:07 2000
***************
*** 34,37 ****
--- 34,38 ----
#include "objfiles.h"
#include "arch-utils.h"
+ #include "regcache.h"
#include "target.h"
diff -C2 -r -b -N ../gdb_cvs/src/gdb/m68k-tdep.c src/gdb/m68k-tdep.c
*** ../gdb_cvs/src/gdb/m68k-tdep.c Thu Aug 31 20:47:01 2000
--- src/gdb/m68k-tdep.c Sat Sep 9 21:03:55 2000
***************
*** 27,30 ****
--- 27,32 ----
#include "gdb_string.h"
#include "inferior.h"
+ #include "regcache.h"
+
diff -C2 -r -b -N ../gdb_cvs/src/gdb/m68klinux-nat.c src/gdb/m68klinux-nat.c
*** ../gdb_cvs/src/gdb/m68klinux-nat.c Thu Aug 31 20:47:01 2000
--- src/gdb/m68klinux-nat.c Mon Sep 11 22:15:20 2000
***************
*** 41,44 ****
--- 41,45 ----
#include "floatformat.h"
+ #include "regcache.h"
#include "target.h"
diff -C2 -r -b -N ../gdb_cvs/src/gdb/m88k-tdep.c src/gdb/m88k-tdep.c
*** ../gdb_cvs/src/gdb/m88k-tdep.c Thu Aug 31 20:47:02 2000
--- src/gdb/m88k-tdep.c Mon Sep 11 22:16:18 2000
***************
*** 27,30 ****
--- 27,31 ----
#include "setjmp.h"
#include "value.h"
+ #include "regcache.h"
/* Size of an instruction */
diff -C2 -r -b -N ../gdb_cvs/src/gdb/mac-nat.c src/gdb/mac-nat.c
*** ../gdb_cvs/src/gdb/mac-nat.c Thu Aug 31 20:47:02 2000
--- src/gdb/mac-nat.c Sat Sep 9 21:10:51 2000
***************
*** 37,40 ****
--- 37,41 ----
#include "gdbthread.h"
#include "gdbcmd.h"
+ #include "regcache.h"
#include <Processes.h>
diff -C2 -r -b -N ../gdb_cvs/src/gdb/mcore-tdep.c src/gdb/mcore-tdep.c
*** ../gdb_cvs/src/gdb/mcore-tdep.c Thu Aug 31 20:47:02 2000
--- src/gdb/mcore-tdep.c Sat Sep 9 21:20:15 2000
***************
*** 23,26 ****
--- 23,27 ----
#include "value.h"
#include "gdbcmd.h"
+ #include "regcache.h"
/* Functions declared and used only in this file */
diff -C2 -r -b -N ../gdb_cvs/src/gdb/mi/mi-main.c src/gdb/mi/mi-main.c
*** ../gdb_cvs/src/gdb/mi/mi-main.c Thu Aug 31 20:47:32 2000
--- src/gdb/mi/mi-main.c Fri Sep 8 22:32:52 2000
***************
*** 40,43 ****
--- 40,44 ----
#include <ctype.h>
#include <sys/time.h>
+ #include "regcache.h"
/* Convenience macro for allocting typesafe memory. */
diff -C2 -r -b -N ../gdb_cvs/src/gdb/mips-tdep.c src/gdb/mips-tdep.c
*** ../gdb_cvs/src/gdb/mips-tdep.c Thu Aug 31 20:47:03 2000
--- src/gdb/mips-tdep.c Fri Sep 8 22:30:51 2000
***************
*** 43,46 ****
--- 43,47 ----
#include "elf-bfd.h"
#include "symcat.h"
+ #include "regcache.h"
/* The sizes of floating point registers. */
diff -C2 -r -b -N ../gdb_cvs/src/gdb/mn10200-tdep.c src/gdb/mn10200-tdep.c
*** ../gdb_cvs/src/gdb/mn10200-tdep.c Thu Aug 31 20:47:03 2000
--- src/gdb/mn10200-tdep.c Mon Sep 11 22:17:33 2000
***************
*** 29,33 ****
#include "gdbcore.h"
#include "symfile.h"
!
/* Should call_function allocate stack space for a struct return? */
--- 29,33 ----
#include "gdbcore.h"
#include "symfile.h"
! #include "regcache.h"
/* Should call_function allocate stack space for a struct return? */
diff -C2 -r -b -N ../gdb_cvs/src/gdb/mn10300-tdep.c src/gdb/mn10300-tdep.c
*** ../gdb_cvs/src/gdb/mn10300-tdep.c Thu Aug 31 20:47:03 2000
--- src/gdb/mn10300-tdep.c Fri Sep 8 22:38:45 2000
***************
*** 29,32 ****
--- 29,34 ----
#include "gdbcore.h"
#include "symfile.h"
+ #include "regcache.h"
+
extern void _initialize_mn10300_tdep (void);
diff -C2 -r -b -N ../gdb_cvs/src/gdb/mon960-rom.c src/gdb/mon960-rom.c
*** ../gdb_cvs/src/gdb/mon960-rom.c Thu Aug 31 20:47:03 2000
--- src/gdb/mon960-rom.c Mon Sep 11 23:03:31 2000
***************
*** 30,33 ****
--- 30,34 ----
#include "symfile.h" /* for generic_load */
#include "inferior.h" /* for write_pc() */
+ #include "regcache.h"
#define USE_GENERIC_LOAD
diff -C2 -r -b -N ../gdb_cvs/src/gdb/monitor.c src/gdb/monitor.c
*** ../gdb_cvs/src/gdb/monitor.c Mon Sep 4 22:21:48 2000
--- src/gdb/monitor.c Mon Sep 11 22:18:31 2000
***************
*** 54,57 ****
--- 54,58 ----
#include "dcache.h"
#include "srec.h"
+ #include "regcache.h"
static char *dev_name;
diff -C2 -r -b -N ../gdb_cvs/src/gdb/ns32knbsd-nat.c src/gdb/ns32knbsd-nat.c
*** ../gdb_cvs/src/gdb/ns32knbsd-nat.c Thu Aug 31 20:47:04 2000
--- src/gdb/ns32knbsd-nat.c Fri Sep 8 23:02:08 2000
***************
*** 29,32 ****
--- 29,33 ----
#include "target.h"
#include "gdbcore.h"
+ #include "regcache.h"
#define RF(dst, src) \
diff -C2 -r -b -N ../gdb_cvs/src/gdb/ocd.c src/gdb/ocd.c
*** ../gdb_cvs/src/gdb/ocd.c Mon Sep 4 22:21:48 2000
--- src/gdb/ocd.c Fri Sep 8 22:43:41 2000
***************
*** 37,40 ****
--- 37,41 ----
#include "serial.h"
#include "ocd.h"
+ #include "regcache.h"
/* Prototypes for local functions */
diff -C2 -r -b -N ../gdb_cvs/src/gdb/pa64solib.c src/gdb/pa64solib.c
*** ../gdb_cvs/src/gdb/pa64solib.c Thu Aug 31 20:47:05 2000
--- src/gdb/pa64solib.c Mon Sep 11 22:19:00 2000
***************
*** 50,53 ****
--- 50,54 ----
#include "assert.h"
#include "language.h"
+ #include "regcache.h"
#include <fcntl.h>
diff -C2 -r -b -N ../gdb_cvs/src/gdb/ppc-bdm.c src/gdb/ppc-bdm.c
*** ../gdb_cvs/src/gdb/ppc-bdm.c Thu Aug 31 20:47:05 2000
--- src/gdb/ppc-bdm.c Mon Sep 11 22:43:24 2000
***************
*** 38,41 ****
--- 38,42 ----
#include "ocd.h"
#include "ppc-tdep.h"
+ #include "regcache.h"
static void bdm_ppc_open (char *name, int from_tty);
diff -C2 -r -b -N ../gdb_cvs/src/gdb/ppc-linux-tdep.c src/gdb/ppc-linux-tdep.c
*** ../gdb_cvs/src/gdb/ppc-linux-tdep.c Thu Aug 31 20:47:06 2000
--- src/gdb/ppc-linux-tdep.c Mon Sep 11 22:20:29 2000
***************
*** 29,32 ****
--- 29,33 ----
#include "symfile.h"
#include "objfiles.h"
+ #include "regcache.h"
#include "ppc-tdep.h"
diff -C2 -r -b -N ../gdb_cvs/src/gdb/regcache.c src/gdb/regcache.c
*** ../gdb_cvs/src/gdb/regcache.c Mon Sep 4 22:21:48 2000
--- src/gdb/regcache.c Tue Sep 12 21:04:16 2000
***************
*** 26,29 ****
--- 26,30 ----
#include "gdbarch.h"
#include "gdbcmd.h"
+ #include "regcache.h"
/*
diff -C2 -r -b -N ../gdb_cvs/src/gdb/regcache.h src/gdb/regcache.h
*** ../gdb_cvs/src/gdb/regcache.h Thu Jan 1 10:00:00 1970
--- src/gdb/regcache.h Tue Sep 12 20:54:18 2000
***************
*** 0 ****
--- 1,113 ----
+ /* Definitions for operations in regcache.c, for GDB.
+ Copyright 1986, 1987, 1989, 1992-1996, 2000 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. */
+
+ #if !defined (REGCACHE_H)
+ #define REGCACHE_H 1
+
+ #include "defs.h"
+
+ /* Definitions of register validity states. (As recorded by register_valid) */
+ #define REGISTER_CACHE_UNAVAILABLE (1)
+ #define REGISTER_CACHE_VALID (0)
+ #define REGISTER_CACHE_INVALID (-1)
+
+ /* Character array containing an image of the inferior programs'
+ registers.
+ TODO: Change all direct accesses to registers to calls to appropriate
+ functions, It is poor modularity to access global variables like this
+ directly. As well as prone to stuff ups. */
+
+ extern char *registers;
+
+ /* Character array containing the current state of each register
+ (unavailable<0, valid=0, invalid>0).
+ TODO: Do not extern this, and make accessor functions. */
+
+ extern signed char *register_valid;
+
+ extern int register_cached (int regno);
+
+ extern void register_changed (int regnum);
+
+ extern CORE_ADDR find_saved_register (struct frame_info *, int);
+
+ extern void get_saved_register (char *raw_buffer, int *optimized,
+ CORE_ADDR * addrp,
+ struct frame_info *frame,
+ int regnum, enum lval_type *lval);
+
+ extern int read_relative_register_raw_bytes (int, char *);
+
+ 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 regno, char *myaddr);
+
+ extern void write_register_gen (int regno, char *myaddr);
+
+ extern void write_register_bytes (int regbyte, char *myaddr, int len);
+
+ /* Rename to read_unsigned_register()? */
+ extern ULONGEST read_register (int regno);
+
+ /* Rename to read_unsigned_register_pid()? */
+ extern ULONGEST read_register_pid (int regno, int pid);
+
+ extern LONGEST read_signed_register (int regno);
+
+ extern LONGEST read_signed_register_pid (int regno, int pid);
+
+ extern void write_register (int regno, LONGEST val);
+
+ extern void write_register_pid (int regno, CORE_ADDR val, int pid);
+
+ extern void supply_register (int regno, char *val);
+
+ extern CORE_ADDR generic_target_read_pc (int);
+
+ extern CORE_ADDR read_pc_pid (int);
+
+ extern CORE_ADDR read_pc (void);
+
+ extern void generic_target_write_pc (CORE_ADDR, int);
+
+ extern void write_pc_pid (CORE_ADDR, int);
+
+ extern void write_pc (CORE_ADDR);
+
+ extern void generic_target_write_sp (CORE_ADDR);
+
+ extern CORE_ADDR read_sp (void);
+
+ extern void write_sp (CORE_ADDR);
+
+ extern CORE_ADDR generic_target_read_fp (void);
+
+ extern CORE_ADDR read_fp (void);
+
+ extern void generic_target_write_fp (CORE_ADDR);
+
+ extern void write_fp (CORE_ADDR);
+
+
+ #endif /* !defined (REGCACHE_H) */
diff -C2 -r -b -N ../gdb_cvs/src/gdb/remote-adapt.c src/gdb/remote-adapt.c
*** ../gdb_cvs/src/gdb/remote-adapt.c Mon Sep 4 22:21:48 2000
--- src/gdb/remote-adapt.c Fri Sep 8 22:42:39 2000
***************
*** 45,48 ****
--- 45,49 ----
#include "target.h"
#include "gdbcore.h"
+ #include "regcache.h"
/* This processor is getting rusty but I am trying to keep it
diff -C2 -r -b -N ../gdb_cvs/src/gdb/remote-array.c src/gdb/remote-array.c
*** ../gdb_cvs/src/gdb/remote-array.c Mon Sep 4 22:21:48 2000
--- src/gdb/remote-array.c Fri Sep 8 22:43:09 2000
***************
*** 40,43 ****
--- 40,44 ----
#include "inferior.h"
#include "version.h"
+ #include "regcache.h"
extern int baud_rate;
diff -C2 -r -b -N ../gdb_cvs/src/gdb/remote-bug.c src/gdb/remote-bug.c
*** ../gdb_cvs/src/gdb/remote-bug.c Thu Aug 31 20:47:07 2000
--- src/gdb/remote-bug.c Sat Sep 9 21:27:34 2000
***************
*** 36,39 ****
--- 36,40 ----
#include "gdbcore.h"
#include "gdbcmd.h"
+ #include "regcache.h"
#include "remote-utils.h"
diff -C2 -r -b -N ../gdb_cvs/src/gdb/remote-e7000.c src/gdb/remote-e7000.c
*** ../gdb_cvs/src/gdb/remote-e7000.c Mon Sep 4 22:21:48 2000
--- src/gdb/remote-e7000.c Fri Sep 8 22:45:57 2000
***************
*** 50,53 ****
--- 50,54 ----
#include <time.h>
#include <ctype.h>
+ #include "regcache.h"
diff -C2 -r -b -N ../gdb_cvs/src/gdb/remote-eb.c src/gdb/remote-eb.c
*** ../gdb_cvs/src/gdb/remote-eb.c Mon Sep 4 22:21:48 2000
--- src/gdb/remote-eb.c Fri Sep 8 22:46:25 2000
***************
*** 42,45 ****
--- 42,46 ----
#include "target.h"
#include "gdbcore.h"
+ #include "regcache.h"
extern struct target_ops eb_ops; /* Forward declaration */
diff -C2 -r -b -N ../gdb_cvs/src/gdb/remote-mips.c src/gdb/remote-mips.c
*** ../gdb_cvs/src/gdb/remote-mips.c Mon Sep 4 22:21:49 2000
--- src/gdb/remote-mips.c Fri Sep 8 22:44:58 2000
***************
*** 32,35 ****
--- 32,36 ----
#include "remote-utils.h"
#include "gdb_string.h"
+ #include "regcache.h"
#include <signal.h>
diff -C2 -r -b -N ../gdb_cvs/src/gdb/remote-mm.c src/gdb/remote-mm.c
*** ../gdb_cvs/src/gdb/remote-mm.c Thu Aug 31 20:47:08 2000
--- src/gdb/remote-mm.c Fri Sep 8 22:50:07 2000
***************
*** 43,46 ****
--- 43,47 ----
#include "minimon.h"
#include "target.h"
+ #include "regcache.h"
/* Offset of member MEMBER in a struct of type TYPE. */
diff -C2 -r -b -N ../gdb_cvs/src/gdb/remote-nindy.c src/gdb/remote-nindy.c
*** ../gdb_cvs/src/gdb/remote-nindy.c Thu Aug 31 20:47:08 2000
--- src/gdb/remote-nindy.c Fri Sep 8 23:03:09 2000
***************
*** 119,122 ****
--- 119,123 ----
#include "dcache.h"
#include "remote-utils.h"
+ #include "regcache.h"
static DCACHE *nindy_dcache;
diff -C2 -r -b -N ../gdb_cvs/src/gdb/remote-os9k.c src/gdb/remote-os9k.c
*** ../gdb_cvs/src/gdb/remote-os9k.c Mon Sep 4 22:21:49 2000
--- src/gdb/remote-os9k.c Fri Sep 8 22:52:12 2000
***************
*** 53,56 ****
--- 53,57 ----
#include "objfiles.h"
#include "gdb-stabs.h"
+ #include "regcache.h"
struct cmd_list_element *showlist;
diff -C2 -r -b -N ../gdb_cvs/src/gdb/remote-rdi.c src/gdb/remote-rdi.c
*** ../gdb_cvs/src/gdb/remote-rdi.c Thu Sep 7 20:18:26 2000
--- src/gdb/remote-rdi.c Sat Sep 9 21:10:19 2000
***************
*** 34,37 ****
--- 34,38 ----
#include "gdbcore.h"
#include "breakpoint.h"
+ #include "regcache.h"
#ifdef USG
diff -C2 -r -b -N ../gdb_cvs/src/gdb/remote-rdp.c src/gdb/remote-rdp.c
*** ../gdb_cvs/src/gdb/remote-rdp.c Thu Sep 7 20:18:26 2000
--- src/gdb/remote-rdp.c Fri Sep 8 22:51:09 2000
***************
*** 49,52 ****
--- 49,53 ----
#include "gdb_string.h"
#include "gdbcore.h"
+ #include "regcache.h"
#ifdef HAVE_TIME_H
diff -C2 -r -b -N ../gdb_cvs/src/gdb/remote-sds.c src/gdb/remote-sds.c
*** ../gdb_cvs/src/gdb/remote-sds.c Mon Sep 4 22:21:49 2000
--- src/gdb/remote-sds.c Sat Sep 9 21:06:18 2000
***************
*** 39,42 ****
--- 39,43 ----
#include "gdbcore.h"
#include "dcache.h"
+ #include "regcache.h"
#ifdef USG
diff -C2 -r -b -N ../gdb_cvs/src/gdb/remote-sim.c src/gdb/remote-sim.c
*** ../gdb_cvs/src/gdb/remote-sim.c Thu Aug 31 20:47:09 2000
--- src/gdb/remote-sim.c Fri Sep 8 22:53:28 2000
***************
*** 38,41 ****
--- 38,42 ----
#include "remote-utils.h"
#include "command.h"
+ #include "regcache.h"
/* Prototypes */
diff -C2 -r -b -N ../gdb_cvs/src/gdb/remote-st.c src/gdb/remote-st.c
*** ../gdb_cvs/src/gdb/remote-st.c Mon Sep 4 22:21:49 2000
--- src/gdb/remote-st.c Fri Sep 8 22:54:42 2000
***************
*** 44,47 ****
--- 44,48 ----
#include <sys/types.h>
#include "serial.h"
+ #include "regcache.h"
extern struct target_ops st2000_ops; /* Forward declaration */
diff -C2 -r -b -N ../gdb_cvs/src/gdb/remote-udi.c src/gdb/remote-udi.c
*** ../gdb_cvs/src/gdb/remote-udi.c Thu Aug 31 20:47:09 2000
--- src/gdb/remote-udi.c Fri Sep 8 22:56:16 2000
***************
*** 49,52 ****
--- 49,53 ----
#include "bfd.h"
#include "gdbcore.h" /* For download function */
+ #include "regcache.h"
/* access the register store directly, without going through
diff -C2 -r -b -N ../gdb_cvs/src/gdb/remote-utils.c src/gdb/remote-utils.c
*** ../gdb_cvs/src/gdb/remote-utils.c Mon Sep 4 22:21:49 2000
--- src/gdb/remote-utils.c Fri Sep 8 22:54:11 2000
***************
*** 51,54 ****
--- 51,55 ----
#include "inferior.h" /* for generic_mourn_inferior */
#include "remote-utils.h"
+ #include "regcache.h"
diff -C2 -r -b -N ../gdb_cvs/src/gdb/remote-vx.c src/gdb/remote-vx.c
*** ../gdb_cvs/src/gdb/remote-vx.c Thu Aug 31 20:47:10 2000
--- src/gdb/remote-vx.c Sat Sep 9 21:07:44 2000
***************
*** 34,37 ****
--- 34,38 ----
#include "objfiles.h"
#include "gdb-stabs.h"
+ #include "regcache.h"
#include "gdb_string.h"
diff -C2 -r -b -N ../gdb_cvs/src/gdb/remote-vx29k.c src/gdb/remote-vx29k.c
*** ../gdb_cvs/src/gdb/remote-vx29k.c Thu Aug 31 20:47:10 2000
--- src/gdb/remote-vx29k.c Fri Sep 8 23:03:47 2000
***************
*** 33,36 ****
--- 33,37 ----
#include "symtab.h"
#include "symfile.h" /* for struct complaint */
+ #include "regcache.h"
#include "gdb_string.h"
diff -C2 -r -b -N ../gdb_cvs/src/gdb/remote.c src/gdb/remote.c
*** ../gdb_cvs/src/gdb/remote.c Mon Sep 4 22:21:49 2000
--- src/gdb/remote.c Sat Sep 9 21:04:47 2000
***************
*** 39,42 ****
--- 39,43 ----
#include "dcache.h"
+ #include "regcache.h"
#include <ctype.h>
diff -C2 -r -b -N ../gdb_cvs/src/gdb/rs6000-nat.c src/gdb/rs6000-nat.c
*** ../gdb_cvs/src/gdb/rs6000-nat.c Thu Aug 31 20:47:12 2000
--- src/gdb/rs6000-nat.c Mon Sep 11 22:56:51 2000
***************
*** 30,33 ****
--- 30,34 ----
#include "bfd.h"
#include "gdb-stabs.h"
+ #include "regcache.h"
#include <sys/ptrace.h>
diff -C2 -r -b -N ../gdb_cvs/src/gdb/rs6000-tdep.c src/gdb/rs6000-tdep.c
*** ../gdb_cvs/src/gdb/rs6000-tdep.c Thu Aug 31 20:47:12 2000
--- src/gdb/rs6000-tdep.c Sat Sep 9 21:05:42 2000
***************
*** 39,42 ****
--- 39,43 ----
#include "ppc-tdep.h"
+ #include "regcache.h"
/* If the kernel has to deliver a signal, it pushes a sigcontext
diff -C2 -r -b -N ../gdb_cvs/src/gdb/sh-tdep.c src/gdb/sh-tdep.c
*** ../gdb_cvs/src/gdb/sh-tdep.c Thu Aug 31 20:47:14 2000
--- src/gdb/sh-tdep.c Fri Sep 8 22:25:13 2000
***************
*** 39,42 ****
--- 39,43 ----
#include "arch-utils.h"
#include "floatformat.h"
+ #include "regcache.h"
#undef XMALLOC
diff -C2 -r -b -N ../gdb_cvs/src/gdb/solib.c src/gdb/solib.c
*** ../gdb_cvs/src/gdb/solib.c Thu Aug 31 20:47:14 2000
--- src/gdb/solib.c Mon Sep 11 22:56:03 2000
***************
*** 55,58 ****
--- 55,59 ----
#include "language.h"
#include "gdbcmd.h"
+ #include "regcache.h"
#define MAX_PATH_SIZE 512 /* FIXME: Should be dynamic */
diff -C2 -r -b -N ../gdb_cvs/src/gdb/somsolib.c src/gdb/somsolib.c
*** ../gdb_cvs/src/gdb/somsolib.c Thu Aug 31 20:47:15 2000
--- src/gdb/somsolib.c Mon Sep 11 22:24:21 2000
***************
*** 40,43 ****
--- 40,44 ----
#include "assert.h"
#include "language.h"
+ #include "regcache.h"
#include <fcntl.h>
diff -C2 -r -b -N ../gdb_cvs/src/gdb/sparc-tdep.c src/gdb/sparc-tdep.c
*** ../gdb_cvs/src/gdb/sparc-tdep.c Thu Aug 31 20:47:16 2000
--- src/gdb/sparc-tdep.c Fri Sep 8 22:34:37 2000
***************
*** 31,34 ****
--- 31,35 ----
#include "bfd.h"
#include "gdb_string.h"
+ #include "regcache.h"
#ifdef USE_PROC_FS
diff -C2 -r -b -N ../gdb_cvs/src/gdb/sparcl-tdep.c src/gdb/sparcl-tdep.c
*** ../gdb_cvs/src/gdb/sparcl-tdep.c Thu Aug 31 20:47:16 2000
--- src/gdb/sparcl-tdep.c Mon Sep 11 22:25:58 2000
***************
*** 25,28 ****
--- 25,29 ----
#include "serial.h"
#include <sys/types.h>
+ #include "regcache.h"
#if (!defined(__GO32__) && !defined(_WIN32)) || defined(__CYGWIN32__)
diff -C2 -r -b -N ../gdb_cvs/src/gdb/symfile.c src/gdb/symfile.c
*** ../gdb_cvs/src/gdb/symfile.c Mon Sep 4 22:21:49 2000
--- src/gdb/symfile.c Mon Sep 11 23:01:56 2000
***************
*** 37,40 ****
--- 37,41 ----
#include "gdb-stabs.h"
#include "obstack.h"
+ #include "regcache.h"
#include <assert.h>
diff -C2 -r -b -N ../gdb_cvs/src/gdb/symtab.c src/gdb/symtab.c
*** ../gdb_cvs/src/gdb/symtab.c Mon Sep 4 22:21:49 2000
--- src/gdb/symtab.c Mon Sep 11 22:58:07 2000
***************
*** 36,39 ****
--- 36,40 ----
#include "demangle.h"
#include "inferior.h"
+ #include "regcache.h"
#include "obstack.h"
diff -C2 -r -b -N ../gdb_cvs/src/gdb/target.c src/gdb/target.c
*** ../gdb_cvs/src/gdb/target.c Thu Aug 31 20:47:18 2000
--- src/gdb/target.c Fri Sep 8 22:48:26 2000
***************
*** 33,36 ****
--- 33,37 ----
#include "gdb_wait.h"
#include <signal.h>
+ #include "regcache.h"
extern int errno;
diff -C2 -r -b -N ../gdb_cvs/src/gdb/thread-db.c src/gdb/thread-db.c
*** ../gdb_cvs/src/gdb/thread-db.c Mon Sep 4 04:41:28 2000
--- src/gdb/thread-db.c Sat Sep 9 21:16:10 2000
***************
*** 25,28 ****
--- 25,29 ----
#include "gdb_proc_service.h"
#include "gdb_thread_db.h"
+ #include "regcache.h"
#include "gdbthread.h"
diff -C2 -r -b -N ../gdb_cvs/src/gdb/thread.c src/gdb/thread.c
*** ../gdb_cvs/src/gdb/thread.c Thu Aug 31 20:47:19 2000
--- src/gdb/thread.c Fri Sep 8 22:55:28 2000
***************
*** 32,35 ****
--- 32,36 ----
#include "command.h"
#include "gdbcmd.h"
+ #include "regcache.h"
#include <ctype.h>
diff -C2 -r -b -N ../gdb_cvs/src/gdb/tic80-tdep.c src/gdb/tic80-tdep.c
*** ../gdb_cvs/src/gdb/tic80-tdep.c Thu Aug 31 20:47:19 2000
--- src/gdb/tic80-tdep.c Mon Sep 11 22:29:48 2000
***************
*** 29,32 ****
--- 29,33 ----
#include "gdbcore.h"
#include "symfile.h"
+ #include "regcache.h"
/* Function: frame_find_saved_regs
diff -C2 -r -b -N ../gdb_cvs/src/gdb/tracepoint.c src/gdb/tracepoint.c
*** ../gdb_cvs/src/gdb/tracepoint.c Mon Sep 4 22:21:50 2000
--- src/gdb/tracepoint.c Fri Sep 8 22:47:51 2000
***************
*** 35,38 ****
--- 35,39 ----
#include "ax.h"
#include "ax-gdb.h"
+ #include "regcache.h"
/* readline include files */
diff -C2 -r -b -N ../gdb_cvs/src/gdb/umax-xdep.c src/gdb/umax-xdep.c
*** ../gdb_cvs/src/gdb/umax-xdep.c Thu Aug 31 20:47:20 2000
--- src/gdb/umax-xdep.c Mon Sep 11 22:44:13 2000
***************
*** 22,25 ****
--- 22,26 ----
#include "frame.h"
#include "inferior.h"
+ #include "regcache.h"
#include <sys/param.h>
diff -C2 -r -b -N ../gdb_cvs/src/gdb/uw-thread.c src/gdb/uw-thread.c
*** ../gdb_cvs/src/gdb/uw-thread.c Thu Jul 6 12:03:19 2000
--- src/gdb/uw-thread.c Mon Sep 11 22:34:18 2000
***************
*** 103,106 ****
--- 103,107 ----
#include "inferior.h"
#include <fcntl.h>
+ #include "regcache.h"
/* <thread.h> includes <sys/priocntl.h>, which requires boolean_t from
diff -C2 -r -b -N ../gdb_cvs/src/gdb/v850-tdep.c src/gdb/v850-tdep.c
*** ../gdb_cvs/src/gdb/v850-tdep.c Thu Aug 31 20:47:20 2000
--- src/gdb/v850-tdep.c Mon Sep 11 22:31:22 2000
***************
*** 30,33 ****
--- 30,34 ----
#include "symfile.h"
#include "arch-utils.h"
+ #include "regcache.h"
diff -C2 -r -b -N ../gdb_cvs/src/gdb/v850ice.c src/gdb/v850ice.c
*** ../gdb_cvs/src/gdb/v850ice.c Thu Aug 31 20:47:21 2000
--- src/gdb/v850ice.c Fri Sep 8 22:58:41 2000
***************
*** 31,34 ****
--- 31,35 ----
#include "value.h"
#include "command.h"
+ #include "regcache.h"
#include <tcl.h>
diff -C2 -r -b -N ../gdb_cvs/src/gdb/valops.c src/gdb/valops.c
*** ../gdb_cvs/src/gdb/valops.c Thu Aug 31 20:47:21 2000
--- src/gdb/valops.c Fri Sep 8 22:35:31 2000
***************
*** 31,34 ****
--- 31,35 ----
#include "language.h"
#include "gdbcmd.h"
+ #include "regcache.h"
#include <errno.h>
diff -C2 -r -b -N ../gdb_cvs/src/gdb/value.h src/gdb/value.h
*** ../gdb_cvs/src/gdb/value.h Mon Sep 4 22:21:51 2000
--- src/gdb/value.h Fri Sep 8 22:19:51 2000
***************
*** 463,501 ****
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 regno, char *myaddr);
-
- extern void write_register_gen (int regno, char *myaddr);
-
- /* Rename to read_unsigned_register()? */
- extern ULONGEST read_register (int regno);
-
- extern LONGEST read_signed_register (int regno);
-
- /* Rename to read_unsigned_register_pid()? */
- extern ULONGEST read_register_pid (int regno, int pid);
-
- extern LONGEST read_signed_register_pid (int regno, int pid);
-
- extern void write_register (int regno, LONGEST val);
-
- extern void write_register_pid (int regno, CORE_ADDR val, int pid);
-
- extern void supply_register (int regno, char *val);
-
- extern int register_cached (int regno);
-
- extern void register_changed (int regnum);
-
- extern void get_saved_register (char *raw_buffer, int *optimized,
- CORE_ADDR * addrp,
- struct frame_info *frame,
- int regnum, enum lval_type *lval);
-
extern void
modify_field (char *addr, LONGEST fieldval, int bitpos, int bitsize);
--- 463,466 ----
diff -C2 -r -b -N ../gdb_cvs/src/gdb/w65-tdep.c src/gdb/w65-tdep.c
*** ../gdb_cvs/src/gdb/w65-tdep.c Thu Aug 31 20:47:22 2000
--- src/gdb/w65-tdep.c Sat Sep 9 21:21:24 2000
***************
*** 32,35 ****
--- 32,36 ----
#include "dis-asm.h"
#include "gdbcore.h"
+ #include "regcache.h"
/* Return the saved PC from this frame. */
diff -C2 -r -b -N ../gdb_cvs/src/gdb/win32-nat.c src/gdb/win32-nat.c
*** ../gdb_cvs/src/gdb/win32-nat.c Thu Aug 31 20:47:23 2000
--- src/gdb/win32-nat.c Fri Sep 8 22:44:18 2000
***************
*** 47,50 ****
--- 47,51 ----
#include <sys/param.h>
#include <unistd.h>
+ #include "regcache.h"
/* The ui's event loop. */
diff -C2 -r -b -N ../gdb_cvs/src/gdb/wince.c src/gdb/wince.c
*** ../gdb_cvs/src/gdb/wince.c Thu Aug 31 20:47:23 2000
--- src/gdb/wince.c Mon Sep 11 22:32:23 2000
***************
*** 57,60 ****
--- 57,61 ----
#include "dcache.h"
#include <time.h>
+ #include "regcache.h"
/* The ui's event loop. */
diff -C2 -r -b -N ../gdb_cvs/src/gdb/z8k-tdep.c src/gdb/z8k-tdep.c
*** ../gdb_cvs/src/gdb/z8k-tdep.c Thu Aug 31 20:47:24 2000
--- src/gdb/z8k-tdep.c Fri Sep 8 22:41:27 2000
***************
*** 32,35 ****
--- 32,37 ----
#include "dis-asm.h"
#include "gdbcore.h"
+ #include "regcache.h"
+
#include "value.h" /* For read_register() */
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@cygnus.com