aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-12-26 18:10:22 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-12-26 18:10:22 +0000
commitf4f0d174871fc68497aebc705f78bbd09fe3e498 (patch)
treee9eed18f76859d5a4f0e2d4f3aa7293cc5972272 /gdb
parent192c3eeb94e19460aee7561b3db2ce01cef83666 (diff)
downloadgdb-f4f0d174871fc68497aebc705f78bbd09fe3e498.zip
gdb-f4f0d174871fc68497aebc705f78bbd09fe3e498.tar.gz
gdb-f4f0d174871fc68497aebc705f78bbd09fe3e498.tar.bz2
* valops.c (call_function_by_hand, push_word), defs.h (push_word),
convex-xdep.c, m88k-nat.c, i386m3-nat.c, mips-tdep.c, mipsm3-nat.c, ns32km3-nat.c, remote-bug.c, m88k-tdep.c, remote-hms.c, remote-mips.c, config/gould/tm-np1.h, hppa-tdep.c (hppa_fix_call_dummy), remote-vx.c: Use REGISTER_SIZE, unsigned LONGEST, and {store,extract}_unsigned_integer, instead of sizeof (REGISTER_TYPE) and REGISTER_TYPE. * All tm.h files: Change REGISTER_TYPE to REGISTER_SIZE. * hppa-tdep.c (pa_print_fp_reg): Remove unused variable val. * Makefile.in (ALLDEPFILES): Remove i386ly-nat.c and m68kly-nat.c. Add lynx-nat.c.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog15
-rw-r--r--gdb/Makefile.in60
-rw-r--r--gdb/config/a29k/tm-a29k.h6
-rw-r--r--gdb/config/h8300/tm-h8300.h6
-rw-r--r--gdb/config/h8500/tm-h8500.h6
-rw-r--r--gdb/config/i386/tm-i386v.h6
-rw-r--r--gdb/config/i386/tm-sun386.h6
-rw-r--r--gdb/config/i960/tm-i960.h6
-rw-r--r--gdb/config/m68k/tm-m68k.h6
-rw-r--r--gdb/config/m68k/tm-vx68.h2
-rw-r--r--gdb/config/m88k/tm-m88k.h6
-rw-r--r--gdb/config/mips/tm-mips.h6
-rw-r--r--gdb/config/ns32k/tm-merlin.h6
-rw-r--r--gdb/config/ns32k/tm-umax.h6
-rw-r--r--gdb/config/pa/tm-hppa.h32
-rw-r--r--gdb/config/sh/tm-sh.h7
-rw-r--r--gdb/config/sparc/tm-sparc.h6
-rw-r--r--gdb/config/vax/tm-vax.h6
-rw-r--r--gdb/config/z8k/tm-z8k.h6
-rw-r--r--gdb/convex-xdep.c8
-rw-r--r--gdb/defs.h7
-rw-r--r--gdb/hppa-tdep.c31
-rw-r--r--gdb/i386m3-nat.c4
-rw-r--r--gdb/m88k-nat.c5
-rw-r--r--gdb/m88k-tdep.c4
-rw-r--r--gdb/mipsm3-nat.c4
-rw-r--r--gdb/ns32km3-nat.c4
-rw-r--r--gdb/remote-bug.c17
-rw-r--r--gdb/remote-hms.c2
-rw-r--r--gdb/remote-mips.c2
-rw-r--r--gdb/remote-vx.c2
31 files changed, 185 insertions, 105 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 4356233..8c3cd86 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,18 @@
+Sun Dec 26 09:18:10 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * valops.c (call_function_by_hand, push_word), defs.h (push_word),
+ convex-xdep.c, m88k-nat.c, i386m3-nat.c, mips-tdep.c, mipsm3-nat.c,
+ ns32km3-nat.c, remote-bug.c, m88k-tdep.c, remote-hms.c, remote-mips.c,
+ config/gould/tm-np1.h, hppa-tdep.c (hppa_fix_call_dummy), remote-vx.c:
+ Use REGISTER_SIZE, unsigned LONGEST, and
+ {store,extract}_unsigned_integer, instead of sizeof
+ (REGISTER_TYPE) and REGISTER_TYPE.
+ * All tm.h files: Change REGISTER_TYPE to REGISTER_SIZE.
+ * hppa-tdep.c (pa_print_fp_reg): Remove unused variable val.
+
+ * Makefile.in (ALLDEPFILES): Remove i386ly-nat.c and m68kly-nat.c.
+ Add lynx-nat.c.
+
Sat Dec 25 20:05:41 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
* hppa-tdep.c (init_extra_frame_info): Correctly adjust the base
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index ac3ee3f..e47de42 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -310,7 +310,7 @@ SFILES = blockframe.c breakpoint.c buildsym.c c-exp.y c-lang.c \
mem-break.c minsyms.c mipsread.c nlmread.c objfiles.c parse.c \
printcmd.c remote.c source.c stabsread.c stack.c symfile.c symmisc.c \
symtab.c target.c thread.c typeprint.c utils.c valarith.c valops.c \
- valprint.c values.c serial.c ser-unix.c
+ valprint.c values.c serial.c ser-unix.c mdebugread.c
# Files that are not source code, but need to go into
# gdb-$(VERSION).tar.Z.
@@ -375,10 +375,10 @@ defs_h = defs.h xm.h tm.h nm.h config.status
inferior_h = inferior.h $(breakpoint_h)
-# Header files that are not named in config/*/* Makefile fragments go
-# into HFILES.
+# Header files that need to have srcdir added.
-HFILES = buildsym.h call-cmds.h coff-solib.h defs.h environ.h $(gdbcmd_h) \
+HFILES_NO_SRCDIR = buildsym.h call-cmds.h coff-solib.h defs.h environ.h \
+ $(gdbcmd_h) \
$(gdbcore_h) gdb-stabs.h $(inferior_h) language.h minimon.h monitor.h \
objfiles.h parser-defs.h partial-stab.h serial.h signals.h solib.h \
symfile.h stabsread.h target.h terminal.h typeprint.h xcoffsolib.h \
@@ -386,7 +386,7 @@ HFILES = buildsym.h call-cmds.h coff-solib.h defs.h environ.h $(gdbcmd_h) \
config/m68k/tm-m68k.h config/pa/tm-hppa.h config/i960/tm-i960.h \
config/sparc/tm-sparc.h config/tm-sunos.h config/tm-sysv4.h \
config/m68k/xm-m68k.h config/sparc/xm-sparc.h config/xm-sysv4.h \
- config/vax/xm-vax.h config/nm-m3.h config/nm-trash.h $(udiheaders) \
+ config/vax/xm-vax.h config/nm-m3.h config/nm-trash.h \
29k-share/udi/udiids.h 29k-share/udi_soc nindy-share/b.out.h \
nindy-share/block_io.h nindy-share/coff.h \
nindy-share/env.h nindy-share/stop.h \
@@ -395,6 +395,11 @@ HFILES = buildsym.h call-cmds.h coff-solib.h defs.h environ.h $(gdbcmd_h) \
vx-share/xdr_ptrace.h vx-share/xdr_rdb.h thread.h \
$(remote_utils_h)
+# Header files that already have srcdir in them.
+
+HFILES_WITH_SRCDIR = $(udiheaders)
+
+
# GDB "info" files, which should be included in their entirety
INFOFILES = gdb.info*
@@ -417,9 +422,12 @@ DEPFILES = $(TDEPFILES) $(XDEPFILES) $(SER_HARDWIRE) $(NATDEPFILES) $(REMOTE_O)
SOURCES = $(SFILES) $(ALLDEPFILES) $(YYFILES)
# Don't include YYFILES (*.tab.c) because we already include *.y in SFILES,
# and it's more useful to see it in the .y file.
-TAGFILES = $(SFILES) $(HFILES) $(ALLDEPFILES) $(ALLPARAM) $(POSSLIBS)
+TAGFILES_NO_SRCDIR = $(SFILES) $(HFILES_NO_SRCDIR) $(ALLDEPFILES) \
+ $(ALLPARAM) $(POSSLIBS)
+TAGFILES_WITH_SRCDIR = $(HFILES_WITH_SRCDIR)
-TARFILES = $(SFILES) $(HFILES) $(NONSRC) $(ALLDEPFILES) $(ALLCONFIG) \
+TARFILES = $(SFILES) $(HFILES_NO_SRCDIR) $(HFILES_WITH_SRCDIR) \
+ $(NONSRC) $(ALLDEPFILES) $(ALLCONFIG) \
$(ALLPARAM) $(INFOFILES) $(POSSLIBS) $(REMOTE_EXAMPLES)
@@ -432,7 +440,7 @@ OBS = version.o main.o blockframe.o breakpoint.o findvar.o stack.o thread.o \
dwarfread.o mipsread.o stabsread.o core.o c-lang.o ch-lang.o m2-lang.o \
complaints.o typeprint.o c-typeprint.o ch-typeprint.o m2-typeprint.o \
c-valprint.o cp-valprint.o ch-valprint.o m2-valprint.o nlmread.o \
- serial.o
+ serial.o mdebugread.o
RAPP_OBS = rgdb.o rudp.o rserial.o serial.o udp.o $(XDEPFILES)
@@ -459,8 +467,16 @@ all: gdb
@$(MAKE) $(FLAGS_TO_PASS) DO=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do
installcheck:
+
+# The check target can not use subdir_do, because subdir_do does not
+# use TARGET_FLAGS_TO_PASS.
check: force
- @rootme=`pwd`; export rootme; $(MAKE) $(TARGET_FLAGS_TO_PASS) DO=check DODIRS=testsuite subdir_do
+ @if [ -f testsuite/Makefile ]; then \
+ rootme=`pwd`; export rootme; \
+ cd testsuite; \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check; \
+ else true; fi
+
info dvi install-info clean-info: force
@$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
@@ -601,14 +617,21 @@ kdb: $(NTSSTART) $(OBS) $(NTSOBS) $(ADD_DEPS) $(CDEPS)
-lc $(CLIBS)
# Put the proper machine-specific files first, so M-. on a machine
-# specific routine gets the one for the correct machine.
-TAGS:
+# specific routine gets the one for the correct machine. (FIXME: those
+# files go in twice; we should be removing them from the main list).
+
+# TAGS depends on all the files that go into it so you can rebuild TAGS
+# with `make TAGS' and not have to say `rm TAGS' first.
+
+TAGS: $(TAGFILES_NO_SRCDIR) $(TAGFILES_WITH_SRCDIR)
etags `find $(srcdir)/config \( -name $(TM_FILE) \
-o -name $(XM_FILE) \
-o -name $(NAT_FILE) \) -print` \
- `(for i in $(DEPFILES) $(TAGFILES); do \
+ `(for i in $(DEPFILES) $(TAGFILES_NO_SRCDIR); do \
echo $(srcdir)/$$i ; \
- done) | sed -e 's/\.o$$/\.c/'` \
+ done ; for i in $(TAGFILES_WITH_SRCDIR); do \
+ echo $$i ; \
+ done) | sed -e 's/\.o$$/\.c/'`
tags: TAGS
@@ -851,11 +874,12 @@ ALLDEPFILES = 29k-share/udi/udip2soc.c 29k-share/udi/udr.c \
go32-xdep.c gould-pinsn.c gould-xdep.c h8300-tdep.c h8500-tdep.c \
hp300ux-nat.c hppa-pinsn.c hppa-tdep.c hppab-nat.c hppah-nat.c \
i386-pinsn.c i386-tdep.c i386b-nat.c i386mach-nat.c i386v-nat.c \
- i386aix-nat.c i386m3-nat.c i386v4-nat.c i386ly-nat.c i386ly-tdep.c \
+ i386aix-nat.c i386m3-nat.c i386v4-nat.c i386ly-tdep.c \
i387-tdep.c \
i960-pinsn.c i960-tdep.c \
- infptrace.c inftarg.c irix4-nat.c isi-xdep.c m3-nat.c \
- m68k-pinsn.c m68k-tdep.c m68kly-nat.c \
+ infptrace.c inftarg.c irix4-nat.c isi-xdep.c \
+ lynx-nat.c m3-nat.c \
+ m68k-pinsn.c m68k-tdep.c \
m88k-nat.c m88k-pinsn.c m88k-tdep.c mips-nat.c mips-pinsn.c \
mips-tdep.c mipsm3-nat.c news-xdep.c \
nindy-share/Onindy.c nindy-share/nindy.c \
@@ -1223,6 +1247,10 @@ main.o: main.c $(bfd_h) $(getopt_h) $(readline_headers) call-cmds.h \
maint.o: maint.c $(defs_h) $(gdbcmd_h) $(gdbtypes_h) $(symtab_h) language.h \
$(expression_h)
+mdebugread.o: mdebugread.c buildsym.h complaints.h $(bfd_h) $(defs_h) \
+ $(expression_h) gdb-stabs.h $(gdbcore_h) $(gdbtypes_h) language.h \
+ objfiles.h partial-stab.h stabsread.h symfile.h $(symtab_h)
+
mem-break.o: mem-break.c $(defs_h)
minsyms.o: minsyms.c $(bfd_h) $(defs_h) objfiles.h symfile.h \
diff --git a/gdb/config/a29k/tm-a29k.h b/gdb/config/a29k/tm-a29k.h
index 7d24044..cf5fbca 100644
--- a/gdb/config/a29k/tm-a29k.h
+++ b/gdb/config/a29k/tm-a29k.h
@@ -100,9 +100,11 @@ CORE_ADDR skip_prologue ();
#define INVALID_FLOAT(p, len) 0 /* Just a first guess; not checked */
-/* Say how long (ordinary) registers are. */
+/* Say how long (ordinary) registers are. This is a piece of bogosity
+ used in push_word and a few other places; REGISTER_RAW_SIZE is the
+ real way to know how big a register is. */
-#define REGISTER_TYPE long
+#define REGISTER_SIZE 4
/* Allow the register declarations here to be overridden for remote
kernel debugging. */
diff --git a/gdb/config/h8300/tm-h8300.h b/gdb/config/h8300/tm-h8300.h
index e3de3d5..a0f60c4 100644
--- a/gdb/config/h8300/tm-h8300.h
+++ b/gdb/config/h8300/tm-h8300.h
@@ -93,9 +93,11 @@ extern CORE_ADDR h8300_skip_prologue ();
#define INVALID_FLOAT(p, len) 0 /* Just a first guess; not checked */
-/* Say how long registers are. */
+/* Say how long (ordinary) registers are. This is a piece of bogosity
+ used in push_word and a few other places; REGISTER_RAW_SIZE is the
+ real way to know how big a register is. */
-#define REGISTER_TYPE unsigned short
+#define REGISTER_SIZE 2
#define NUM_REGS 13
diff --git a/gdb/config/h8500/tm-h8500.h b/gdb/config/h8500/tm-h8500.h
index 14d476f..0e4494b 100644
--- a/gdb/config/h8500/tm-h8500.h
+++ b/gdb/config/h8500/tm-h8500.h
@@ -75,9 +75,11 @@ extern CORE_ADDR h8500_skip_prologue ();
#define INVALID_FLOAT(p, len) 0 /* Just a first guess; not checked */
-/* Say how long registers are. */
+/* Say how long (ordinary) registers are. This is a piece of bogosity
+ used in push_word and a few other places; REGISTER_RAW_SIZE is the
+ real way to know how big a register is. */
-#define REGISTER_TYPE unsigned long
+#define REGISTER_SIZE 4
/* Say how much memory is needed to store a copy of the register set */
diff --git a/gdb/config/i386/tm-i386v.h b/gdb/config/i386/tm-i386v.h
index 89c1c61..3f7d650 100644
--- a/gdb/config/i386/tm-i386v.h
+++ b/gdb/config/i386/tm-i386v.h
@@ -84,9 +84,11 @@ i386_skip_prologue PARAMS ((int));
#define INVALID_FLOAT(p, len) (0)
-/* Say how long (ordinary) registers are. */
+/* Say how long (ordinary) registers are. This is a piece of bogosity
+ used in push_word and a few other places; REGISTER_RAW_SIZE is the
+ real way to know how big a register is. */
-#define REGISTER_TYPE long
+#define REGISTER_SIZE 4
/* Number of machine registers */
diff --git a/gdb/config/i386/tm-sun386.h b/gdb/config/i386/tm-sun386.h
index 9c1f6a8..29a1201 100644
--- a/gdb/config/i386/tm-sun386.h
+++ b/gdb/config/i386/tm-sun386.h
@@ -92,9 +92,11 @@ i386_skip_prologue PARAMS ((int));
/* Name of the builtin type for the LONGEST type above. */
#define BUILTIN_TYPE_LONGEST builtin_type_long
-/* Say how long (ordinary) registers are. */
+/* Say how long (ordinary) registers are. This is a piece of bogosity
+ used in push_word and a few other places; REGISTER_RAW_SIZE is the
+ real way to know how big a register is. */
-#define REGISTER_TYPE long
+#define REGISTER_SIZE 4
/* Number of machine registers */
diff --git a/gdb/config/i960/tm-i960.h b/gdb/config/i960/tm-i960.h
index 12f844e..d1513f7 100644
--- a/gdb/config/i960/tm-i960.h
+++ b/gdb/config/i960/tm-i960.h
@@ -73,9 +73,11 @@ extern CORE_ADDR saved_pc_after_call ();
#define INVALID_FLOAT(p, len) (0)
-/* How long (ordinary) registers are */
+/* Say how long (ordinary) registers are. This is a piece of bogosity
+ used in push_word and a few other places; REGISTER_RAW_SIZE is the
+ real way to know how big a register is. */
-#define REGISTER_TYPE long
+#define REGISTER_SIZE 4
/* Number of machine registers */
#define NUM_REGS 40
diff --git a/gdb/config/m68k/tm-m68k.h b/gdb/config/m68k/tm-m68k.h
index 14b71cf..c7f64e0 100644
--- a/gdb/config/m68k/tm-m68k.h
+++ b/gdb/config/m68k/tm-m68k.h
@@ -95,9 +95,11 @@ extern CORE_ADDR m68k_saved_pc_after_call PARAMS ((struct frame_info *));
#define INVALID_FLOAT(p, len) 0 /* Just a first guess; not checked */
-/* Say how long registers are. */
+/* Say how long (ordinary) registers are. This is a piece of bogosity
+ used in push_word and a few other places; REGISTER_RAW_SIZE is the
+ real way to know how big a register is. */
-#define REGISTER_TYPE long
+#define REGISTER_SIZE 4
#define REGISTER_BYTES_FP (16*4 + 8 + 8*12 + 3*4)
#define REGISTER_BYTES_NOFP (16*4 + 8)
diff --git a/gdb/config/m68k/tm-vx68.h b/gdb/config/m68k/tm-vx68.h
index 092045e..23ace23 100644
--- a/gdb/config/m68k/tm-vx68.h
+++ b/gdb/config/m68k/tm-vx68.h
@@ -88,4 +88,4 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Number of registers in a ptrace_getfpregs call. */
#define VX_SIZE_FPREGS (8 * REGISTER_RAW_SIZE (FP0_REGNUM) \
- + (3 * sizeof (REGISTER_TYPE)))
+ + (3 * REGISTER_SIZE))
diff --git a/gdb/config/m88k/tm-m88k.h b/gdb/config/m88k/tm-m88k.h
index 77b902b..9b50dcf 100644
--- a/gdb/config/m88k/tm-m88k.h
+++ b/gdb/config/m88k/tm-m88k.h
@@ -102,9 +102,11 @@ extern CORE_ADDR skip_prologue ();
#define INVALID_FLOAT(p,len) 0
-/* Say how long (ordinary) registers are. */
+/* Say how long (ordinary) registers are. This is a piece of bogosity
+ used in push_word and a few other places; REGISTER_RAW_SIZE is the
+ real way to know how big a register is. */
-#define REGISTER_TYPE long
+#define REGISTER_SIZE 4
/* Number of machine registers */
diff --git a/gdb/config/mips/tm-mips.h b/gdb/config/mips/tm-mips.h
index 916dba3..5bc947f 100644
--- a/gdb/config/mips/tm-mips.h
+++ b/gdb/config/mips/tm-mips.h
@@ -83,9 +83,11 @@ extern int in_sigtramp PARAMS ((CORE_ADDR, char *));
#define INVALID_FLOAT(p,l) 0
-/* Say how long (all) registers are. */
+/* Say how long (ordinary) registers are. This is a piece of bogosity
+ used in push_word and a few other places; REGISTER_RAW_SIZE is the
+ real way to know how big a register is. */
-#define REGISTER_TYPE long
+#define REGISTER_SIZE 4
/* Number of machine registers */
diff --git a/gdb/config/ns32k/tm-merlin.h b/gdb/config/ns32k/tm-merlin.h
index b6d29c1..ec3505c 100644
--- a/gdb/config/ns32k/tm-merlin.h
+++ b/gdb/config/ns32k/tm-merlin.h
@@ -75,9 +75,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#define NS32K_SVC_IMMED_OPERANDS
-/* Say how long (ordinary) registers are. */
+/* Say how long (ordinary) registers are. This is a piece of bogosity
+ used in push_word and a few other places; REGISTER_RAW_SIZE is the
+ real way to know how big a register is. */
-#define REGISTER_TYPE long
+#define REGISTER_SIZE 4
/* Number of machine registers */
diff --git a/gdb/config/ns32k/tm-umax.h b/gdb/config/ns32k/tm-umax.h
index 3e33d25..7847041 100644
--- a/gdb/config/ns32k/tm-umax.h
+++ b/gdb/config/ns32k/tm-umax.h
@@ -87,9 +87,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
NaD (*(double *) p))
#endif /* INVALID_FLOAT */
-/* Say how long (ordinary) registers are. */
+/* Say how long (ordinary) registers are. This is a piece of bogosity
+ used in push_word and a few other places; REGISTER_RAW_SIZE is the
+ real way to know how big a register is. */
-#define REGISTER_TYPE long
+#define REGISTER_SIZE 4
/* Number of machine registers */
diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h
index 3dd646d..23d9fe5 100644
--- a/gdb/config/pa/tm-hppa.h
+++ b/gdb/config/pa/tm-hppa.h
@@ -120,9 +120,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Name of the builtin type for the LONGEST type above. */
#define BUILTIN_TYPE_LONGEST builtin_type_long
-/* Say how long (ordinary) registers are. */
+/* Say how long (ordinary) registers are. This is a piece of bogosity
+ used in push_word and a few other places; REGISTER_RAW_SIZE is the
+ real way to know how big a register is. */
-#define REGISTER_TYPE long
+#define REGISTER_SIZE 4
/* Number of machine registers */
@@ -217,23 +219,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#define MAX_REGISTER_VIRTUAL_SIZE 8
-/* Nonzero if register N requires conversion
- from raw format to virtual format. */
-
-#define REGISTER_CONVERTIBLE(N) 0
-
-/* Convert data from raw format for register REGNUM
- to virtual format for register REGNUM. */
-
-#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM, FROM, TO) \
-{ memcpy ((TO), (FROM), (REGNUM) < FP4_REGNUM ? 4 : 8); }
-
-/* Convert data from virtual format for register REGNUM
- to raw format for register REGNUM. */
-
-#define REGISTER_CONVERT_TO_RAW(REGNUM, FROM, TO) \
-{ memcpy ((TO), (FROM), (REGNUM) < FP4_REGNUM ? 4 : 8); }
-
/* Return the GDB type object for the "standard" data type
of data in register N. */
@@ -257,8 +242,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
of type TYPE, given in virtual format. */
#define STORE_RETURN_VALUE(TYPE,VALBUF) \
- write_register_bytes (TYPE_LENGTH(TYPE) > 4 ? FP4_REGNUM :28, \
- VALBUF, TYPE_LENGTH (TYPE))
+ write_register_bytes ((TYPE_LENGTH(TYPE) > 4 \
+ ? REGISTER_BYTE (FP4_REGNUM) \
+ : REGISTER_BYTE (28)), \
+ (VALBUF), TYPE_LENGTH (TYPE))
/* Extract from an array REGBUF containing the (raw) register state
the address in which a function should return its structure value,
@@ -565,5 +552,8 @@ struct obj_unwind_info {
#define OBJ_UNWIND_INFO(obj) ((struct obj_unwind_info *)obj->obj_private)
+extern CORE_ADDR target_read_pc PARAMS ((void));
+extern void target_write_pc PARAMS ((CORE_ADDR));
+
#define TARGET_READ_PC() target_read_pc ()
#define TARGET_WRITE_PC(v) target_write_pc (v)
diff --git a/gdb/config/sh/tm-sh.h b/gdb/config/sh/tm-sh.h
index 21d7a4a..b5987e1 100644
--- a/gdb/config/sh/tm-sh.h
+++ b/gdb/config/sh/tm-sh.h
@@ -72,8 +72,11 @@ extern CORE_ADDR sh_skip_prologue ();
#define INVALID_FLOAT(p, len) 0 /* Just a first guess; not checked */
-/* Say how long registers are. */
-#define REGISTER_TYPE long
+/* Say how long (ordinary) registers are. This is a piece of bogosity
+ used in push_word and a few other places; REGISTER_RAW_SIZE is the
+ real way to know how big a register is. */
+
+#define REGISTER_SIZE 4
/* Say how much memory is needed to store a copy of the register set */
#define REGISTER_BYTES (NUM_REGS*4)
diff --git a/gdb/config/sparc/tm-sparc.h b/gdb/config/sparc/tm-sparc.h
index 960ab75..b71f7f2 100644
--- a/gdb/config/sparc/tm-sparc.h
+++ b/gdb/config/sparc/tm-sparc.h
@@ -126,9 +126,11 @@ extern CORE_ADDR sparc_pc_adjust();
#define INVALID_FLOAT(p, len) 0 /* Just a first guess; not checked */
-/* Say how long (ordinary) registers are. */
+/* Say how long (ordinary) registers are. This is a piece of bogosity
+ used in push_word and a few other places; REGISTER_RAW_SIZE is the
+ real way to know how big a register is. */
-#define REGISTER_TYPE long
+#define REGISTER_SIZE 4
/* Number of machine registers */
diff --git a/gdb/config/vax/tm-vax.h b/gdb/config/vax/tm-vax.h
index 6d39f75..1671870 100644
--- a/gdb/config/vax/tm-vax.h
+++ b/gdb/config/vax/tm-vax.h
@@ -89,9 +89,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#define INVALID_FLOAT(p, len) ((*(short *) p & 0xff80) == 0x8000)
-/* Say how long (ordinary) registers are. */
+/* Say how long (ordinary) registers are. This is a piece of bogosity
+ used in push_word and a few other places; REGISTER_RAW_SIZE is the
+ real way to know how big a register is. */
-#define REGISTER_TYPE long
+#define REGISTER_SIZE 4
/* Number of machine registers */
diff --git a/gdb/config/z8k/tm-z8k.h b/gdb/config/z8k/tm-z8k.h
index b735973..722c1af 100644
--- a/gdb/config/z8k/tm-z8k.h
+++ b/gdb/config/z8k/tm-z8k.h
@@ -69,9 +69,11 @@ extern CORE_ADDR mz8k_skip_prologue PARAMS ((CORE_ADDR ip));
#define INVALID_FLOAT(p, len) 0 /* Just a first guess; not checked */
-/* Say how long registers are. */
+/* Say how long (ordinary) registers are. This is a piece of bogosity
+ used in push_word and a few other places; REGISTER_RAW_SIZE is the
+ real way to know how big a register is. */
-#define REGISTER_TYPE unsigned int
+#define REGISTER_SIZE 4
#define NUM_REGS 23 /* 16 registers + 1 ccr + 1 pc + 3 debug
regs + fake fp + fake sp*/
diff --git a/gdb/convex-xdep.c b/gdb/convex-xdep.c
index 794a934..7dbac6f 100644
--- a/gdb/convex-xdep.c
+++ b/gdb/convex-xdep.c
@@ -193,7 +193,7 @@ static struct type *vector_type ();
static long *read_vector_register ();
static long *read_vector_register_1 ();
static void write_vector_register ();
-static REGISTER_TYPE read_comm_register ();
+static unsigned LONGEST read_comm_register ();
static void write_comm_register ();
static void convex_cont_command ();
static void thread_continue ();
@@ -442,7 +442,7 @@ read_vector_register_1 (reg)
static void
write_vector_register (reg, element, val)
int reg, element;
- REGISTER_TYPE val;
+ unsigned LONGEST val;
{
if (have_inferior_p ())
{
@@ -481,7 +481,7 @@ write_vector_register (reg, element, val)
/* Return the contents of communication register NUM. */
-static REGISTER_TYPE
+static unsigned LONGEST
read_comm_register (num)
int num;
{
@@ -503,7 +503,7 @@ read_comm_register (num)
static void
write_comm_register (num, val)
int num;
- REGISTER_TYPE val;
+ unsigned LONGEST val;
{
if (have_inferior_p ())
{
diff --git a/gdb/defs.h b/gdb/defs.h
index 8508f27..15060a6 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -893,13 +893,8 @@ void store_floating PARAMS ((void *, int, double));
extern CORE_ADDR
push_bytes PARAMS ((CORE_ADDR, char *, int));
-/* In some modules, we don't have a definition of REGISTER_TYPE yet, so we
- must avoid prototyping this function for now. FIXME. Should be:
extern CORE_ADDR
-push_word PARAMS ((CORE_ADDR, REGISTER_TYPE));
- */
-extern CORE_ADDR
-push_word ();
+push_word PARAMS ((CORE_ADDR, unsigned LONGEST));
/* Some parts of gdb might be considered optional, in the sense that they
are not essential for being able to build a working, usable debugger
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index e8ee10d..93509b6 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -961,7 +961,7 @@ hppa_push_arguments (nargs, args, sp, struct_return, struct_addr)
CORE_ADDR
hppa_fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p)
- REGISTER_TYPE *dummy;
+ char *dummy;
CORE_ADDR pc;
CORE_ADDR fun;
int nargs;
@@ -985,10 +985,30 @@ hppa_fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p)
sr4export_addr = SYMBOL_VALUE_ADDRESS (msymbol);
- dummy[9] = deposit_21 (fun >> 11, dummy[9]);
- dummy[10] = deposit_14 (fun & MASK_11, dummy[10]);
- dummy[12] = deposit_21 (sr4export_addr >> 11, dummy[12]);
- dummy[13] = deposit_14 (sr4export_addr & MASK_11, dummy[13]);
+ store_unsigned_integer
+ (&dummy[9*REGISTER_SIZE],
+ REGISTER_SIZE,
+ deposit_21 (fun >> 11,
+ extract_unsigned_integer (&dummy[9*REGISTER_SIZE],
+ REGISTER_SIZE)));
+ store_unsigned_integer
+ (&dummy[10*REGISTER_SIZE],
+ REGISTER_SIZE,
+ deposit_14 (fun & MASK_11,
+ extract_unsigned_integer (&dummy[10*REGISTER_SIZE],
+ REGISTER_SIZE)));
+ store_unsigned_integer
+ (&dummy[12*REGISTER_SIZE],
+ REGISTER_SIZE,
+ deposit_21 (sr4export_addr >> 11,
+ extract_unsigned_integer (&dummy[12*REGISTER_SIZE],
+ REGISTER_SIZE)));
+ store_unsigned_integer
+ (&dummy[13*REGISTER_SIZE],
+ REGISTER_SIZE,
+ deposit_14 (sr4export_addr & MASK_11,
+ extract_unsigned_integer (&dummy[13*REGISTER_SIZE],
+ REGISTER_SIZE)));
write_register (22, pc);
@@ -1115,7 +1135,6 @@ pa_print_fp_reg (i)
{
unsigned char raw_buffer[MAX_REGISTER_RAW_SIZE];
unsigned char virtual_buffer[MAX_REGISTER_VIRTUAL_SIZE];
- REGISTER_TYPE val;
/* Get the data in raw format. */
read_relative_register_raw_bytes (i, raw_buffer);
diff --git a/gdb/i386m3-nat.c b/gdb/i386m3-nat.c
index 2ab37c5..7f1d47b 100644
--- a/gdb/i386m3-nat.c
+++ b/gdb/i386m3-nat.c
@@ -87,13 +87,13 @@ static int reg_offset[] =
#define FETCH_REGS(state, regnum, count) \
memcpy (&registers[REGISTER_BYTE (regnum)], \
REG_ADDRESS (state, regnum), \
- count*sizeof (REGISTER_TYPE))
+ count*REGISTER_SIZE)
/* Store COUNT contiguous registers to thread STATE starting from REGNUM */
#define STORE_REGS(state, regnum, count) \
memcpy (REG_ADDRESS (state, regnum), \
&registers[REGISTER_BYTE (regnum)], \
- count*sizeof (REGISTER_TYPE))
+ count*REGISTER_SIZE)
/*
* Fetch inferiors registers for gdb.
diff --git a/gdb/m88k-nat.c b/gdb/m88k-nat.c
index b574651..b16c523 100644
--- a/gdb/m88k-nat.c
+++ b/gdb/m88k-nat.c
@@ -211,7 +211,8 @@ m88k_register_u_addr (blockend, regnum)
case 28:
case 29:
case 30:
- case 31: return (ustart + ((int) &u.pt_r0 - (int) &u) + sizeof(REGISTER_TYPE) * regnum);
+ case 31:
+ return (ustart + ((int) &u.pt_r0 - (int) &u) + REGISTER_SIZE * regnum);
case PSR_REGNUM: return (ustart + ((int) &u.pt_psr - (int) &u));
case FPSR_REGNUM: return (ustart + ((int) &u.pt_fpsr - (int) &u));
case FPCR_REGNUM: return (ustart + ((int) &u.pt_fpcr - (int) &u));
@@ -224,7 +225,7 @@ m88k_register_u_addr (blockend, regnum)
give it zero */
return (ustart + ((int) &u.pt_r0 - (int) &u));
else
- return (blockend + sizeof (REGISTER_TYPE) * regnum);
+ return (blockend + REGISTER_SIZE * regnum);
}
}
diff --git a/gdb/m88k-tdep.c b/gdb/m88k-tdep.c
index 0ef524c..a932e4c 100644
--- a/gdb/m88k-tdep.c
+++ b/gdb/m88k-tdep.c
@@ -768,9 +768,9 @@ collect_returned_value (rval, value_type, struct_return, nargs, args)
static void
write_word (sp, word)
CORE_ADDR sp;
- REGISTER_TYPE word;
+ unsigned LONGEST word;
{
- register int len = sizeof (REGISTER_TYPE);
+ register int len = REGISTER_SIZE;
char buffer[MAX_REGISTER_RAW_SIZE];
store_unsigned_integer (buffer, len, word);
diff --git a/gdb/mipsm3-nat.c b/gdb/mipsm3-nat.c
index 34434a6..04f8139 100644
--- a/gdb/mipsm3-nat.c
+++ b/gdb/mipsm3-nat.c
@@ -122,13 +122,13 @@ static int reg_offset[] =
#define FETCH_REGS(state, regnum, count) \
memcpy (&registers[REGISTER_BYTE (regnum)], \
(char *)state+reg_offset[ regnum ], \
- count*sizeof (REGISTER_TYPE))
+ count*REGISTER_SIZE)
/* Store COUNT contiguous registers to thread STATE starting from REGNUM */
#define STORE_REGS(state, regnum, count) \
memcpy ((char *)state+reg_offset[ regnum ], \
&registers[REGISTER_BYTE (regnum)], \
- count*sizeof (REGISTER_TYPE))
+ count*REGISTER_SIZE)
#define REGS_ALL -1
#define REGS_NORMAL 1
diff --git a/gdb/ns32km3-nat.c b/gdb/ns32km3-nat.c
index 4002e45..e652402 100644
--- a/gdb/ns32km3-nat.c
+++ b/gdb/ns32km3-nat.c
@@ -60,13 +60,13 @@ static int reg_offset[] =
#define FETCH_REGS(state, regnum, count) \
memcpy (&registers[REGISTER_BYTE (regnum)], \
(char *)state+reg_offset[ regnum ], \
- count*sizeof (REGISTER_TYPE))
+ count*REGISTER_SIZE)
/* Store COUNT contiguous registers to thread STATE starting from REGNUM */
#define STORE_REGS(state, regnum, count) \
memcpy ((char *)state+reg_offset[ regnum ], \
&registers[REGISTER_BYTE (regnum)], \
- count*sizeof (REGISTER_TYPE))
+ count*REGISTER_SIZE)
/* 4.4 bfd support function */
/* jtv@hut.fi: UNIMPLEMENTED!!!!! */
diff --git a/gdb/remote-bug.c b/gdb/remote-bug.c
index e1f3603..a1806fc 100644
--- a/gdb/remote-bug.c
+++ b/gdb/remote-bug.c
@@ -425,8 +425,6 @@ static void
bug_fetch_register(regno)
int regno;
{
- REGISTER_TYPE regval;
-
sr_check_open();
if (regno == -1)
@@ -444,12 +442,15 @@ bug_fetch_register(regno)
}
else if (regno < XFP_REGNUM)
{
- sr_write("rs ", 3);
- sr_write_cr(get_reg_name(regno));
- sr_expect("=");
- regval = sr_get_hex_word();
- gr_expect_prompt();
- supply_register(regno, (char *) &regval);
+ char buffer[MAX_REGISTER_RAW_SIZE];
+
+ sr_write ("rs ", 3);
+ sr_write_cr (get_reg_name(regno));
+ sr_expect ("=");
+ store_unsigned_integer (buffer, REGISTER_RAW_SIZE (regno),
+ sr_get_hex_word());
+ gr_expect_prompt ();
+ supply_register (regno, buffer);
}
else
{
diff --git a/gdb/remote-hms.c b/gdb/remote-hms.c
index 2761104..4a76d3d 100644
--- a/gdb/remote-hms.c
+++ b/gdb/remote-hms.c
@@ -868,7 +868,7 @@ hms_fetch_register (dummy)
int s;
int gottok;
- REGISTER_TYPE reg[NUM_REGS];
+ unsigned LONGEST reg[NUM_REGS];
int foo[8];
check_open ();
diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c
index 5322e76..7425eaf 100644
--- a/gdb/remote-mips.c
+++ b/gdb/remote-mips.c
@@ -1045,7 +1045,7 @@ static void
mips_fetch_registers (regno)
int regno;
{
- REGISTER_TYPE val;
+ unsigned LONGEST val;
int err;
if (regno == -1)
diff --git a/gdb/remote-vx.c b/gdb/remote-vx.c
index e49d0ed..a45f24f 100644
--- a/gdb/remote-vx.c
+++ b/gdb/remote-vx.c
@@ -459,7 +459,7 @@ vx_write_register (regno)
in_data.bytes = registers;
- in_data.len = VX_NUM_REGS * sizeof (REGISTER_TYPE);
+ in_data.len = VX_NUM_REGS * REGISTER_SIZE;
/* XXX change second param to be a proc number */
status = net_ptrace_clnt_call (PTRACE_SETREGS, &ptrace_in, &ptrace_out);