From: Fred Fish Date: Mon, 9 Sep 1996 03:01:49 +0000 (+0000) Subject: * alpha-nat.c (fetch_core_registers): Match Sep 4 gdbcore.h prototype X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=948a9d9233317319e9cf4bbc41b0a87c50ca0572;p=binutils-gdb.git * alpha-nat.c (fetch_core_registers): Match Sep 4 gdbcore.h prototype change for core_read_registers in struct core_fns. * core-regset.c (fetch_core_registers): Ditto & add prototype. * core-sol2.c (fetch_core_registers): Ditto & add prototype. * i386aix-nat.c (fetch_core_registers): Ditto & add prototype. * i386b-nat.c (fetch_core_registers): Ditto. * i386mach-nat.c (fetch_core_registers): Ditto & add prototype. * irix4-nat.c (fetch_core_registers): Ditto. * irix5-nat.c (fetch_core_registers): Ditto. * lynx-nat.c (fetch_core_registers): Ditto & add prototype. * m68knbsd-nat.c (fetch_core_registers): Ditto. * mips-nat.c (fetch_core_registers): Ditto & add prototype. * rs6000-nat.c (fetch_core_registers): Ditto. * sparc-nat.c (fetch_core_registers): Ditto. * sun3-nat.c (fetch_core_registers): Ditto & add prototype. * ultra3-nat.c (fetch_core_registers): Ditto & add prototype. * alpha-nat.c (register_addr): Match Sep 4 gdbcore.h prototype change. * delta68-nat.c (register_addr): Ditto. * gdbserver/low-linux.c (register_addr): Ditto. * gdbserver/low-hppabsd.c (register_addr): Ditto. * i386m3-nat.c (register_addr): Ditto. * mips-nat.c (register_addr): Ditto. * ultra3-nat.c (register_addr): Ditto. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6c438de5d5e..adafe10e3da 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,30 @@ +Sun Sep 8 15:26:27 1996 Fred Fish + + * alpha-nat.c (fetch_core_registers): Match Sep 4 gdbcore.h prototype + change for core_read_registers in struct core_fns. + * core-regset.c (fetch_core_registers): Ditto & add prototype. + * core-sol2.c (fetch_core_registers): Ditto & add prototype. + * i386aix-nat.c (fetch_core_registers): Ditto & add prototype. + * i386b-nat.c (fetch_core_registers): Ditto. + * i386mach-nat.c (fetch_core_registers): Ditto & add prototype. + * irix4-nat.c (fetch_core_registers): Ditto. + * irix5-nat.c (fetch_core_registers): Ditto. + * lynx-nat.c (fetch_core_registers): Ditto & add prototype. + * m68knbsd-nat.c (fetch_core_registers): Ditto. + * mips-nat.c (fetch_core_registers): Ditto & add prototype. + * rs6000-nat.c (fetch_core_registers): Ditto. + * sparc-nat.c (fetch_core_registers): Ditto. + * sun3-nat.c (fetch_core_registers): Ditto & add prototype. + * ultra3-nat.c (fetch_core_registers): Ditto & add prototype. + + * alpha-nat.c (register_addr): Match Sep 4 gdbcore.h prototype change. + * delta68-nat.c (register_addr): Ditto. + * gdbserver/low-linux.c (register_addr): Ditto. + * gdbserver/low-hppabsd.c (register_addr): Ditto. + * i386m3-nat.c (register_addr): Ditto. + * mips-nat.c (register_addr): Ditto. + * ultra3-nat.c (register_addr): Ditto. + Sun Sep 8 15:14:00 1996 Stu Grossman (grossman@critters.cygnus.com) * blockframe.c (inside_main_func): Cleanup slightly. Move diff --git a/gdb/alpha-nat.c b/gdb/alpha-nat.c index d0c49c93b46..cb6da8a5b53 100644 --- a/gdb/alpha-nat.c +++ b/gdb/alpha-nat.c @@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #endif #include -static void fetch_core_registers PARAMS ((char *, unsigned, int, unsigned)); +static void fetch_core_registers PARAMS ((char *, unsigned, int, CORE_ADDR)); /* Size of elements in jmpbuf */ @@ -85,7 +85,7 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr) char *core_reg_sect; unsigned core_reg_size; int which; - unsigned reg_addr; + CORE_ADDR reg_addr; { register int regno; register int addr; @@ -143,10 +143,10 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr) /* Return the ptrace ``address'' of register REGNO. */ -unsigned int +CORE_ADDR register_addr (regno, blockend) int regno; - int blockend; + CORE_ADDR blockend; { return REGISTER_PTRACE_ADDR (regno); } diff --git a/gdb/core-aout.c b/gdb/core-aout.c index a529cf9fb47..022ff9b5850 100644 --- a/gdb/core-aout.c +++ b/gdb/core-aout.c @@ -52,9 +52,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #endif -static void fetch_core_registers PARAMS ((char *core_reg_sect, - unsigned core_reg_size, int which, - CORE_ADDR reg_addr)); +static void fetch_core_registers PARAMS ((char *, unsigned, int, CORE_ADDR)); /* Extract the register values out of the core file and store them where `read_register' will find them. diff --git a/gdb/core-regset.c b/gdb/core-regset.c index 68b08457a49..144bba3141f 100644 --- a/gdb/core-regset.c +++ b/gdb/core-regset.c @@ -47,6 +47,8 @@ regardless of whether or not the actual target has floating point hardware. #include "command.h" #include "gdbcore.h" +static void fetch_core_registers PARAMS ((char *, unsigned, int, CORE_ADDR)); + /* GLOBAL FUNCTION @@ -57,7 +59,7 @@ SYNOPSIS void fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, - int which, unsigned in reg_addr) + int which, CORE_ADDR reg_addr) DESCRIPTION @@ -77,7 +79,7 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr) char *core_reg_sect; unsigned core_reg_size; int which; - unsigned int reg_addr; /* Unused in this version */ + CORE_ADDR reg_addr; /* Unused in this version */ { #if defined (HAVE_GREGSET_T) && defined (HAVE_FPREGSET_T) gregset_t gregset; diff --git a/gdb/core-sol2.c b/gdb/core-sol2.c index 5f43002edb9..9e07c35b227 100644 --- a/gdb/core-sol2.c +++ b/gdb/core-sol2.c @@ -41,12 +41,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "command.h" #include "gdbcore.h" +static void fetch_core_registers PARAMS ((char *, unsigned, int, CORE_ADDR)); + static void fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr) char *core_reg_sect; unsigned core_reg_size; int which; - unsigned int reg_addr; /* Unused in this version */ + CORE_ADDR reg_addr; /* Unused in this version */ { prgregset_t prgregset; prfpregset_t prfpregset; diff --git a/gdb/delta68-nat.c b/gdb/delta68-nat.c index 5502263d9f6..c62e1d70544 100644 --- a/gdb/delta68-nat.c +++ b/gdb/delta68-nat.c @@ -32,10 +32,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Return the address in the core dump or inferior of register REGNO. BLOCKEND is the address of the end of the user structure. */ -unsigned int +CORE_ADDR register_addr (regno, blockend) int regno; - int blockend; + CORE_ADDR blockend; { static int sysv68reg[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, -1, 15, 16 }; diff --git a/gdb/i386aix-nat.c b/gdb/i386aix-nat.c index 133109e653e..6bf3d69c5f2 100644 --- a/gdb/i386aix-nat.c +++ b/gdb/i386aix-nat.c @@ -51,6 +51,8 @@ extern int errno; #include "target.h" +static void fetch_core_registers PARAMS ((char *, unsigned, int, CORE_ADDR)); + /* this table must line up with REGISTER_NAMES in tm-i386v.h */ /* symbols like 'EAX' come from */ @@ -317,7 +319,7 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr) char *core_reg_sect; unsigned core_reg_size; int which; - unsigned int reg_addr; /* ignored */ + CORE_ADDR reg_addr; /* ignored */ { if (which == 0) diff --git a/gdb/i386b-nat.c b/gdb/i386b-nat.c index d273cabeeb3..938b599caba 100644 --- a/gdb/i386b-nat.c +++ b/gdb/i386b-nat.c @@ -57,7 +57,7 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, ignore) char *core_reg_sect; unsigned core_reg_size; int which; - unsigned int ignore; + CORE_ADDR ignore; { struct md_core *core_reg = (struct md_core *)core_reg_sect; diff --git a/gdb/i386m3-nat.c b/gdb/i386m3-nat.c index bbaa022f3fa..c0257b18584 100644 --- a/gdb/i386m3-nat.c +++ b/gdb/i386m3-nat.c @@ -219,12 +219,12 @@ store_inferior_registers (regno) * Called by core-aout.c(fetch_core_registers) */ -unsigned int +CORE_ADDR register_addr (regno, blockend) int regno; - int blockend; + CORE_ADDR blockend; { - unsigned int addr; + CORE_ADDR addr; if (regno < 0 || regno >= NUM_REGS) error ("Invalid register number %d.", regno); diff --git a/gdb/i386mach-nat.c b/gdb/i386mach-nat.c index 1a5904a1307..f843d7f95a3 100644 --- a/gdb/i386mach-nat.c +++ b/gdb/i386mach-nat.c @@ -36,7 +36,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "gdb_stat.h" #include - +static void fetch_core_registers PARAMS ((char *, unsigned, int, CORE_ADDR)); void fetch_inferior_registers (regno) @@ -118,7 +118,7 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr) char *core_reg_sect; unsigned core_reg_size; int which; - unsigned int reg_addr; /* Unused in this version */ + CORE_ADDR reg_addr; /* Unused in this version */ { int val; extern char registers[]; diff --git a/gdb/irix4-nat.c b/gdb/irix4-nat.c index a0176e916a4..5a6e1112229 100644 --- a/gdb/irix4-nat.c +++ b/gdb/irix4-nat.c @@ -36,7 +36,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ typedef unsigned int greg_t; /* why isn't this defined? */ static void -fetch_core_registers PARAMS ((char *, unsigned int, int, unsigned int)); +fetch_core_registers PARAMS ((char *, unsigned int, int, CORE_ADDR)); /* * See the comment in m68k-tdep.c regarding the utility of these functions. @@ -166,7 +166,7 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr) char *core_reg_sect; unsigned core_reg_size; int which; /* Unused */ - unsigned int reg_addr; /* Unused */ + CORE_ADDR reg_addr; /* Unused */ { if (core_reg_size != REGISTER_BYTES) { diff --git a/gdb/irix5-nat.c b/gdb/irix5-nat.c index 8bd81f39b7a..8490968ac94 100644 --- a/gdb/irix5-nat.c +++ b/gdb/irix5-nat.c @@ -33,7 +33,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include /* For JB_XXX. */ static void -fetch_core_registers PARAMS ((char *, unsigned int, int, unsigned int)); +fetch_core_registers PARAMS ((char *, unsigned int, int, CORE_ADDR)); /* Size of elements in jmpbuf */ @@ -167,7 +167,7 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr) char *core_reg_sect; unsigned core_reg_size; int which; /* Unused */ - unsigned int reg_addr; /* Unused */ + CORE_ADDR reg_addr; /* Unused */ { if (core_reg_size != REGISTER_BYTES) { diff --git a/gdb/lynx-nat.c b/gdb/lynx-nat.c index b9b8717ef41..f006aa46c9c 100644 --- a/gdb/lynx-nat.c +++ b/gdb/lynx-nat.c @@ -28,6 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include static unsigned long registers_addr PARAMS ((int pid)); +static void fetch_core_registers PARAMS ((char *, unsigned, int, CORE_ADDR); #define X(ENTRY)(offsetof(struct econtext, ENTRY)) @@ -800,7 +801,7 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr) char *core_reg_sect; unsigned core_reg_size; int which; - unsigned reg_addr; + CORE_ADDR reg_addr; { struct st_entry s; unsigned int regno; diff --git a/gdb/m68knbsd-nat.c b/gdb/m68knbsd-nat.c index 7f981472ba6..c2e71dfb570 100644 --- a/gdb/m68knbsd-nat.c +++ b/gdb/m68knbsd-nat.c @@ -73,7 +73,7 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, ignore) char *core_reg_sect; unsigned core_reg_size; int which; - unsigned int ignore; + CORE_ADDR ignore; { struct md_core *core_reg = (struct md_core *)core_reg_sect; diff --git a/gdb/mips-nat.c b/gdb/mips-nat.c index 8d80af4e587..1764676e01e 100644 --- a/gdb/mips-nat.c +++ b/gdb/mips-nat.c @@ -61,6 +61,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ static char zerobuf[MAX_REGISTER_RAW_SIZE] = {0}; +static void fetch_core_registers PARAMS ((char *, unsigned, int, CORE_ADDR)); + /* Get all registers from the inferior */ void @@ -167,7 +169,7 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr) char *core_reg_sect; unsigned core_reg_size; int which; - unsigned reg_addr; + CORE_ADDR reg_addr; { register int regno; register unsigned int addr; @@ -209,12 +211,12 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr) /* Return the address in the core dump or inferior of register REGNO. BLOCKEND is the address of the end of the user structure. */ -unsigned int +CORE_ADDR register_addr (regno, blockend) int regno; - int blockend; + CORE_ADDR blockend; { - int addr; + CORE_ADDR addr; if (regno < 0 || regno >= NUM_REGS) error ("Invalid register number %d.", regno); diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c index 7aa42bda86c..38944c0f727 100644 --- a/gdb/rs6000-nat.c +++ b/gdb/rs6000-nat.c @@ -67,7 +67,7 @@ static void vmap_symtab PARAMS ((struct vmap *)); static void -fetch_core_registers PARAMS ((char *, unsigned int, int, unsigned int)); +fetch_core_registers PARAMS ((char *, unsigned int, int, CORE_ADDR)); static void exec_one_dummy_insn PARAMS ((void)); @@ -283,7 +283,7 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr) char *core_reg_sect; unsigned core_reg_size; int which; - unsigned int reg_addr; /* Unused in this version */ + CORE_ADDR reg_addr; /* Unused in this version */ { /* fetch GPRs and special registers from the first register section in core bfd. */ diff --git a/gdb/sparc-nat.c b/gdb/sparc-nat.c index feb97761ec0..4c21c35730f 100644 --- a/gdb/sparc-nat.c +++ b/gdb/sparc-nat.c @@ -39,7 +39,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define FP_REGS 4 static void -fetch_core_registers PARAMS ((char *, unsigned int, int, unsigned int)); +fetch_core_registers PARAMS ((char *, unsigned int, int, CORE_ADDR)); /* Fetch one or more registers from the inferior. REGNO == -1 to get them all. We actually fetch more than requested, when convenient, @@ -247,7 +247,7 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, ignore) char *core_reg_sect; unsigned core_reg_size; int which; - unsigned int ignore; /* reg addr, unused in this version */ + CORE_ADDR ignore; /* reg addr, unused in this version */ { if (which == 0) { diff --git a/gdb/sun3-nat.c b/gdb/sun3-nat.c index c2ab6c99a50..30f4a44e139 100644 --- a/gdb/sun3-nat.c +++ b/gdb/sun3-nat.c @@ -25,6 +25,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define KERNEL /* To get floating point reg definitions */ #include +static void fetch_core_registers PARAMS ((char *, unsigned, int, CORE_ADDR)); + void fetch_inferior_registers (regno) int regno; @@ -103,7 +105,7 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr) char *core_reg_sect; unsigned core_reg_size; int which; - unsigned int reg_addr; /* Unused in this version */ + CORE_ADDR reg_addr; /* Unused in this version */ { extern char registers[]; struct regs *regs = (struct regs *) core_reg_sect; diff --git a/gdb/ultra3-nat.c b/gdb/ultra3-nat.c index d348c6f7cd3..8f7a7f71854 100644 --- a/gdb/ultra3-nat.c +++ b/gdb/ultra3-nat.c @@ -36,6 +36,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include "gdb_stat.h" +static void fetch_core_registers PARAMS ((char *, unsigned, int, CORE_ADDR)); + /* Assumes support for AMD's Binary Compatibility Standard for ptrace(). If you define ULTRA3, the ultra3 extensions to ptrace() are used allowing the reading of more than one register @@ -242,7 +244,11 @@ fetch_register (regno) */ static void -fetch_core_registers () +fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr) + char *core_reg_sect; /* Unused in this version */ + unsigned core_reg_size; /* Unused in this version */ + int which; /* Unused in this version */ + CORE_ADDR reg_addr; /* Unused in this version */ { register int regno; int val; @@ -275,10 +281,10 @@ fetch_core_registers () * available to the user is specified in 'regno', then an address that * will cause ptrace() to fail is returned. */ -unsigned int +CORE_ADDR register_addr (regno,blockend) - unsigned int regno; - char *blockend; + int regno; + CORE_ADDR blockend; { if ((regno >= LR0_REGNUM) && (regno < LR0_REGNUM + 128)) { return(offsetof(struct ptrace_user,pt_lr[regno-LR0_REGNUM]));