summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-01-31 20:43:54 +0000
committerAndrew Cagney <cagney@redhat.com>2003-01-31 20:43:54 +0000
commitcc74b1fc787847c9a9b1a7ea34b678a5991085cd (patch)
tree396cb6bb732d6b484b0c742184b280ae8b19960f
parent9e603196aafc38e44b3564e8aa5ffe37f78e0abd (diff)
downloadgdb-cc74b1fc787847c9a9b1a7ea34b678a5991085cd.tar.gz
2003-01-31 Andrew Cagney <ac131313@redhat.com>
* config/djgpp/fnchange.lst: Delete nindy files. * nindy-share/ttyflush.c, nindy-share/stop.h: Delete files. * nindy-share/nindy.c, nindy-share/env.h: Delete files. * nindy-share/coff.h, nindy-share/block_io.h: Delete files. * nindy-share/b.out.h, nindy-share/VERSION: Delete files. * nindy-share/README, nindy-share/Onindy.c: Delete files. * nindy-tdep.c, nindy-share/Makefile: Delete files. * Makefile.in (init.c): Remove nindy references. (saber_gdb): Delete rule. (ALLDEPFILES): Delete hp300ux-nat.c, nindy-tdep.c, nindy-share/Onindy.c, nindy-share/nindy.c, nindy-share/ttyflush.c, and a68v-nat.c. (hp300ux-nat.o, a68v-nat.o, ptx4-nat.o): Delete rules. (Onindy.o, nindy.o, ttyflush.o, nindy-tdep.o): Delete rules. (HFILES_NO_SRCDIR): Delete nindy-share/b.out.h, nindy-share/block_io.h, nindy-share/coff.h, nindy-share/env.h, and nindy-share/stop.h. * hp300ux-nat.c, a68v-nat.c, ptx4-nat.c: Delete files. * saber.suppress: Delete file.
-rw-r--r--gdb/ChangeLog22
-rw-r--r--gdb/Makefile.in61
-rw-r--r--gdb/a68v-nat.c128
-rw-r--r--gdb/config/djgpp/fnchange.lst2
-rw-r--r--gdb/hp300ux-nat.c226
-rw-r--r--gdb/nindy-share/Makefile117
-rw-r--r--gdb/nindy-share/Onindy.c743
-rw-r--r--gdb/nindy-share/README3
-rw-r--r--gdb/nindy-share/VERSION1
-rw-r--r--gdb/nindy-share/b.out.h158
-rw-r--r--gdb/nindy-share/block_io.h68
-rw-r--r--gdb/nindy-share/coff.h336
-rw-r--r--gdb/nindy-share/env.h12
-rw-r--r--gdb/nindy-share/nindy.c1154
-rw-r--r--gdb/nindy-share/stop.h86
-rw-r--r--gdb/nindy-share/ttyflush.c48
-rw-r--r--gdb/nindy-tdep.c78
-rw-r--r--gdb/ptx4-nat.c211
-rw-r--r--gdb/saber.suppress451
19 files changed, 25 insertions, 3880 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 696fbcdf693..47ca1dfd222 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,25 @@
+2003-01-31 Andrew Cagney <ac131313@redhat.com>
+
+ * config/djgpp/fnchange.lst: Delete nindy files.
+ * nindy-share/ttyflush.c, nindy-share/stop.h: Delete files.
+ * nindy-share/nindy.c, nindy-share/env.h: Delete files.
+ * nindy-share/coff.h, nindy-share/block_io.h: Delete files.
+ * nindy-share/b.out.h, nindy-share/VERSION: Delete files.
+ * nindy-share/README, nindy-share/Onindy.c: Delete files.
+ * nindy-tdep.c, nindy-share/Makefile: Delete files.
+ * Makefile.in (init.c): Remove nindy references.
+ (saber_gdb): Delete rule.
+ (ALLDEPFILES): Delete hp300ux-nat.c, nindy-tdep.c,
+ nindy-share/Onindy.c, nindy-share/nindy.c, nindy-share/ttyflush.c,
+ and a68v-nat.c.
+ (hp300ux-nat.o, a68v-nat.o, ptx4-nat.o): Delete rules.
+ (Onindy.o, nindy.o, ttyflush.o, nindy-tdep.o): Delete rules.
+ (HFILES_NO_SRCDIR): Delete nindy-share/b.out.h,
+ nindy-share/block_io.h, nindy-share/coff.h, nindy-share/env.h, and
+ nindy-share/stop.h.
+ * hp300ux-nat.c, a68v-nat.c, ptx4-nat.c: Delete files.
+ * saber.suppress: Delete file.
+
2003-01-31 Daniel Jacobowitz <drow@mvista.com>
* dbxread.c (stabs_data): New static variable.
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index d7c6a06fc94..8eee1c269d2 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -780,9 +780,6 @@ HFILES_NO_SRCDIR = bcache.h buildsym.h call-cmds.h coff-solib.h defs.h \
jv-lang.h \
m2-lang.h p-lang.h \
complaints.h valprint.h \
- nindy-share/b.out.h \
- nindy-share/block_io.h nindy-share/coff.h \
- nindy-share/env.h nindy-share/stop.h \
vx-share/dbgRpcLib.h vx-share/ptrace.h vx-share/vxTypes.h \
vx-share/vxWorks.h vx-share/wait.h vx-share/xdr_ld.h \
vx-share/xdr_ptrace.h vx-share/xdr_rdb.h gdbthread.h \
@@ -960,10 +957,8 @@ init.c: $(INIT_FILES)
@rm -f init.c-tmp init.l-tmp
@-echo $(INIT_FILES) | \
tr ' ' '\012' | \
- sed -e '/^Onindy.o/d' \
+ sed \
-e '/^init.o/d' \
- -e '/^nindy.o/d' \
- -e '/ttyflush.o/d' \
-e '/xdr_ld.o/d' \
-e '/xdr_ptrace.o/d' \
-e '/xdr_rdb.o/d' \
@@ -1016,31 +1011,6 @@ libgdb.a: $(LIBGDB_OBS)
$(AR) q libgdb.a $(LIBGDB_OBS)
$(RANLIB) libgdb.a
-saber_gdb: $(SFILES) $(DEPFILES) copying.c version.c
- #setopt load_flags $(CFLAGS) $(BFD_CFLAGS) -DHOST_SYS=SUN4_SYS
- #load ./init.c $(SFILES)
- #unload $(srcdir)/c-exp.y
- #unload $(srcdir)/jv-exp.y
- #unload $(srcdir)/m2-exp.y
- #unload $(srcdir)/p-exp.y
- #unload vx-share/*.h
- #unload nindy-share/[A-Z]*
- #load c-exp.tab.c
- #load jv-exp.tab.c
- #load m2-exp.tab.c
- #load p-exp.tab.c
- #load copying.c version.c
- #load ../opcodes/libopcodes.a
- #load ../libiberty/libiberty.a
- #load ../bfd/libbfd.a
- #load ../readline/libreadline.a
- #load ../mmalloc/libmmalloc.a
- #load ../intl/libintl.a
- #load -ltermcap
- #load `echo " "$(DEPFILES) | sed -e 's/\.o/.c/g' -e 's, , ../,g'`
- echo "Load .c corresponding to:" $(DEPFILES)
-
-
# A Mach 3.0 program to force gdb back to command level
stop-gdb: stop-gdb.o
@@ -1344,7 +1314,7 @@ force_update:
# will remove them.
MAKEOVERRIDES=
-ALLDEPFILES = a68v-nat.c \
+ALLDEPFILES = \
aix-thread.c \
alpha-nat.c alphabsd-nat.c \
alpha-tdep.c alpha-linux-tdep.c alphabsd-tdep.c alphanbsd-tdep.c \
@@ -1356,7 +1326,7 @@ ALLDEPFILES = a68v-nat.c \
core-sol2.c core-regset.c core-aout.c corelow.c \
dcache.c delta68-nat.c dpx2-nat.c exec.c fork-child.c \
go32-nat.c h8300-tdep.c h8500-tdep.c \
- hp300ux-nat.c hppa-tdep.c hppa-hpux-tdep.c \
+ hppa-tdep.c hppa-hpux-tdep.c \
hppab-nat.c hppah-nat.c hpread.c \
i386-tdep.c i386b-nat.c i386v-nat.c i386-linux-nat.c \
i386v4-nat.c i386ly-tdep.c \
@@ -1376,8 +1346,6 @@ ALLDEPFILES = a68v-nat.c \
mips-tdep.c mipsm3-nat.c mipsv4-nat.c \
mipsnbsd-nat.c mipsnbsd-tdep.c \
nbsd-tdep.c \
- nindy-share/Onindy.c nindy-share/nindy.c \
- nindy-share/ttyflush.c nindy-tdep.c \
ns32k-tdep.c solib-osf.c \
somread.c somsolib.c $(HPREAD_SOURCE) \
ppc-sysv-tdep.o ppc-linux-nat.c ppc-linux-tdep.c \
@@ -1483,7 +1451,6 @@ ada-exp.tab.o: ada-exp.tab.c ada-lex.c ada-lang.h \
# The dependencies. In aphabetic order.
#
-a68v-nat.o: a68v-nat.c $(defs_h) $(inferior_h) $(regcache_h)
abug-rom.o: abug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
$(serial_h) $(regcache_h) $(m68k_tdep_h)
ada-lang.o: ada-lang.c $(gdb_string_h) $(demangle_h) $(defs_h) $(symtab_h) \
@@ -1735,8 +1702,6 @@ h8300-tdep.o: h8300-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(dis_asm_h) \
$(regcache_h)
h8500-tdep.o: h8500-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(gdbtypes_h) \
$(gdbcmd_h) $(value_h) $(dis_asm_h) $(gdbcore_h) $(regcache_h)
-hp300ux-nat.o: hp300ux-nat.c $(defs_h) $(frame_h) $(inferior_h) \
- $(regcache_h)
hpacc-abi.o: hpacc-abi.c $(defs_h) $(value_h) $(gdb_regex_h) $(gdb_string_h) \
$(gdbtypes_h) $(gdbcore_h) $(cp_abi_h)
hppa-tdep.o: hppa-tdep.c $(defs_h) $(frame_h) $(bfd_h) $(inferior_h) \
@@ -1957,7 +1922,6 @@ monitor.o: monitor.c $(defs_h) $(gdbcore_h) $(target_h) $(gdb_string_h) \
$(command_h) $(serial_h) $(monitor_h) $(gdbcmd_h) $(inferior_h) \
$(gdb_regex_h) $(srec_h) $(regcache_h)
nbsd-tdep.o: nbsd-tdep.c $(defs_h) $(gdb_string_h) $(solib_svr4_h)
-nindy-tdep.o: nindy-tdep.c $(defs_h) $(symtab_h) $(frame_h) $(gdbcore_h)
nlmread.o: nlmread.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \
$(objfiles_h) $(buildsym_h) $(stabsread_h)
ns32k-tdep.o: ns32k-tdep.c $(defs_h) $(frame_h) $(gdbtypes_h) $(gdbcore_h) \
@@ -2033,8 +1997,6 @@ proc-why.o: proc-why.c $(defs_h) $(proc_utils_h)
procfs.o: procfs.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
$(elf_bfd_h) $(gdbcmd_h) $(gdbthread_h) $(gdb_dirent_h) $(X_OK) \
$(gdb_stat_h) $(proc_utils_h) $(gregset_h)
-ptx4-nat.o: ptx4-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_h) \
- $(gregset_h)
regcache.o: regcache.c $(defs_h) $(inferior_h) $(target_h) $(gdbarch_h) \
$(gdbcmd_h) $(regcache_h) $(reggroups_h) $(gdb_assert_h) \
$(gdb_string_h) $(gdbcmd_h)
@@ -2546,23 +2508,6 @@ mi-parse.o: $(srcdir)/mi/mi-parse.c $(defs_h) $(mi_cmds_h) $(mi_parse_h) \
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-parse.c
#
-# nindy-share sub-directory
-#
-# Need to explicitly specify the compile rule as make will do nothing
-# or try to compile the object file into the mi directory.
-
-Onindy.o: nindy-share/Onindy.c $(gdb_wait_h) nindy-share/block_io.h \
- nindy-share/env.h
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/nindy-share/Onindy.c
-
-nindy.o: nindy-share/nindy.c $(gdb_wait_h) nindy-share/block_io.h \
- nindy-share/env.h
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/nindy-share/nindy.c
-
-ttyflush.o: nindy-share/ttyflush.c $(srcdir)/nindy-share/ttyflush.c
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/nindy-share/ttyflush.c
-
-#
# rdi-share sub-directory
#
# Need to explicitly specify the compile rule as make will do nothing
diff --git a/gdb/a68v-nat.c b/gdb/a68v-nat.c
deleted file mode 100644
index 0bfe8e2e608..00000000000
--- a/gdb/a68v-nat.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/* Host-dependent code for Apollo-68ks for GDB, the GNU debugger.
- Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1999, 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. */
-
-#include "defs.h"
-#include "inferior.h"
-#include "regcache.h"
-
-#ifndef _ISP__M68K
-#define _ISP__M68K 1
-#endif
-
-#include <ptrace.h>
-
-extern int errno;
-
-void
-fetch_inferior_registers (int ignored)
-{
- struct ptrace_$data_regs_m68k inferior_registers;
- struct ptrace_$floating_regs_m68k inferior_fp_registers;
- struct ptrace_$control_regs_m68k inferior_control_registers;
-
- ptrace_$init_control (&inferior_control_registers);
- inferior_fp_registers.size = sizeof (inferior_fp_registers);
-
- deprecated_registers_fetched ();
-
- ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_registers,
- ptrace_$data_set,
- (PTRACE_ARG3_TYPE) & inferior_registers,
- ptrace_$data_set);
-
- ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_fp_registers,
- ptrace_$floating_set_m68k,
- (PTRACE_ARG3_TYPE) & inferior_fp_registers,
- ptrace_$floating_set_m68k);
-
- ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_control_registers,
- ptrace_$control_set_m68k,
- (PTRACE_ARG3_TYPE) & inferior_control_registers,
- ptrace_$control_set_m68k);
-
- bcopy (&inferior_registers, &deprecated_registers[0], 16 * 4);
- bcopy (&inferior_fp_registers,
- &deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
- sizeof inferior_fp_registers.regs);
- *(int *) &deprecated_registers[REGISTER_BYTE (PS_REGNUM)]
- = inferior_control_registers.sr;
- *(int *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)]
- = inferior_control_registers.pc;
-}
-
-/* Store our register values back into the inferior.
- If REGNO is -1, do this for all registers.
- Otherwise, REGNO specifies which register (so we can save time). */
-
-void
-store_inferior_registers (int regno)
-{
- struct ptrace_$data_regs_m68k inferior_registers;
- struct ptrace_$floating_regs_m68k inferior_fp_registers;
- struct ptrace_$control_regs_m68k inferior_control_registers;
-
- ptrace_$init_control (&inferior_control_registers);
- inferior_fp_registers.size = sizeof (inferior_fp_registers);
-
- ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_fp_registers,
- ptrace_$floating_set_m68k,
- (PTRACE_ARG3_TYPE) & inferior_fp_registers,
- ptrace_$floating_set_m68k);
-
- ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_control_registers,
- ptrace_$control_set_m68k,
- (PTRACE_ARG3_TYPE) & inferior_control_registers,
- ptrace_$control_set_m68k);
-
- bcopy (&deprecated_registers[0], &inferior_registers,
- sizeof (inferior_registers));
-
- bcopy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
- inferior_fp_registers.regs, sizeof inferior_fp_registers.regs);
-
- inferior_control_registers.sr
- = *(int *) &deprecated_registers[REGISTER_BYTE (PS_REGNUM)];
- inferior_control_registers.pc
- = *(int *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)];
-
- ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_registers,
- ptrace_$data_set_m68k,
- (PTRACE_ARG3_TYPE) & inferior_registers,
- ptrace_$data_set_m68k);
-
- ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_fp_registers,
- ptrace_$floating_set_m68k,
- (PTRACE_ARG3_TYPE) & inferior_fp_registers,
- ptrace_$floating_set_m68k);
-
- ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_control_registers,
- ptrace_$control_set_m68k,
- (PTRACE_ARG3_TYPE) & inferior_control_registers,
- ptrace_$control_set_m68k);
-}
diff --git a/gdb/config/djgpp/fnchange.lst b/gdb/config/djgpp/fnchange.lst
index 151c47a41fa..5792b35439a 100644
--- a/gdb/config/djgpp/fnchange.lst
+++ b/gdb/config/djgpp/fnchange.lst
@@ -157,7 +157,6 @@
@V@/gdb/mips-linux-tdep.c @V@/gdb/mipslnxtdep.c
@V@/gdb/mipsnbsd-nat.c @V@/gdb/mipsnbnat.c
@V@/gdb/mipsnbsd-tdep.c @V@/gdb/mipsnbtdep.c
-@V@/gdb/nindy-share/b.out.h @V@/gdb/nindy-share/b_out.h
@V@/gdb/ns32knbsd-nat.c @V@/gdb/ns32nb-nat.c
@V@/gdb/ns32knbsd-tdep.c @V@/gdb/ns32nb-tdep.c
@V@/gdb/objc-exp.tab.c @V@/gdb/objc-exp_tab.c
@@ -175,7 +174,6 @@
@V@/gdb/remote-est.c @V@/gdb/rmt-est.c
@V@/gdb/remote-mips.c @V@/gdb/emt-mips.c
@V@/gdb/remote-mm.c @V@/gdb/emt-mm.c
-@V@/gdb/remote-nindy.c @V@/gdb/rmt-nindy.c
@V@/gdb/remote-nrom.c @V@/gdb/rmt-nrom.c
@V@/gdb/remote-rdi.c @V@/gdb/rmt-rdi.c
@V@/gdb/remote-rdp.c @V@/gdb/rmt-rdp.c
diff --git a/gdb/hp300ux-nat.c b/gdb/hp300ux-nat.c
deleted file mode 100644
index 7ef3e34c9e9..00000000000
--- a/gdb/hp300ux-nat.c
+++ /dev/null
@@ -1,226 +0,0 @@
-/* HP/UX native interface for HP 300's, for GDB when running under Unix.
- Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1996, 1999, 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. */
-
-#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
-#include <sys/param.h>
-#include <signal.h>
-#include <sys/user.h>
-#include <fcntl.h>
-
-#include <sys/ptrace.h>
-#include <sys/reg.h>
-#include <sys/trap.h>
-
-#include <sys/file.h>
-
-static void fetch_inferior_register (int, unsigned int);
-
-static void store_inferior_register_1 (int, unsigned int, int);
-
-static void store_inferior_register (int, unsigned int);
-
-/* Get kernel_u_addr using HPUX-style nlist(). */
-CORE_ADDR kernel_u_addr;
-
-struct hpnlist
- {
- char *n_name;
- long n_value;
- unsigned char n_type;
- unsigned char n_length;
- short n_almod;
- short n_unused;
- };
-static struct hpnlist nl[] =
-{
- {"_u", -1,},
- {(char *) 0,}};
-
-/* read the value of the u area from the hp-ux kernel */
-void
-_initialize_hp300ux_nat (void)
-{
-#ifndef HPUX_VERSION_5
- nlist ("/hp-ux", nl);
- kernel_u_addr = nl[0].n_value;
-#else /* HPUX version 5. */
- kernel_u_addr = (CORE_ADDR) 0x0097900;
-#endif
-}
-
-#define INFERIOR_AR0(u) \
- ((ptrace \
- (PT_RUAREA, PIDGET (inferior_ptid), \
- (PTRACE_ARG3_TYPE) ((char *) &u.u_ar0 - (char *) &u), 0, 0)) \
- - kernel_u_addr)
-
-static void
-fetch_inferior_register (register int regno, register unsigned int regaddr)
-{
-#ifndef HPUX_VERSION_5
- if (regno == PS_REGNUM)
- {
- union
- {
- int i;
- short s[2];
- }
- ps_val;
- int regval;
-
- ps_val.i = (ptrace (PT_RUAREA, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) regaddr, 0, 0));
- regval = ps_val.s[0];
- supply_register (regno, (char *) &regval);
- }
- else
-#endif /* not HPUX_VERSION_5 */
- {
- char buf[MAX_REGISTER_RAW_SIZE];
- register int i;
-
- for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
- {
- *(int *) &buf[i] = ptrace (PT_RUAREA, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) regaddr, 0, 0);
- regaddr += sizeof (int);
- }
- supply_register (regno, buf);
- }
- return;
-}
-
-static void
-store_inferior_register_1 (int regno, unsigned int regaddr, int val)
-{
- errno = 0;
- ptrace (PT_WUAREA, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr,
- val, 0);
-#if 0
- /* HP-UX randomly sets errno to non-zero for regno == 25.
- However, the value is correctly written, so ignore errno. */
- if (errno != 0)
- {
- char string_buf[64];
-
- sprintf (string_buf, "writing register number %d", regno);
- perror_with_name (string_buf);
- }
-#endif
- return;
-}
-
-static void
-store_inferior_register (register int regno, register unsigned int regaddr)
-{
-#ifndef HPUX_VERSION_5
- if (regno == PS_REGNUM)
- {
- union
- {
- int i;
- short s[2];
- }
- ps_val;
-
- ps_val.i = (ptrace (PT_RUAREA, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) regaddr, 0, 0));
- ps_val.s[0] = (read_register (regno));
- store_inferior_register_1 (regno, regaddr, ps_val.i);
- }
- else
-#endif /* not HPUX_VERSION_5 */
- {
- register int i;
-
- for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
- {
- store_inferior_register_1
- (regno, regaddr,
- (*(int *) &deprecated_registers[(REGISTER_BYTE (regno)) + i]));
- regaddr += sizeof (int);
- }
- }
- return;
-}
-
-void
-fetch_inferior_registers (int regno)
-{
- struct user u;
- register unsigned int ar0_offset;
-
- ar0_offset = (INFERIOR_AR0 (u));
- if (regno == -1)
- {
- for (regno = 0; (regno < FP0_REGNUM); regno++)
- fetch_inferior_register (regno, (REGISTER_ADDR (ar0_offset, regno)));
- for (; (regno < NUM_REGS); regno++)
- fetch_inferior_register (regno, (FP_REGISTER_ADDR (u, regno)));
- }
- else
- fetch_inferior_register (regno,
- (regno < FP0_REGNUM
- ? REGISTER_ADDR (ar0_offset, regno)
- : FP_REGISTER_ADDR (u, regno)));
-}
-
-/* Store our register values back into the inferior.
- If REGNO is -1, do this for all registers.
- Otherwise, REGNO specifies which register (so we can save time). */
-
-void
-store_inferior_registers (register int regno)
-{
- struct user u;
- register unsigned int ar0_offset;
-
- if (regno >= FP0_REGNUM)
- {
- store_inferior_register (regno, (FP_REGISTER_ADDR (u, regno)));
- return;
- }
-
- ar0_offset = (INFERIOR_AR0 (u));
- if (regno >= 0)
- {
- store_inferior_register (regno, (REGISTER_ADDR (ar0_offset, regno)));
- return;
- }
-
- for (regno = 0; (regno < FP0_REGNUM); regno++)
- store_inferior_register (regno, (REGISTER_ADDR (ar0_offset, regno)));
- for (; (regno < NUM_REGS); regno++)
- store_inferior_register (regno, (FP_REGISTER_ADDR (u, regno)));
- return;
-}
-
-int
-getpagesize (void)
-{
- return 4096;
-}
diff --git a/gdb/nindy-share/Makefile b/gdb/nindy-share/Makefile
deleted file mode 100644
index 5ec99ba38e7..00000000000
--- a/gdb/nindy-share/Makefile
+++ /dev/null
@@ -1,117 +0,0 @@
-#Copyright 1992 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.
-
-#-----------------------------------------------------------------------------
-# Makefile for toolib.a -- host code shAred by more than one tool
-#-----------------------------------------------------------------------------
-
-RANLIB = ranlib
-
-# The following lines should be uncommented for system V (i386v).
-#__i386v__#USG = -DUSG
-#__i386v__#SYSV_INCL = ${IPATH}/sysv.h
-#__i386v__#RANLIB = echo >/dev/null
-
-# The following line should be uncommented for HP-UX
-#__hp9000__#USG = -DUSG
-#__hp9000__#SYSV_INCL = ${IPATH}/sysv.h
-#__hp9000__#RANLIB = echo >/dev/null
-
-# Essential under System V, harmless elsewhere
-SHELL = /bin/sh
-
-#'HOST' will be defined in the host-specific makefile by 'make make'
-
-TARG = toolib.a
-OPT = -g
-IPATH = ../../include
-CFLAGS = ${OPT} ${USG} -I${IPATH} -DHOST=\"${HOST}\"
-OBJS = coffstrip.o nindy.o ttybreak.o ttyflush.o Onindy.o
-
-${TARG}: ${OBJS} VERSION
- make ver960.o
- rm -f ${TARG}
- ar cvr ${TARG} ${OBJS} ver960.o
- ${RANLIB} ${TARG}
-
-coffstrip.o: ${IPATH}/b.out.h ${IPATH}/coff.h ${IPATH}/sysv.h
-nindy.o: ${IPATH}/block_io.h ${IPATH}/env.h ${IPATH}/sysv.h
-nindy.o: ${IPATH}/ttycntl.h ${IPATH}/wait.h
-ttybreak.o: ${IPATH}/ttycntl.h
-ttyflush.o: ${IPATH}/ttycntl.h
-Onindy.o: ${IPATH}/block_io.h ${IPATH}/env.h ${IPATH}/sysv.h
-Onindy.o: ${IPATH}/ttycntl.h ${IPATH}/wait.h
-
-
-#-----------------------------------------------------------------------------
-# 'STANDARD' GNU/960 TARGETS BELOW THIS POINT
-#
-# 'VERSION' file must be present and contain a string of the form "x.y"
-#-----------------------------------------------------------------------------
-
-ver960.c: FORCE
- rm -f ver960.c
- echo "char toolib_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c
-
-
-# This target should be invoked before building a new release.
-# 'VERSION' file must be present and contain a string of the form "x.y"
-#
-roll:
- @V=`cat VERSION` ; \
- MAJ=`sed 's/\..*//' VERSION` ; \
- MIN=`sed 's/.*\.//' VERSION` ; \
- V=$$MAJ.`expr $$MIN + 1` ; \
- rm -f VERSION ; \
- echo $$V >VERSION ; \
- echo Version $$V
-
-# Dummy target to force execution of dependent targets.
-#
-FORCE:
-
-# 'G960BASE' will be defined at invocation
-#
-install:
- make ${TARG}
- mv -f ${TARG} ${G960BASE}/lib
-
-clean:
- rm -f ${TARG} *.o core
-
-# Target to uncomment host-specific lines in this makefile. Such lines must
-# have the following string beginning in column 1: #__<hostname>__#
-# Original Makefile is backed up as 'Makefile.old'.
-#
-# Invoke with: make make HOST=xxx
-#
-make:
- -@if test $(HOST)x = x ; then \
- echo 'Specify "make make HOST=???"'; \
- exit 1; \
- fi ; \
- grep -s "^#The next line was generated by 'make make'" Makefile; \
- if test $$? = 0 ; then \
- echo "Makefile has already been processed with 'make make'";\
- exit 1; \
- fi ; \
- mv -f Makefile Makefile.old; \
- echo "#The next line was generated by 'make make'" >Makefile ; \
- echo "HOST=$(HOST)" >>Makefile ; \
- echo >>Makefile ; \
- sed "s/^#__$(HOST)__#//" < Makefile.old >>Makefile
diff --git a/gdb/nindy-share/Onindy.c b/gdb/nindy-share/Onindy.c
deleted file mode 100644
index f544183c4cb..00000000000
--- a/gdb/nindy-share/Onindy.c
+++ /dev/null
@@ -1,743 +0,0 @@
-/* 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. */
-
-/* This started out life as code shared between the nindy monitor and
- GDB. For various reasons, this is no longer true. Eventually, it
- probably should be merged into remote-nindy.c. */
-
-/******************************************************************************
- *
- * NINDY INTERFACE ROUTINES
- *
- * This version of the NINDY interface routines supports NINDY versions
- * 2.13 and older. The older versions used a hex communication protocol,
- * instead of the (faster) current binary protocol. These routines have
- * been renamed by prepending the letter 'O' to their names, to avoid
- * conflict with the current version. The old versions are kept only for
- * backward compatibility, and well disappear in a future release.
- *
- **************************************************************************/
-
-/* Having these in a separate file from nindy.c is really ugly, and should
- be merged with nindy.c. */
-
-#include <stdio.h>
-#if 0
-#include <sys/ioctl.h>
-#include <sys/types.h> /* Needed by file.h on Sys V */
-#include <sys/file.h>
-#include <signal.h>
-#include <sys/stat.h>
-#include <fcntl.h> /* Needed on Sys V */
-#include "ttycntl.h"
-#endif
-#include "defs.h"
-#include "serial.h"
-
-#include "block_io.h"
-#include "gdb_wait.h"
-#include "env.h"
-
-/* Number of bytes that we send to nindy. I believe this is defined by
- the protocol (it does not agree with REGISTER_BYTES). */
-#define OLD_NINDY_REGISTER_BYTES ((36*4) + (4*8))
-
-extern int quiet; /* 1 => stifle unnecessary messages */
-
-/* tty connected to 960/NINDY board. */
-extern struct serial *nindy_serial;
-
-static OninStrGet();
-
- /****************************
- * *
- * MISCELLANEOUS UTILTIES *
- * *
- ****************************/
-
-
-/******************************************************************************
- * fromhex:
- * Convert a hex ascii digit h to a binary integer
- ******************************************************************************/
-static
-int
-fromhex( h )
- int h;
-{
- if (h >= '0' && h <= '9'){
- h -= '0';
- } else if (h >= 'a' && h <= 'f'){
- h -= 'a' - 10;
- } else {
- h = 0;
- }
- return (h & 0xff);
-}
-
-
-/******************************************************************************
- * hexbin:
- * Convert a string of ASCII hex digits to a string of binary bytes.
- ******************************************************************************/
-static
-hexbin( n, hexp, binp )
- int n; /* Number of bytes to convert (twice this many digits)*/
- char *hexp; /* Get hex from here */
- char *binp; /* Put binary here */
-{
- while ( n-- ){
- *binp++ = (fromhex(*hexp) << 4) | fromhex(*(hexp+1));
- hexp += 2;
- }
-}
-
-
-/******************************************************************************
- * binhex:
- * Convert a string of binary bytes to a string of ASCII hex digits
- ******************************************************************************/
-static
-binhex( n, binp, hexp )
- int n; /* Number of bytes to convert */
- char *binp; /* Get binary from here */
- char *hexp; /* Place hex here */
-{
- static char tohex[] = "0123456789abcdef";
-
- while ( n-- ){
- *hexp++ = tohex[ (*binp >> 4) & 0xf ];
- *hexp++ = tohex[ *binp & 0xf ];
- binp++;
- }
-}
-
-/******************************************************************************
- * byte_order:
- * If the host byte order is different from 960 byte order (i.e., the
- * host is big-endian), reverse the bytes in the passed value; otherwise,
- * return the passed value unchanged.
- *
- ******************************************************************************/
-static
-long
-byte_order( n )
- long n;
-{
- long rev;
- int i;
- static short test = 0x1234;
-
- if (*((char *) &test) == 0x12) {
- /*
- * Big-endian host, swap the bytes.
- */
- rev = 0;
- for ( i = 0; i < sizeof(n); i++ ){
- rev <<= 8;
- rev |= n & 0xff;
- n >>= 8;
- }
- n = rev;
- }
- return n;
-}
-
-/******************************************************************************
- * say:
- * This is a printf that takes at most two arguments (in addition to the
- * format string) and that outputs nothing if verbose output has been
- * suppressed.
- ******************************************************************************/
-static
-say( fmt, arg1, arg2 )
- char *fmt;
- int arg1, arg2;
-{
- if ( !quiet ){
- printf( fmt, arg1, arg2 );
- fflush( stdout );
- }
-}
-
- /*****************************
- * *
- * LOW-LEVEL COMMUNICATION *
- * *
- *****************************/
-
-/* Read a single character from the remote end. */
-
-static int
-readchar()
-{
- /* FIXME: Do we really want to be reading without a timeout? */
- return serial_readchar (nindy_serial, -1);
-}
-
-/******************************************************************************
- * getpkt:
- * Read a packet from a remote NINDY, with error checking, and return
- * it in the indicated buffer.
- ******************************************************************************/
-static
-getpkt (buf)
- char *buf;
-{
- unsigned char recv; /* Checksum received */
- unsigned char csum; /* Checksum calculated */
- char *bp; /* Poointer into the buffer */
- int c;
-
- while (1){
- csum = 0;
- bp = buf;
- /* FIXME: check for error from readchar (). */
- while ( (c = readchar()) != '#' ){
- *bp++ = c;
- csum += c;
- }
- *bp = 0;
-
- /* FIXME: check for error from readchar (). */
- recv = fromhex(readchar()) << 4;
- recv |= fromhex(readchar());
- if ( csum == recv ){
- break;
- }
-
- fprintf(stderr,
- "Bad checksum (recv=0x%02x; calc=0x%02x); retrying\r\n",
- recv, csum );
- serial_write (nindy_serial, "-", 1);
- }
-
- serial_write (nindy_serial, "+", 1);
-}
-
-
-/******************************************************************************
- * putpkt:
- * Checksum and send a gdb command to a remote NINDY, and wait for
- * positive acknowledgement.
- *
- ******************************************************************************/
-static
-putpkt( cmd )
- char *cmd; /* Command to be sent, without lead ^P (\020)
- * or trailing checksum
- */
-{
- char ack; /* Response received from NINDY */
- char checksum[4];
- char *p;
- unsigned int s;
- char resend;
-
- for ( s='\020', p=cmd; *p; p++ ){
- s += *p;
- }
- sprintf( checksum, "#%02x", s & 0xff );
-
- /* Send checksummed message over and over until we get a positive ack
- */
- resend = 1;
- do {
- if ( resend ) {
- serial_write ( nindy_serial, "\020", 1 );
- serial_write( nindy_serial, cmd, strlen(cmd) );
- serial_write( nindy_serial, checksum, strlen(checksum) );
- }
- /* FIXME: do we really want to be reading without timeout? */
- ack = serial_readchar (nindy_serial, -1);
- if (ack < 0)
- {
- fprintf (stderr, "error reading from serial port\n");
- }
- if ( ack == '-' ){
- fprintf( stderr, "Remote NAK, resending\r\n" );
- resend = 1;
- } else if ( ack != '+' ){
- fprintf( stderr, "Bad ACK, ignored: <%c>\r\n", ack );
- resend = 0;
- }
- } while ( ack != '+' );
-}
-
-
-
-/******************************************************************************
- * send:
- * Send a message to a remote NINDY and return the reply in the same
- * buffer (clobbers the input message). Check for error responses
- * as indicated by the second argument.
- *
- ******************************************************************************/
-static
-send( buf, ack_required )
- char *buf; /* Message to be sent to NINDY; replaced by
- * NINDY's response.
- */
- int ack_required; /* 1 means NINDY's response MUST be either "X00" (no
- * error) or an error code "Xnn".
- * 0 means the it's OK as long as it doesn't
- * begin with "Xnn".
- */
-{
- int errnum;
- static char *errmsg[] = {
- "", /* X00 */
- "Buffer overflow", /* X01 */
- "Unknown command", /* X02 */
- "Wrong amount of data to load register(s)", /* X03 */
- "Missing command argument(s)", /* X04 */
- "Odd number of digits sent to load memory", /* X05 */
- "Unknown register name", /* X06 */
- "No such memory segment", /* X07 */
- "No breakpoint available", /* X08 */
- "Can't set requested baud rate", /* X09 */
- };
-# define NUMERRS ( sizeof(errmsg) / sizeof(errmsg[0]) )
-
- static char err0[] = "NINDY failed to acknowledge command: <%s>\r\n";
- static char err1[] = "Unknown error response from NINDY: <%s>\r\n";
- static char err2[] = "Error response %s from NINDY: %s\r\n";
-
- putpkt (buf);
- getpkt (buf);
-
- if ( buf[0] != 'X' ){
- if ( ack_required ){
- fprintf( stderr, err0, buf );
- abort();
- }
-
- } else if ( strcmp(buf,"X00") ){
- sscanf( &buf[1], "%x", &errnum );
- if ( errnum > NUMERRS ){
- fprintf( stderr, err1, buf );
- } else{
- fprintf( stderr, err2, buf, errmsg[errnum] );
- }
- abort();
- }
-}
-
- /**********************************
- * *
- * NINDY INTERFACE ROUTINES *
- * *
- * ninConnect *MUST* be the first *
- * one of these routines called. *
- **********************************/
-
-/******************************************************************************
- * ninBptDel:
- * Ask NINDY to delete the specified type of *hardware* breakpoint at
- * the specified address. If the 'addr' is -1, all breakpoints of
- * the specified type are deleted.
- ******************************************************************************/
-OninBptDel( addr, data )
- long addr; /* Address in 960 memory */
- int data; /* '1' => data bkpt, '0' => instruction breakpoint */
-{
- char buf[100];
-
- if ( addr == -1 ){
- sprintf( buf, "b%c", data ? '1' : '0' );
- } else {
- sprintf( buf, "b%c%x", data ? '1' : '0', addr );
- }
- return send( buf, 0 );
-}
-
-
-/******************************************************************************
- * ninBptSet:
- * Ask NINDY to set the specified type of *hardware* breakpoint at
- * the specified address.
- ******************************************************************************/
-OninBptSet( addr, data )
- long addr; /* Address in 960 memory */
- int data; /* '1' => data bkpt, '0' => instruction breakpoint */
-{
- char buf[100];
-
- sprintf( buf, "B%c%x", data ? '1' : '0', addr );
- return send( buf, 0 );
-}
-
-/******************************************************************************
- * ninGdbExit:
- * Ask NINDY to leave GDB mode and print a NINDY prompt.
- * Since it'll no longer be in GDB mode, don't wait for a response.
- ******************************************************************************/
-OninGdbExit()
-{
- putpkt( "E" );
-}
-
-/******************************************************************************
- * ninGo:
- * Ask NINDY to start or continue execution of an application program
- * in it's memory at the current ip.
- ******************************************************************************/
-OninGo( step_flag )
- int step_flag; /* 1 => run in single-step mode */
-{
- putpkt( step_flag ? "s" : "c" );
-}
-
-
-/******************************************************************************
- * ninMemGet:
- * Read a string of bytes from NINDY's address space (960 memory).
- ******************************************************************************/
-OninMemGet(ninaddr, hostaddr, len)
- long ninaddr; /* Source address, in the 960 memory space */
- char *hostaddr; /* Destination address, in our memory space */
- int len; /* Number of bytes to read */
-{
- /* How much do we send at a time? */
-#define OLD_NINDY_MEMBYTES 1024
- /* Buffer: hex in, binary out */
- char buf[2*OLD_NINDY_MEMBYTES+20];
-
- int cnt; /* Number of bytes in next transfer */
-
- for ( ; len > 0; len -= OLD_NINDY_MEMBYTES ){
- cnt = len > OLD_NINDY_MEMBYTES ? OLD_NINDY_MEMBYTES : len;
-
- sprintf( buf, "m%x,%x", ninaddr, cnt );
- send( buf, 0 );
- hexbin( cnt, buf, hostaddr );
-
- ninaddr += cnt;
- hostaddr += cnt;
- }
-}
-
-
-/******************************************************************************
- * ninMemPut:
- * Write a string of bytes into NINDY's address space (960 memory).
- ******************************************************************************/
-OninMemPut( destaddr, srcaddr, len )
- long destaddr; /* Destination address, in NINDY memory space */
- char *srcaddr; /* Source address, in our memory space */
- int len; /* Number of bytes to write */
-{
- char buf[2*OLD_NINDY_MEMBYTES+20]; /* Buffer: binary in, hex out */
- char *p; /* Pointer into buffer */
- int cnt; /* Number of bytes in next transfer */
-
- for ( ; len > 0; len -= OLD_NINDY_MEMBYTES ){
- cnt = len > OLD_NINDY_MEMBYTES ? OLD_NINDY_MEMBYTES : len;
-
- sprintf( buf, "M%x,", destaddr );
- p = buf + strlen(buf);
- binhex( cnt, srcaddr, p );
- *(p+(2*cnt)) = '\0';
- send( buf, 1 );
-
- srcaddr += cnt;
- destaddr += cnt;
- }
-}
-
-/******************************************************************************
- * ninRegGet:
- * Retrieve the contents of a 960 register, and return them as a long
- * in host byte order.
- *
- * THIS ROUTINE CAN ONLY BE USED TO READ THE LOCAL, GLOBAL, AND
- * ip/ac/pc/tc REGISTERS.
- *
- ******************************************************************************/
-long
-OninRegGet( regname )
- char *regname; /* Register name recognized by NINDY, subject to the
- * above limitations.
- */
-{
- char buf[200];
- long val;
-
- sprintf( buf, "u%s", regname );
- send( buf, 0 );
- hexbin( 4, buf, (char *)&val );
- return byte_order(val);
-}
-
-/******************************************************************************
- * ninRegPut:
- * Set the contents of a 960 register.
- *
- * THIS ROUTINE CAN ONLY BE USED TO SET THE LOCAL, GLOBAL, AND
- * ip/ac/pc/tc REGISTERS.
- *
- ******************************************************************************/
-OninRegPut( regname, val )
- char *regname; /* Register name recognized by NINDY, subject to the
- * above limitations.
- */
- long val; /* New contents of register, in host byte-order */
-{
- char buf[200];
-
- sprintf( buf, "U%s,%08x", regname, byte_order(val) );
- send( buf, 1 );
-}
-
-/******************************************************************************
- * ninRegsGet:
- * Get a dump of the contents of the entire 960 register set. The
- * individual registers appear in the dump in the following order:
- *
- * pfp sp rip r3 r4 r5 r6 r7
- * r8 r9 r10 r11 r12 r13 r14 r15
- * g0 g1 g2 g3 g4 g5 g6 g7
- * g8 g9 g10 g11 g12 g13 g14 fp
- * pc ac ip tc fp0 fp1 fp2 fp3
- *
- * Each individual register comprises exactly 4 bytes, except for
- * fp0-fp3, which are 8 bytes.
- *
- * WARNING:
- * Each register value is in 960 (little-endian) byte order.
- *
- ******************************************************************************/
-OninRegsGet( regp )
- char *regp; /* Where to place the register dump */
-{
- char buf[(2*OLD_NINDY_REGISTER_BYTES)+10]; /* Registers in ASCII hex */
-
- strcpy( buf, "r" );
- send( buf, 0 );
- hexbin( OLD_NINDY_REGISTER_BYTES, buf, regp );
-}
-
-/******************************************************************************
- * ninRegsPut:
- * Initialize the entire 960 register set to a specified set of values.
- * The format of the register value data should be the same as that
- * returned by ninRegsGet.
- *
- * WARNING:
- * Each register value should be in 960 (little-endian) byte order.
- *
- ******************************************************************************/
-OninRegsPut( regp )
- char *regp; /* Pointer to desired values of registers */
-{
- char buf[(2*OLD_NINDY_REGISTER_BYTES)+10]; /* Registers in ASCII hex */
-
- buf[0] = 'R';
- binhex( OLD_NINDY_REGISTER_BYTES, regp, buf+1 );
- buf[ (2*OLD_NINDY_REGISTER_BYTES)+1 ] = '\0';
-
- send( buf, 1 );
-}
-
-
-/******************************************************************************
- * ninReset:
- * Ask NINDY to perform a soft reset; wait for the reset to complete.
- ******************************************************************************/
-OninReset()
-{
-
- putpkt( "X" );
- /* FIXME: check for error from readchar (). */
- while ( readchar() != '+' ){
- ;
- }
-}
-
-
-/******************************************************************************
- * ninSrq:
- * Assume NINDY has stopped execution of the 960 application program in
- * order to process a host service request (srq). Ask NINDY for the
- * srq arguments, perform the requested service, and send an "srq
- * complete" message so NINDY will return control to the application.
- *
- ******************************************************************************/
-OninSrq()
-{
- /* FIXME: Imposes arbitrary limits on lengths of pathnames and such. */
- char buf[BUFSIZE];
- int retcode;
- unsigned char srqnum;
- char *p;
- char *argp;
- int nargs;
- int arg[MAX_SRQ_ARGS];
-
-
- /* Get srq number and arguments
- */
- strcpy( buf, "!" );
- send( buf, 0 );
- hexbin( 1, buf, (char *)&srqnum );
-
- /* Set up array of pointers the each of the individual
- * comma-separated args
- */
- nargs=0;
- argp = p = buf+2;
- while ( 1 ){
- while ( *p != ',' && *p != '\0' ){
- p++;
- }
- sscanf( argp, "%x", &arg[nargs++] );
- if ( *p == '\0' || nargs == MAX_SRQ_ARGS ){
- break;
- }
- argp = ++p;
- }
-
- /* Process Srq
- */
- switch( srqnum ){
- case BS_CLOSE:
- /* args: file descriptor */
- if ( arg[0] > 2 ){
- retcode = close( arg[0] );
- } else {
- retcode = 0;
- }
- break;
- case BS_CREAT:
- /* args: filename, mode */
- OninStrGet( arg[0], buf );
- retcode = creat(buf,arg[1]);
- break;
- case BS_OPEN:
- /* args: filename, flags, mode */
- OninStrGet( arg[0], buf );
- retcode = open(buf,arg[1],arg[2]);
- break;
- case BS_READ:
- /* args: file descriptor, buffer, count */
- retcode = read(arg[0],buf,arg[2]);
- if ( retcode > 0 ){
- OninMemPut( arg[1], buf, retcode );
- }
- break;
- case BS_SEEK:
- /* args: file descriptor, offset, whence */
- retcode = lseek(arg[0],arg[1],arg[2]);
- break;
- case BS_WRITE:
- /* args: file descriptor, buffer, count */
- OninMemGet( arg[1], buf, arg[2] );
- retcode = write(arg[0],buf,arg[2]);
- break;
- default:
- retcode = -1;
- break;
- }
-
- /* Tell NINDY to continue
- */
- sprintf( buf, "e%x", retcode );
- send( buf, 1 );
-}
-
-
-/******************************************************************************
- * ninStopWhy:
- * Assume the application program has stopped (i.e., a DLE was received
- * from NINDY). Ask NINDY for status information describing the
- * reason for the halt.
- *
- * Returns a non-zero value if the user program has exited, 0 otherwise.
- * Also returns the following information, through passed pointers:
- * - why: an exit code if program the exited; otherwise the reason
- * why the program halted (see stop.h for values).
- * - contents of register ip (little-endian byte order)
- * - contents of register sp (little-endian byte order)
- * - contents of register fp (little-endian byte order)
- ******************************************************************************/
-char
-OninStopWhy( whyp, ipp, fpp, spp )
- char *whyp; /* Return the 'why' code through this pointer */
- char *ipp; /* Return contents of register ip through this pointer */
- char *fpp; /* Return contents of register fp through this pointer */
- char *spp; /* Return contents of register sp through this pointer */
-{
- char buf[30];
- char stop_exit;
-
- strcpy( buf, "?" );
- send( buf, 0 );
- hexbin( 1, buf, &stop_exit );
- hexbin( 1, buf+2, whyp );
- hexbin( 4, buf+4, ipp );
- hexbin( 4, buf+12, fpp );
- hexbin( 4, buf+20, spp );
- return stop_exit;
-}
-
-/******************************************************************************
- * ninStrGet:
- * Read a '\0'-terminated string of data out of the 960 memory space.
- *
- ******************************************************************************/
-static
-OninStrGet( ninaddr, hostaddr )
- unsigned long ninaddr; /* Address of string in NINDY memory space */
- char *hostaddr; /* Address of the buffer to which string should
- * be copied.
- */
-{
- /* FIXME: seems to be an arbitrary limit on the length of the string. */
- char buf[BUFSIZE]; /* String as 2 ASCII hex digits per byte */
- int numchars; /* Length of string in bytes. */
-
- sprintf( buf, "\"%x", ninaddr );
- send( buf, 0 );
- numchars = strlen(buf)/2;
- hexbin( numchars, buf, hostaddr );
- hostaddr[numchars] = '\0';
-}
-
-#if 0
-/* never used. */
-
-/******************************************************************************
- * ninVersion:
- * Ask NINDY for version information about itself.
- * The information is sent as an ascii string in the form "x.xx,<arch>",
- * where,
- * x.xx is the version number
- * <arch> is the processor architecture: "KA", "KB", "MC", "CA" *
- *
- ******************************************************************************/
-int
-OninVersion( p )
- char *p; /* Where to place version string */
-{
- /* FIXME: this is an arbitrary limit on the length of version string. */
- char buf[BUFSIZE];
-
- strcpy( buf, "v" );
- send( buf, 0 );
- strcpy( p, buf );
- return strlen( buf );
-}
-#endif
diff --git a/gdb/nindy-share/README b/gdb/nindy-share/README
deleted file mode 100644
index 3f217ad9527..00000000000
--- a/gdb/nindy-share/README
+++ /dev/null
@@ -1,3 +0,0 @@
-The files in this directory started out life as code shared between
-the nindy monitor and GDB. For various reasons, this is no longer
-true. Eventually, they probably should be merged into remote-nindy.c.
diff --git a/gdb/nindy-share/VERSION b/gdb/nindy-share/VERSION
deleted file mode 100644
index 5625e59da88..00000000000
--- a/gdb/nindy-share/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-1.2
diff --git a/gdb/nindy-share/b.out.h b/gdb/nindy-share/b.out.h
deleted file mode 100644
index a82c261a7fd..00000000000
--- a/gdb/nindy-share/b.out.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/* Copyright 1992 Free Software Foundation, Inc.
- *
- * This file is a modified version of 'a.out.h'. It is to be used in all
- * all GNU tools modified to support the i80960 (or tools that operate on
- * object files created by such tools).
- *
- * All i80960 development is done in a CROSS-DEVELOPMENT environment. I.e.,
- * object code is generated on, and executed under the direction of a symbolic
- * debugger running on, a host system. We do not want to be subject to the
- * vagaries of which host it is or whether it supports COFF or a.out format,
- * or anything else. We DO want to:
- *
- * o always generate the same format object files, regardless of host.
- *
- * o have an 'a.out' header that we can modify for our own purposes
- * (the 80960 is typically an embedded processor and may require
- * enhanced linker support that the normal a.out.h header can't
- * accommodate).
- *
- * As for byte-ordering, the following rules apply:
- *
- * o Text and data that is actually downloaded to the target is always
- * in i80960 (little-endian) order.
- *
- * o All other numbers (in the header, symbols, relocation directives)
- * are in host byte-order: object files CANNOT be lifted from a
- * little-end host and used on a big-endian (or vice versa) without
- * modification.
- *
- * o The downloader ('comm960') takes care to generate a pseudo-header
- * with correct (i80960) byte-ordering before shipping text and data
- * off to the NINDY monitor in the target systems. Symbols and
- * relocation info are never sent to the target.
- */
-
-
-#define BMAGIC 0415
-/* We don't accept the following (see N_BADMAG macro).
- * They're just here so GNU code will compile.
- */
-#define OMAGIC 0407 /* old impure format */
-#define NMAGIC 0410 /* read-only text */
-#define ZMAGIC 0413 /* demand load format */
-
-/* FILE HEADER
- * All 'lengths' are given as a number of bytes.
- * All 'alignments' are for relinkable files only; an alignment of
- * 'n' indicates the corresponding segment must begin at an
- * address that is a multiple of (2**n).
- */
-struct exec {
- /* Standard stuff */
- unsigned long a_magic; /* Identifies this as a b.out file */
- unsigned long a_text; /* Length of text */
- unsigned long a_data; /* Length of data */
- unsigned long a_bss; /* Length of runtime uninitialized data area */
- unsigned long a_syms; /* Length of symbol table */
- unsigned long a_entry; /* Runtime start address */
- unsigned long a_trsize; /* Length of text relocation info */
- unsigned long a_drsize; /* Length of data relocation info */
-
- /* Added for i960 */
- unsigned long a_tload; /* Text runtime load address */
- unsigned long a_dload; /* Data runtime load address */
- unsigned char a_talign; /* Alignment of text segment */
- unsigned char a_dalign; /* Alignment of data segment */
- unsigned char a_balign; /* Alignment of bss segment */
- unsigned char unused; /* (Just to make struct size a multiple of 4) */
-};
-
-#define N_BADMAG(x) (((x).a_magic)!=BMAGIC)
-#define N_TXTOFF(x) ( sizeof(struct exec) )
-#define N_DATOFF(x) ( N_TXTOFF(x) + (x).a_text )
-#define N_TROFF(x) ( N_DATOFF(x) + (x).a_data )
-#define N_DROFF(x) ( N_TROFF(x) + (x).a_trsize )
-#define N_SYMOFF(x) ( N_DROFF(x) + (x).a_drsize )
-#define N_STROFF(x) ( N_SYMOFF(x) + (x).a_syms )
-
-/* A single entry in the symbol table
- */
-struct nlist {
- union {
- char *n_name;
- struct nlist *n_next;
- long n_strx; /* Index into string table */
- } n_un;
- unsigned char n_type; /* See below */
- char n_other; /* Used in i80960 support -- see below */
- short n_desc;
- unsigned long n_value;
-};
-
-
-/* Legal values of n_type
- */
-#define N_UNDF 0 /* Undefined symbol */
-#define N_ABS 2 /* Absolute symbol */
-#define N_TEXT 4 /* Text symbol */
-#define N_DATA 6 /* Data symbol */
-#define N_BSS 8 /* BSS symbol */
-#define N_FN 31 /* Filename symbol */
-
-#define N_EXT 1 /* External symbol (OR'd in with one of above) */
-#define N_TYPE 036 /* Mask for all the type bits */
-#define N_STAB 0340 /* Mask for all bits used for SDB entries */
-
-/* MEANING OF 'n_other'
- *
- * If non-zero, the 'n_other' fields indicates either a leaf procedure or
- * a system procedure, as follows:
- *
- * 1 <= n_other <= 32 :
- * The symbol is the entry point to a system procedure.
- * 'n_value' is the address of the entry, as for any other
- * procedure. The system procedure number (which can be used in
- * a 'calls' instruction) is (n_other-1). These entries come from
- * '.sysproc' directives.
- *
- * n_other == N_CALLNAME
- * the symbol is the 'call' entry point to a leaf procedure.
- * The *next* symbol in the symbol table must be the corresponding
- * 'bal' entry point to the procedure (see following). These
- * entries come from '.leafproc' directives in which two different
- * symbols are specified (the first one is represented here).
- *
- *
- * n_other == N_BALNAME
- * the symbol is the 'bal' entry point to a leaf procedure.
- * These entries result from '.leafproc' directives in which only
- * one symbol is specified, or in which the same symbol is
- * specified twice.
- *
- * Note that an N_CALLNAME entry *must* have a corresponding N_BALNAME entry,
- * but not every N_BALNAME entry must have an N_CALLNAME entry.
- */
-#define N_CALLNAME -1
-#define N_BALNAME -2
-
-
-struct relocation_info {
- int r_address; /* File address of item to be relocated */
- unsigned
- r_symbolnum:24,/* Index of symbol on which relocation is based*/
- r_pcrel:1, /* 1 => relocate PC-relative; else absolute
- * On i960, pc-relative implies 24-bit
- * address, absolute implies 32-bit.
- */
- r_length:2, /* Number of bytes to relocate:
- * 0 => 1 byte
- * 1 => 2 bytes
- * 2 => 4 bytes -- only value used for i960
- */
- r_extern:1,
- r_bsr:1, /* Something for the GNU NS32K assembler */
- r_disp:1, /* Something for the GNU NS32K assembler */
- r_callj:1, /* 1 if relocation target is an i960 'callj' */
- nuthin:1; /* Unused */
-};
diff --git a/gdb/nindy-share/block_io.h b/gdb/nindy-share/block_io.h
deleted file mode 100644
index 6521cdb9b05..00000000000
--- a/gdb/nindy-share/block_io.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/******************************************************************
- Copyright 1990, 1992 Free Software Foundation, Inc.
-
- This code was donated by Intel Corp.
-
- Intel hereby grants you permission to copy, modify, and
- distribute this software and its documentation. Intel grants
- this permission provided that the above copyright notice
- appears in all copies and that both the copyright notice and
- this permission notice appear in supporting documentation. In
- addition, Intel grants this permission provided that you
- prominently mark as not part of the original any modifications
- made to this software or documentation, and that the name of
- Intel Corporation not be used in advertising or publicity
- pertaining to distribution of the software or the documentation
- without specific, written prior permission.
-
- Intel Corporation does not warrant, guarantee or make any
- representations regarding the use of, or the results of the use
- of, the software and documentation in terms of correctness,
- accuracy, reliability, currentness, or otherwise; and you rely
- on the software, documentation and results solely at your own
- risk. */
-/******************************************************************/
-
-/*****************************************************************************
- * Structures and definitions supporting NINDY requests for services by a
- * remote host. Used by NINDY monitor, library libnin, comm960, gdb960,
- * etc. Also contains some defines for NINDY console I/O requests.
- *****************************************************************************/
-
-/* the following four are hardware dependent */
-#define BIT_16 short
-#define BIT_32 int
-#define UBIT_16 unsigned short
-#define UBIT_32 unsigned int
-
-/* Service request numbers -- these are the services that can be asked of the
- * host.
- */
-#define BS_ACCESS 0x10
-#define BS_CLOSE 0x20
-#define BS_CREAT 0x30
-#define BS_SEEK 0x40
-#define BS_OPEN 0x50
-#define BS_READ 0x60
-#define BS_STAT 0x70
-#define BS_SYSTEMD 0x80
-#define BS_TIME 0x90
-#define BS_UNMASK 0xa0
-#define BS_UNLINK 0xb0
-#define BS_WRITE 0xc0
-
-
-/* Maximum number of arguments to any of the above service requests
- * (in addition to the request number).
- */
-#define MAX_SRQ_ARGS 3
-
-/* Number of bytes of data that can be read or written by a single I/O request
- */
-#define BUFSIZE 1024
-
-/* NINDY console I/O requests: CO sends a single character to stdout,
- * CI reads one.
- */
-#define CI 0
-#define CO 1
diff --git a/gdb/nindy-share/coff.h b/gdb/nindy-share/coff.h
deleted file mode 100644
index b169b71ec53..00000000000
--- a/gdb/nindy-share/coff.h
+++ /dev/null
@@ -1,336 +0,0 @@
-/* Copyright 1990, 1992 Free Software Foundation, Inc.
- *
- * This code was donated by Intel Corp.
- *
- * This is a coff version of a.out.h to support 80960 debugging from
- * a Unix (possibly BSD) host. It's used by:
- * o gdb960 to symbols in code generated with Intel (non-GNU) tools.
- * o comm960 to convert a b.out file to a coff file for download.
- */
-
-
-/********************** FILE HEADER **********************/
-
-struct filehdr {
- unsigned short f_magic; /* magic number */
- unsigned short f_nscns; /* number of sections */
- long f_timdat; /* time & date stamp */
- long f_symptr; /* file pointer to symtab */
- long f_nsyms; /* number of symtab entries */
- unsigned short f_opthdr; /* sizeof(optional hdr) */
- unsigned short f_flags; /* flags */
-};
-
-
-/* Bits for f_flags:
- * F_RELFLG relocation info stripped from file
- * F_EXEC file is executable (no unresolved externel references)
- * F_LNNO line nunbers stripped from file
- * F_LSYMS local symbols stripped from file
- * F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax)
- */
-#define F_RELFLG 0000001
-#define F_EXEC 0000002
-#define F_LNNO 0000004
-#define F_LSYMS 0000010
-#define F_AR32WR 0000400
-
-
-/*
- * Intel 80960 (I960) processor flags.
- * F_I960TYPE == mask for processor type field.
- */
-#define F_I960TYPE 0170000
-#define F_I960CA 0010000
-#define F_I960FLOAT 0020000
-#define F_I960BA 0030000
-#define F_I960XA 0040000
-
-/*
- * i80960 Magic Numbers
- */
-#define I960ROMAGIC 0540 /* read-only text segments */
-#define I960RWMAGIC 0541 /* read-write text segments */
-
-#define I960BADMAG(x) (((x).f_magic!=I960ROMAGIC) && ((x).f_magic!=I960RWMAGIC))
-
-#define FILHDR struct filehdr
-#define FILHSZ sizeof(FILHDR)
-
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-typedef struct {
- unsigned long phys_addr;
- unsigned long bitarray;
-} TAGBITS;
-
-typedef struct aouthdr {
- short magic; /* type of file */
- short vstamp; /* version stamp */
- unsigned long tsize; /* text size in bytes, padded to FW bdry*/
- unsigned long dsize; /* initialized data " " */
- unsigned long bsize; /* uninitialized data " " */
-#if U3B
- unsigned long dum1;
- unsigned long dum2; /* pad to entry point */
-#endif
- unsigned long entry; /* entry pt. */
- unsigned long text_start; /* base of text used for this file */
- unsigned long data_start; /* base of data used for this file */
- unsigned long tagentries; /* number of tag entries to follow */
-} AOUTHDR;
-
-/* return a pointer to the tag bits array */
-
-#define TAGPTR(aout) ((TAGBITS *) (&(aout.tagentries)+1))
-
-/* compute size of a header */
-
-#define AOUTSZ(aout) (sizeof(AOUTHDR)+(aout.tagentries*sizeof(TAGBITS)))
-
-/********************** STORAGE CLASSES **********************/
-
-#define C_EFCN -1 /* physical end of function */
-#define C_NULL 0
-#define C_AUTO 1 /* automatic variable */
-#define C_EXT 2 /* external symbol */
-#define C_STAT 3 /* static */
-#define C_REG 4 /* register variable */
-#define C_EXTDEF 5 /* external definition */
-#define C_LABEL 6 /* label */
-#define C_ULABEL 7 /* undefined label */
-#define C_MOS 8 /* member of structure */
-#define C_ARG 9 /* function argument */
-#define C_STRTAG 10 /* structure tag */
-#define C_MOU 11 /* member of union */
-#define C_UNTAG 12 /* union tag */
-#define C_TPDEF 13 /* type definition */
-#define C_USTATIC 14 /* undefined static */
-#define C_ENTAG 15 /* enumeration tag */
-#define C_MOE 16 /* member of enumeration */
-#define C_REGPARM 17 /* register parameter */
-#define C_FIELD 18 /* bit field */
-#define C_BLOCK 100 /* ".bb" or ".eb" */
-#define C_FCN 101 /* ".bf" or ".ef" */
-#define C_EOS 102 /* end of structure */
-#define C_FILE 103 /* file name */
-#define C_LINE 104 /* line # reformatted as symbol table entry */
-#define C_ALIAS 105 /* duplicate tag */
-#define C_HIDDEN 106 /* ext symbol in dmert public lib */
-
- /* New storage classes for 80960 */
-
-#define C_SCALL 107 /* Procedure reachable via system call */
-#define C_LEAFPROC 108 /* Leaf procedure, "call" via BAL */
-
-
-/********************** SECTION HEADER **********************/
-
-struct scnhdr {
- char s_name[8]; /* section name */
- long s_paddr; /* physical address, aliased s_nlib */
- long s_vaddr; /* virtual address */
- long s_size; /* section size */
- long s_scnptr; /* file ptr to raw data for section */
- long s_relptr; /* file ptr to relocation */
- long s_lnnoptr; /* file ptr to line numbers */
- unsigned short s_nreloc; /* number of relocation entries */
- unsigned short s_nlnno; /* number of line number entries*/
- long s_flags; /* flags */
- unsigned long s_align; /* section alignment */
-};
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-
-/*
- * s_flags "type"
- */
-#define STYP_TEXT 0x20 /* section contains text only */
-#define STYP_DATA 0x40 /* section contains data only */
-#define STYP_BSS 0x80 /* section contains bss only */
-
-#define SCNHDR struct scnhdr
-#define SCNHSZ sizeof(SCNHDR)
-
-
-/********************** LINE NUMBERS **********************/
-
-/* 1 line number entry for every "breakpointable" source line in a section.
- * Line numbers are grouped on a per function basis; first entry in a function
- * grouping will have l_lnno = 0 and in place of physical address will be the
- * symbol table index of the function name.
- */
-struct lineno{
- union {
- long l_symndx; /* function name symbol index, iff l_lnno == 0*/
- long l_paddr; /* (physical) address of line number */
- } l_addr;
- unsigned short l_lnno; /* line number */
- char padding[2]; /* force alignment */
-};
-
-#define LINENO struct lineno
-#define LINESZ sizeof(LINENO)
-
-
-/********************** SYMBOLS **********************/
-
-#define SYMNMLEN 8 /* # characters in a symbol name */
-#define FILNMLEN 14 /* # characters in a file name */
-#define DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-
-struct syment {
- union {
- char _n_name[SYMNMLEN]; /* old COFF version */
- struct {
- long _n_zeroes; /* new == 0 */
- long _n_offset; /* offset into string table */
- } _n_n;
- char *_n_nptr[2]; /* allows for overlaying */
- } _n;
- long n_value; /* value of symbol */
- short n_scnum; /* section number */
- char pad1[2]; /* force alignment */
- unsigned long n_type; /* type and derived type */
- char n_sclass; /* storage class */
- char n_numaux; /* number of aux. entries */
- char pad2[2]; /* force alignment */
-};
-
-#define n_name _n._n_name
-#define n_zeroes _n._n_n._n_zeroes
-#define n_offset _n._n_n._n_offset
-
-/*
- * Relocatable symbols have number of the section in which they are defined,
- * or one of the following:
- */
-#define N_UNDEF 0 /* undefined symbol */
-#define N_ABS -1 /* value of symbol is absolute */
-#define N_DEBUG -2 /* debugging symbol -- symbol value is meaningless */
-
-/*
- * Type of a symbol, in low 4 bits of the word
- */
-#define T_NULL 0
-#define T_VOID 1 /* function argument (only used by compiler) */
-#define T_CHAR 2 /* character */
-#define T_SHORT 3 /* short integer */
-#define T_INT 4 /* integer */
-#define T_LONG 5 /* long integer */
-#define T_FLOAT 6 /* floating point */
-#define T_DOUBLE 7 /* double word */
-#define T_STRUCT 8 /* structure */
-#define T_UNION 9 /* union */
-#define T_ENUM 10 /* enumeration */
-#define T_MOE 11 /* member of enumeration*/
-#define T_UCHAR 12 /* unsigned character */
-#define T_USHORT 13 /* unsigned short */
-#define T_UINT 14 /* unsigned integer */
-#define T_ULONG 15 /* unsigned long */
-#define T_LNGDBL 16 /* long double */
-
-
-/*
- * derived types
- */
-#define DT_PTR 1 /* pointer */
-#define DT_FCN 2 /* function */
-#define DT_ARY 3 /* array */
-
-#define N_BTMASK 037
-#define N_TMASK 0140
-#define N_BTSHFT 5
-#define N_TSHIFT 2
-
-#define BTYPE(x) ((x) & N_BTMASK)
-
-
-#define ISPTR(x) (((x) & N_TMASK) == (DT_PTR << N_BTSHFT))
-#define ISFCN(x) (((x) & N_TMASK) == (DT_FCN << N_BTSHFT))
-#define ISARY(x) (((x) & N_TMASK) == (DT_ARY << N_BTSHFT))
-
-#define DECREF(x) ((((x)>>N_TSHIFT)&~N_BTMASK)|((x)&N_BTMASK))
-
-union auxent {
- struct {
- long x_tagndx; /* str, un, or enum tag indx */
- union {
- struct {
- unsigned short x_lnno; /* declaration line number */
- unsigned short x_size; /* str/union/array size */
- } x_lnsz;
- long x_fsize; /* size of function */
- } x_misc;
- union {
- struct { /* if ISFCN, tag, or .bb */
- long x_lnnoptr; /* ptr to fcn line # */
- long x_endndx; /* entry ndx past block end */
- } x_fcn;
- struct { /* if ISARY, up to 4 dimen. */
- unsigned short x_dimen[DIMNUM];
- } x_ary;
- } x_fcnary;
- unsigned short x_tvndx; /* tv index */
- } x_sym;
-
- union {
- char x_fname[FILNMLEN];
- struct {
- long x_zeroes;
- long x_offset;
- } x_n;
- } x_file;
-
- struct {
- long x_scnlen; /* section length */
- unsigned short x_nreloc; /* # relocation entries */
- unsigned short x_nlinno; /* # line numbers */
- } x_scn;
-
- struct {
- long x_stdindx;
- } x_sc;
-
- struct {
- unsigned long x_balntry;
- } x_bal;
-
- char a[sizeof(struct syment)]; /* force auxent/syment sizes to match */
-};
-
-#define SYMENT struct syment
-#define SYMESZ sizeof(SYMENT)
-#define AUXENT union auxent
-#define AUXESZ sizeof(AUXENT)
-
-#if VAX || I960
-# define _ETEXT "_etext"
-#else
-# define _ETEXT "etext"
-#endif
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-struct reloc {
- long r_vaddr; /* Virtual address of reference */
- long r_symndx; /* Index into symbol table */
- unsigned short r_type; /* Relocation type */
- char pad[2]; /* Unused */
-};
-
-/* Only values of r_type GNU/960 cares about */
-#define R_RELLONG 17 /* Direct 32-bit relocation */
-#define R_IPRMED 25 /* 24-bit ip-relative relocation */
-#define R_OPTCALL 27 /* 32-bit optimizable call (leafproc/sysproc) */
-
-
-#define RELOC struct reloc
-#define RELSZ sizeof(RELOC)
diff --git a/gdb/nindy-share/env.h b/gdb/nindy-share/env.h
deleted file mode 100644
index 4343d8b4c01..00000000000
--- a/gdb/nindy-share/env.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/* Copyright 1990, 1991 Free Software Foundation, Inc.
- *
- * This code was donated by Intel Corp.
- *
- * GNU/960 tool runtime environment
- */
-
-
-/* Base directory at which GNU/960 tools are assumed to be installed, if
- * the environment variable G960BASE is not defined.
- */
-#define DEFAULT_BASE "/usr/local/g960"
diff --git a/gdb/nindy-share/nindy.c b/gdb/nindy-share/nindy.c
deleted file mode 100644
index 77dd734fac2..00000000000
--- a/gdb/nindy-share/nindy.c
+++ /dev/null
@@ -1,1154 +0,0 @@
-/* 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. */
-
-/* This started out life as code shared between the nindy monitor and
- GDB. For various reasons, this is no longer true. Eventually, it
- probably should be merged into remote-nindy.c. */
-
-/******************************************************************************
- *
- * NINDY INTERFACE ROUTINES
- *
- * The caller of these routines should be aware that:
- *
- * (1) ninConnect() should be called to open communications with the
- * remote NINDY board before any of the other routines are invoked.
- *
- * (2) almost all interactions are driven by the host: nindy sends information
- * in response to host commands.
- *
- * (3) the lone exception to (2) is the single character DLE (^P, 0x10).
- * Receipt of a DLE from NINDY indicates that the application program
- * running under NINDY has stopped execution and that NINDY is now
- * available to talk to the host (all other communication received after
- * the application has been started should be presumed to come from the
- * application and should be passed on by the host to stdout).
- *
- * (4) the reason the application program stopped can be determined with the
- * ninStopWhy() function. There are three classes of stop reasons:
- *
- * (a) the application has terminated execution.
- * The host should take appropriate action.
- *
- * (b) the application had a fault or trace event.
- * The host should take appropriate action.
- *
- * (c) the application wishes to make a service request (srq) of the host;
- * e.g., to open/close a file, read/write a file, etc. The ninSrq()
- * function should be called to determine the nature of the request
- * and process it.
- */
-
-#include <stdio.h>
-#include "defs.h"
-#include "serial.h"
-#ifdef ANSI_PROTOTYPES
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-#if !defined (HAVE_TERMIOS) && !defined (HAVE_TERMIO) && !defined (HAVE_SGTTY)
-#define HAVE_SGTTY
-#endif
-
-#ifdef HAVE_SGTTY
-#include <sys/ioctl.h>
-#endif
-
-#include <sys/types.h> /* Needed by file.h on Sys V */
-#include <sys/file.h>
-#include <signal.h>
-#include <sys/stat.h>
-
-#if 0
-#include "ttycntl.h"
-#endif
-#include "block_io.h"
-#include "gdb_wait.h"
-#include "env.h"
-
-#define DLE 0x10 /* ^P */
-#define XON 0x11 /* ^Q */
-#define XOFF 0x13 /* ^S */
-#define ESC 0x1b
-
-#define TIMEOUT -1
-
-int quiet = 0; /* 1 => stifle unnecessary messages */
-struct serial *nindy_serial;
-
-static int old_nindy = 0; /* 1 => use old (hex) communication protocol */
-static ninStrGet();
-
- /****************************
- * *
- * MISCELLANEOUS UTILTIES *
- * *
- ****************************/
-
-/******************************************************************************
- * say:
- * This is a printf that takes at most two arguments (in addition to the
- * format string) and that outputs nothing if verbose output has been
- * suppressed.
- *****************************************************************************/
-
-/* VARARGS */
-static void
-#ifdef ANSI_PROTOTYPES
-say (char *fmt, ...)
-#else
-say (va_alist)
- va_dcl
-#endif
-{
- va_list args;
-#ifdef ANSI_PROTOTYPES
- va_start(args, fmt);
-#else
- char *fmt;
-
- va_start (args);
- fmt = va_arg (args, char *);
-#endif
-
- if (!quiet)
- {
- vfprintf_unfiltered (gdb_stdout, fmt, args);
- gdb_flush (gdb_stdout);
- }
- va_end (args);
-}
-
-/******************************************************************************
- * exists:
- * Creates a full pathname by concatenating up to three name components
- * onto a specified base name; optionally looks up the base name as a
- * runtime environment variable; and checks to see if the file or
- * directory specified by the pathname actually exists.
- *
- * Returns: the full pathname if it exists, NULL otherwise.
- * (returned pathname is in malloc'd memory and must be freed
- * by caller).
- *****************************************************************************/
-static char *
-exists( base, c1, c2, c3, env )
- char *base; /* Base directory of path */
- char *c1, *c2, *c3; /* Components (subdirectories and/or file name) to be
- * appended onto the base directory name. One or
- * more may be omitted by passing NULL pointers.
- */
- int env; /* If 1, '*base' is the name of an environment variable
- * to be examined for the base directory name;
- * otherwise, '*base' is the actual name of the
- * base directory.
- */
-{
- struct stat buf;/* For call to 'stat' -- never examined */
- char *path; /* Pointer to full pathname (malloc'd memory) */
- int len; /* Length of full pathname (incl. terminator) */
- extern char *getenv();
-
-
- if ( env ){
- base = getenv( base );
- if ( base == NULL ){
- return NULL;
- }
- }
-
- len = strlen(base) + 4;
- /* +4 for terminator and "/" before each component */
- if ( c1 != NULL ){
- len += strlen(c1);
- }
- if ( c2 != NULL ){
- len += strlen(c2);
- }
- if ( c3 != NULL ){
- len += strlen(c3);
- }
-
- path = xmalloc (len);
-
- strcpy( path, base );
- if ( c1 != NULL ){
- strcat( path, "/" );
- strcat( path, c1 );
- if ( c2 != NULL ){
- strcat( path, "/" );
- strcat( path, c2 );
- if ( c3 != NULL ){
- strcat( path, "/" );
- strcat( path, c3 );
- }
- }
- }
-
- if ( stat(path,&buf) != 0 ){
- free( path );
- path = NULL;
- }
- return path;
-}
-
- /*****************************
- * *
- * LOW-LEVEL COMMUNICATION *
- * *
- *****************************/
-
-/* Read *exactly* N characters from the NINDY tty, and put them in
- *BUF. Translate escape sequences into single characters, counting
- each such sequence as 1 character.
-
- An escape sequence consists of ESC and a following character. The
- ESC is discarded and the other character gets bit 0x40 cleared --
- thus ESC P == ^P, ESC S == ^S, ESC [ == ESC, etc.
-
- Return 1 if successful, 0 if more than TIMEOUT seconds pass without
- any input. */
-
-static int
-rdnin (buf,n,timeout)
- unsigned char * buf; /* Where to place characters read */
- int n; /* Number of characters to read */
- int timeout; /* Timeout, in seconds */
-{
- int escape_seen; /* 1 => last character of a read was an ESC */
- int c;
-
- escape_seen = 0;
- while (n)
- {
- c = serial_readchar (nindy_serial, timeout);
- switch (c)
- {
- case SERIAL_ERROR:
- case SERIAL_TIMEOUT:
- case SERIAL_EOF:
- return 0;
-
- case ESC:
- escape_seen = 1;
- break;
-
- default:
- if (escape_seen)
- {
- escape_seen = 0;
- c &= ~0x40;
- }
- *buf++ = c;
- --n;
- break;
- }
- }
- return 1;
-}
-
-
-/******************************************************************************
- * getpkt:
- * Read a packet from a remote NINDY, with error checking, into the
- * indicated buffer.
- *
- * Return packet status byte on success, TIMEOUT on failure.
- ******************************************************************************/
-static
-int
-getpkt(buf)
- unsigned char *buf;
-{
- int i;
- unsigned char hdr[3]; /* Packet header:
- * hdr[0] = low byte of message length
- * hdr[1] = high byte of message length
- * hdr[2] = message status
- */
- int cnt; /* Message length (status byte + data) */
- unsigned char cs_calc; /* Checksum calculated */
- unsigned char cs_recv; /* Checksum received */
- static char errfmt[] =
- "Bad checksum (recv=0x%02x; calc=0x%02x); retrying\r\n";
-
- while (1){
- if ( !rdnin(hdr,3,5) ){
- return TIMEOUT;
- }
- cnt = (hdr[1]<<8) + hdr[0] - 1;
- /* -1 for status byte (already read) */
-
- /* Caller's buffer may only be big enough for message body,
- * without status byte and checksum, so make sure to read
- * checksum into a separate buffer.
- */
- if ( !rdnin(buf,cnt,5) || !rdnin(&cs_recv,1,5) ){
- return TIMEOUT;
- }
-
- /* Calculate checksum
- */
- cs_calc = hdr[0] + hdr[1] + hdr[2];
- for ( i = 0; i < cnt; i++ ){
- cs_calc += buf[i];
- }
- if ( cs_calc == cs_recv ){
- serial_write (nindy_serial, "+", 1);
- return hdr[2];
- }
-
- /* Bad checksum: report, send NAK, and re-receive
- */
- fprintf(stderr, errfmt, cs_recv, cs_calc );
- serial_write (nindy_serial, "-", 1);
- }
-}
-
-
-/******************************************************************************
- * putpkt:
- * Send a packet to NINDY, checksumming it and converting special
- * characters to escape sequences.
- ******************************************************************************/
-
-/* This macro puts the character 'c' into the buffer pointed at by 'p',
- * and increments the pointer. If 'c' is one of the 4 special characters
- * in the transmission protocol, it is converted into a 2-character
- * escape sequence.
- */
-#define PUTBUF(c,p) \
- if ( c == DLE || c == ESC || c == XON || c == XOFF ){ \
- *p++ = ESC; \
- *p++ = c | 0x40; \
- } else { \
- *p++ = c; \
- }
-
-static
-putpkt( msg, len )
- unsigned char *msg; /* Command to be sent, without lead ^P (\020) or checksum */
- int len; /* Number of bytes in message */
-{
- static char *buf = NULL;/* Local buffer -- build packet here */
- static int maxbuf = 0; /* Current length of buffer */
- unsigned char ack; /* Response received from NINDY */
- unsigned char checksum; /* Packet checksum */
- char *p; /* Pointer into buffer */
- int lenhi, lenlo; /* High and low bytes of message length */
- int i;
-
-
- /* Make sure local buffer is big enough. Must include space for
- * packet length, message body, and checksum. And in the worst
- * case, each character would expand into a 2-character escape
- * sequence.
- */
- if ( maxbuf < ((2*len)+10) ){
- if ( buf ){
- free( buf );
- }
- buf = xmalloc( maxbuf=((2*len)+10) );
- }
-
- /* Attention, NINDY!
- */
- serial_write (nindy_serial, "\020", 1);
-
-
- lenlo = len & 0xff;
- lenhi = (len>>8) & 0xff;
- checksum = lenlo + lenhi;
- p = buf;
-
- PUTBUF( lenlo, p );
- PUTBUF( lenhi, p );
-
- for ( i=0; i<len; i++ ){
- PUTBUF( msg[i], p );
- checksum += msg[i];
- }
-
- PUTBUF( checksum, p );
-
- /* Send checksummed message over and over until we get a positive ack
- */
- serial_write (nindy_serial, buf, p - buf);
- while (1){
- if ( !rdnin(&ack,1,5) ){
- /* timed out */
- fprintf(stderr,"ACK timed out; resending\r\n");
- /* Attention, NINDY! */
- serial_write (nindy_serial, "\020", 1);
- serial_write (nindy_serial, buf, p - buf);
- } else if ( ack == '+' ){
- return;
- } else if ( ack == '-' ){
- fprintf( stderr, "Remote NAK; resending\r\n" );
- serial_write (nindy_serial, buf, p - buf);
- } else {
- fprintf( stderr, "Bad ACK, ignored: <%c>\r\n", ack );
- }
- }
-}
-
-
-
-/******************************************************************************
- * send:
- * Send a message to a remote NINDY. Check message status byte
- * for error responses. If no error, return NINDY reponse (if any).
- ******************************************************************************/
-static
-send( out, len, in )
- unsigned char *out; /* Message to be sent to NINDY */
- int len; /* Number of meaningful bytes in out buffer */
- unsigned char *in; /* Where to put response received from NINDY */
-{
- char *fmt;
- int status;
- static char *errmsg[] = {
- "", /* 0 */
- "Buffer overflow", /* 1 */
- "Unknown command", /* 2 */
- "Wrong amount of data to load register(s)", /* 3 */
- "Missing command argument(s)", /* 4 */
- "Odd number of digits sent to load memory", /* 5 */
- "Unknown register name", /* 6 */
- "No such memory segment", /* 7 */
- "No breakpoint available", /* 8 */
- "Can't set requested baud rate", /* 9 */
- };
-# define NUMERRS ( sizeof(errmsg) / sizeof(errmsg[0]) )
-
- static char err1[] = "Unknown error response from NINDY: #%d\r\n";
- static char err2[] = "Error response #%d from NINDY: %s\r\n";
-
- while (1){
- putpkt(out,len);
- status = getpkt(in);
- if ( status == TIMEOUT ){
- fprintf( stderr, "Response timed out; resending\r\n" );
- } else {
- break;
- }
- }
-
- if ( status ){
- fmt = status > NUMERRS ? err1 : err2;
- fprintf( stderr, fmt, status, errmsg[status] );
- abort();
- }
-}
-
- /************************
- * *
- * BAUD RATE ROUTINES *
- * *
- ************************/
-
-/* Table of baudrates known to be acceptable to NINDY. Each baud rate
- * appears both as character string and as a Unix baud rate constant.
- */
-struct baudrate {
- char *string;
- int rate;
-};
-
-static struct baudrate baudtab[] = {
- "1200", 1200,
- "2400", 2400,
- "4800", 4800,
- "9600", 9600,
- "19200", 19200,
- "38400", 38400,
- NULL, 0 /* End of table */
-};
-
-/******************************************************************************
- * parse_baudrate:
- * Look up the passed baud rate in the baudrate table. If found, change
- * our internal record of the current baud rate, but don't do anything
- * about the tty just now.
- *
- * Return pointer to baudrate structure on success, NULL on failure.
- ******************************************************************************/
-static
-struct baudrate *
-parse_baudrate(s)
- char *s; /* Desired baud rate, as an ASCII (decimal) string */
-{
- int i;
-
- for ( i=0; baudtab[i].string != NULL; i++ ){
- if ( !strcmp(baudtab[i].string,s) ){
- return &baudtab[i];
- }
- }
- return NULL;
-}
-
-/******************************************************************************
- * try_baudrate:
- * Try speaking to NINDY via the specified file descriptor at the
- * specified baudrate. Assume success if we can send an empty command
- * with a bogus checksum and receive a NAK (response of '-') back within
- * one second.
- *
- * Return 1 on success, 0 on failure.
- ***************************************************************************/
-
-static int
-try_baudrate (serial, brp)
- struct serial *serial;
- struct baudrate *brp;
-{
- unsigned char c;
-
- /* Set specified baud rate and flush all pending input */
- serial_setbaudrate (serial, brp->rate);
- tty_flush (serial);
-
- /* Send empty command with bad checksum, hope for NAK ('-') response */
- serial_write (serial, "\020\0\0\001", 4);
-
- /* Anything but a quick '-', including error, eof, or timeout, means that
- this baudrate doesn't work. */
- return serial_readchar (serial, 1) == '-';
-}
-
-/******************************************************************************
- * autobaud:
- * Get NINDY talking over the specified file descriptor at the specified
- * baud rate. First see if NINDY's already talking at 'baudrate'. If
- * not, run through all the legal baudrates in 'baudtab' until one works,
- * and then tell NINDY to talk at 'baudrate' instead.
- ******************************************************************************/
-static
-autobaud( serial, brp )
- struct serial *serial;
- struct baudrate *brp;
-{
- int i;
- int failures;
-
- say("NINDY at wrong baud rate? Trying to autobaud...\n");
- failures = i = 0;
- while (1)
- {
- say( "\r%s... ", baudtab[i].string );
- if (try_baudrate(serial, &baudtab[i]))
- {
- break;
- }
- if (baudtab[++i].string == NULL)
- {
- /* End of table -- wraparound */
- i = 0;
- if ( failures++ )
- {
- say("\nAutobaud failed again. Giving up.\n");
- exit(1);
- }
- else
- {
- say("\nAutobaud failed. Trying again...\n");
- }
- }
- }
-
- /* Found NINDY's current baud rate; now change it. */
- say("Changing NINDY baudrate to %s\n", brp->string);
- ninBaud (brp->string);
-
- /* Change our baud rate back to rate to which we just set NINDY. */
- serial_setbaudrate (serial, brp->rate);
-}
-
- /**********************************
- * *
- * NINDY INTERFACE ROUTINES *
- * *
- * ninConnect *MUST* be the first *
- * one of these routines called. *
- **********************************/
-
-
-/******************************************************************************
- * ninBaud:
- * Ask NINDY to change the baud rate on its serial port.
- * Assumes we know the baud rate at which NINDY's currently talking.
- ******************************************************************************/
-ninBaud( baudrate )
- char *baudrate; /* Desired baud rate, as a string of ASCII decimal
- * digits.
- */
-{
- unsigned char msg[100];
-
- tty_flush (nindy_serial);
-
- if (old_nindy)
- {
- char *p; /* Pointer into buffer */
- unsigned char csum; /* Calculated checksum */
-
- /* Can't use putpkt() because after the baudrate change NINDY's
- ack/nak will look like gibberish. */
-
- for (p=baudrate, csum=020+'z'; *p; p++)
- {
- csum += *p;
- }
- sprintf (msg, "\020z%s#%02x", baudrate, csum);
- serial_write (nindy_serial, msg, strlen (msg));
- }
- else
- {
- /* Can't use "send" because NINDY reply will be unreadable after
- baud rate change. */
- sprintf( msg, "z%s", baudrate );
- putpkt( msg, strlen(msg)+1 ); /* "+1" to send terminator too */
- }
-}
-
-/******************************************************************************
- * ninBptDel:
- * Ask NINDY to delete the specified type of *hardware* breakpoint at
- * the specified address. If the 'addr' is -1, all breakpoints of
- * the specified type are deleted.
- ***************************************************************************/
-ninBptDel( addr, type )
- long addr; /* Address in 960 memory */
- char type; /* 'd' => data bkpt, 'i' => instruction breakpoint */
-{
- unsigned char buf[10];
-
- if ( old_nindy ){
- OninBptDel( addr, type == 'd' ? 1 : 0 );
- return;
- }
-
- buf[0] = 'b';
- buf[1] = type;
-
- if ( addr == -1 ){
- send( buf, 2, NULL );
- } else {
- store_unsigned_integer (&buf[2], 4, addr);
- send( buf, 6, NULL );
- }
-}
-
-
-/******************************************************************************
- * ninBptSet:
- * Ask NINDY to set the specified type of *hardware* breakpoint at
- * the specified address.
- ******************************************************************************/
-ninBptSet( addr, type )
- long addr; /* Address in 960 memory */
- char type; /* 'd' => data bkpt, 'i' => instruction breakpoint */
-{
- unsigned char buf[10];
-
- if ( old_nindy ){
- OninBptSet( addr, type == 'd' ? 1 : 0 );
- return;
- }
-
-
- buf[0] = 'B';
- buf[1] = type;
- store_unsigned_integer (&buf[2], 4, addr);
- send( buf, 6, NULL );
-}
-
-
-/******************************************************************************
- * ninConnect:
- * Open the specified tty. Get communications working at the specified
- * baud rate. Flush any pending I/O on the tty.
- *
- * Return the file descriptor, or -1 on failure.
- ******************************************************************************/
-int
-ninConnect( name, baudrate, brk, silent, old_protocol )
- char *name; /* "/dev/ttyXX" to be opened */
- char *baudrate;/* baud rate: a string of ascii decimal digits (eg,"9600")*/
- int brk; /* 1 => send break to tty first thing after opening it*/
- int silent; /* 1 => stifle unnecessary messages when talking to
- * this tty.
- */
- int old_protocol;
-{
- int i;
- char *p;
- struct baudrate *brp;
-
- /* We will try each of the following paths when trying to open the tty
- */
- static char *prefix[] = { "", "/dev/", "/dev/tty", NULL };
-
- if ( old_protocol ){
- old_nindy = 1;
- }
-
- quiet = silent; /* Make global to this file */
-
- for ( i=0; prefix[i] != NULL; i++ ){
- p = xmalloc(strlen(prefix[i]) + strlen(name) + 1 );
- strcpy( p, prefix[i] );
- strcat( p, name );
- nindy_serial = serial_open (p);
- if (nindy_serial != NULL) {
-#ifdef TIOCEXCL
- /* Exclusive use mode (hp9000 does not support it) */
- ioctl(nindy_serial->fd,TIOCEXCL,NULL);
-#endif
- serial_raw (nindy_serial);
-
- if (brk)
- {
- serial_send_break (nindy_serial);
- }
-
- brp = parse_baudrate( baudrate );
- if ( brp == NULL ){
- say("Illegal baudrate %s ignored; using 9600\n",
- baudrate);
- brp = parse_baudrate( "9600" );
- }
-
- if ( !try_baudrate(nindy_serial, brp) ){
- autobaud(nindy_serial, brp);
- }
- tty_flush (nindy_serial);
- say( "Connected to %s\n", p );
- free(p);
- break;
- }
- free(p);
- }
- return 0;
-}
-
-#if 0
-
-/* Currently unused; shouldn't we be doing this on target_kill and
-perhaps target_mourn? FIXME. */
-
-/******************************************************************************
- * ninGdbExit:
- * Ask NINDY to leave GDB mode and print a NINDY prompt.
- ****************************************************************************/
-ninGdbExit()
-{
- if ( old_nindy ){
- OninGdbExit();
- return;
- }
- putpkt((unsigned char *) "E", 1 );
-}
-#endif
-
-/******************************************************************************
- * ninGo:
- * Ask NINDY to start or continue execution of an application program
- * in it's memory at the current ip.
- ******************************************************************************/
-ninGo( step_flag )
- int step_flag; /* 1 => run in single-step mode */
-{
- if ( old_nindy ){
- OninGo( step_flag );
- return;
- }
- putpkt((unsigned char *) (step_flag ? "s" : "c"), 1 );
-}
-
-
-/******************************************************************************
- * ninMemGet:
- * Read a string of bytes from NINDY's address space (960 memory).
- ******************************************************************************/
-int
-ninMemGet(ninaddr, hostaddr, len)
- long ninaddr; /* Source address, in the 960 memory space */
- unsigned char *hostaddr; /* Destination address, in our memory space */
- int len; /* Number of bytes to read */
-{
- unsigned char buf[BUFSIZE+20];
- int cnt; /* Number of bytes in next transfer */
- int origlen = len;
-
- if ( old_nindy ){
- OninMemGet(ninaddr, hostaddr, len);
- return;
- }
-
- for ( ; len > 0; len -= BUFSIZE ){
- cnt = len > BUFSIZE ? BUFSIZE : len;
-
- buf[0] = 'm';
- store_unsigned_integer (&buf[1], 4, ninaddr);
- buf[5] = cnt & 0xff;
- buf[6] = (cnt>>8) & 0xff;
-
- send( buf, 7, hostaddr );
-
- ninaddr += cnt;
- hostaddr += cnt;
- }
- return origlen;
-}
-
-
-/******************************************************************************
- * ninMemPut:
- * Write a string of bytes into NINDY's address space (960 memory).
- ******************************************************************************/
-int
-ninMemPut( ninaddr, hostaddr, len )
- long ninaddr; /* Destination address, in NINDY memory space */
- unsigned char *hostaddr; /* Source address, in our memory space */
- int len; /* Number of bytes to write */
-{
- unsigned char buf[BUFSIZE+20];
- int cnt; /* Number of bytes in next transfer */
- int origlen = len;
-
- if ( old_nindy ){
- OninMemPut( ninaddr, hostaddr, len );
- return;
- }
- for ( ; len > 0; len -= BUFSIZE ){
- cnt = len > BUFSIZE ? BUFSIZE : len;
-
- buf[0] = 'M';
- store_unsigned_integer (&buf[1], 4, ninaddr);
- memcpy(buf + 5, hostaddr, cnt);
- send( buf, cnt+5, NULL );
-
- ninaddr += cnt;
- hostaddr += cnt;
- }
- return origlen;
-}
-
-/******************************************************************************
- * ninRegGet:
- * Retrieve the contents of a 960 register, and return them as a long
- * in host byte order.
- *
- * THIS ROUTINE CAN ONLY BE USED TO READ THE LOCAL, GLOBAL, AND
- * ip/ac/pc/tc REGISTERS.
- *
- ******************************************************************************/
-long
-ninRegGet( regname )
- char *regname; /* Register name recognized by NINDY, subject to the
- * above limitations.
- */
-{
- unsigned char outbuf[10];
- unsigned char inbuf[20];
-
- if ( old_nindy ){
- return OninRegGet( regname );
- }
-
- sprintf( outbuf, "u%s:", regname );
- send( outbuf, strlen(outbuf), inbuf );
- return extract_unsigned_integer (inbuf, 4);
-}
-
-/******************************************************************************
- * ninRegPut:
- * Set the contents of a 960 register.
- *
- * THIS ROUTINE CAN ONLY BE USED TO SET THE LOCAL, GLOBAL, AND
- * ip/ac/pc/tc REGISTERS.
- *
- ******************************************************************************/
-ninRegPut( regname, val )
- char *regname; /* Register name recognized by NINDY, subject to the
- * above limitations.
- */
- long val; /* New contents of register, in host byte-order */
-{
- unsigned char buf[20];
- int len;
-
- if ( old_nindy ){
- OninRegPut( regname, val );
- return;
- }
-
- sprintf( buf, "U%s:", regname );
- len = strlen(buf);
- store_unsigned_integer (&buf[len], 4, val);
- send( buf, len+4, NULL );
-}
-
-/******************************************************************************
- * ninRegsGet:
- * Get a dump of the contents of the entire 960 register set. The
- * individual registers appear in the dump in the following order:
- *
- * pfp sp rip r3 r4 r5 r6 r7
- * r8 r9 r10 r11 r12 r13 r14 r15
- * g0 g1 g2 g3 g4 g5 g6 g7
- * g8 g9 g10 g11 g12 g13 g14 fp
- * pc ac ip tc fp0 fp1 fp2 fp3
- *
- * Each individual register comprises exactly 4 bytes, except for
- * fp0-fp3, which are 8 bytes. All register values are in 960
- * (little-endian) byte order.
- *
- ******************************************************************************/
-ninRegsGet( regp )
- unsigned char *regp; /* Where to place the register dump */
-{
- if ( old_nindy ){
- OninRegsGet( regp );
- return;
- }
- send( (unsigned char *) "r", 1, regp );
-}
-
-
-/******************************************************************************
- * ninRegsPut:
- * Initialize the entire 960 register set to a specified set of values.
- * The format of the register value data should be the same as that
- * returned by ninRegsGet.
- *
- * WARNING:
- * All register values must be in 960 (little-endian) byte order.
- *
- ******************************************************************************/
-ninRegsPut( regp )
- char *regp; /* Pointer to desired values of registers */
-{
-/* Number of bytes that we send to nindy. I believe this is defined by
- the protocol (it does not agree with REGISTER_BYTES). */
-#define NINDY_REGISTER_BYTES ((36*4) + (4*8))
- unsigned char buf[NINDY_REGISTER_BYTES+10];
-
- if ( old_nindy ){
- OninRegsPut( regp );
- return;
- }
-
- buf[0] = 'R';
- memcpy(buf+1, regp, NINDY_REGISTER_BYTES );
- send( buf, NINDY_REGISTER_BYTES+1, NULL );
-}
-
-
-/******************************************************************************
- * ninReset:
- * Ask NINDY to perform a soft reset; wait for the reset to complete.
- *
- ******************************************************************************/
-ninReset()
-{
- unsigned char ack;
-
- if ( old_nindy ){
- OninReset();
- return;
- }
-
- while (1){
- putpkt((unsigned char *) "X", 1 );
- while (1){
- if ( !rdnin(&ack,1,5) ){
- /* Timed out */
- break; /* Resend */
- }
- if ( ack == '+' ){
- return;
- }
- }
- }
-}
-
-
-/******************************************************************************
- * ninSrq:
- * Assume NINDY has stopped execution of the 960 application program in
- * order to process a host service request (srq). Ask NINDY for the
- * srq arguments, perform the requested service, and send an "srq
- * complete" message so NINDY will return control to the application.
- *
- ******************************************************************************/
-ninSrq()
-{
- /* FIXME: Imposes arbitrary limits on lengths of pathnames and such. */
- unsigned char buf[BUFSIZE];
- int retcode;
- unsigned char srqnum;
- int i;
- int offset;
- int arg[MAX_SRQ_ARGS];
-
- if ( old_nindy ){
- OninSrq();
- return;
- }
-
-
- /* Get srq number and arguments
- */
- send((unsigned char *) "!", 1, buf );
-
- srqnum = buf[0];
- for ( i=0, offset=1; i < MAX_SRQ_ARGS; i++, offset+=4 ){
- arg[i] = extract_unsigned_integer (&buf[offset], 4);
- }
-
- /* Process Srq
- */
- switch( srqnum ){
- case BS_CLOSE:
- /* args: file descriptor */
- if ( arg[0] > 2 ){
- retcode = close( arg[0] );
- } else {
- retcode = 0;
- }
- break;
- case BS_CREAT:
- /* args: filename, mode */
- ninStrGet( arg[0], buf );
- retcode = creat(buf,arg[1]);
- break;
- case BS_OPEN:
- /* args: filename, flags, mode */
- ninStrGet( arg[0], buf );
- retcode = open(buf,arg[1],arg[2]);
- break;
- case BS_READ:
- /* args: file descriptor, buffer, count */
- retcode = read(arg[0],buf,arg[2]);
- if ( retcode > 0 ){
- ninMemPut( arg[1], buf, retcode );
- }
- break;
- case BS_SEEK:
- /* args: file descriptor, offset, whence */
- retcode = lseek(arg[0],arg[1],arg[2]);
- break;
- case BS_WRITE:
- /* args: file descriptor, buffer, count */
- ninMemGet( arg[1], buf, arg[2] );
- retcode = write(arg[0],buf,arg[2]);
- break;
- default:
- retcode = -1;
- break;
- }
-
- /* Send request termination status to NINDY
- */
- buf[0] = 'e';
- store_unsigned_integer (&buf[1], 4, retcode);
- send( buf, 5, NULL );
-}
-
-
-/******************************************************************************
- * ninStopWhy:
- * Assume the application program has stopped (i.e., a DLE was received
- * from NINDY). Ask NINDY for status information describing the
- * reason for the halt.
- *
- * Returns a non-zero value if the user program has exited, 0 otherwise.
- * Also returns the following information, through passed pointers:
- * - why: an exit code if program the exited; otherwise the reason
- * why the program halted (see stop.h for values).
- * - contents of register ip (little-endian byte order)
- * - contents of register sp (little-endian byte order)
- * - contents of register fp (little-endian byte order)
- ******************************************************************************/
-char
-ninStopWhy( whyp, ipp, fpp, spp )
- unsigned char *whyp; /* Return the 'why' code through this pointer */
- long *ipp; /* Return contents of register ip through this pointer */
- long *fpp; /* Return contents of register fp through this pointer */
- long *spp; /* Return contents of register sp through this pointer */
-{
- unsigned char buf[30];
- extern char OninStopWhy ();
-
- if ( old_nindy ){
- return OninStopWhy( whyp, ipp, fpp, spp );
- }
- send((unsigned char *) "?", 1, buf );
-
- *whyp = buf[1];
- memcpy ((char *)ipp, &buf[2], sizeof (*ipp));
- memcpy ((char *)fpp, &buf[6], sizeof (*ipp));
- memcpy ((char *)spp, &buf[10], sizeof (*ipp));
- return buf[0];
-}
-
-/******************************************************************************
- * ninStrGet:
- * Read a '\0'-terminated string of data out of the 960 memory space.
- *
- ******************************************************************************/
-static
-ninStrGet( ninaddr, hostaddr )
- unsigned long ninaddr; /* Address of string in NINDY memory space */
- unsigned char *hostaddr; /* Address of the buffer to which string should
- * be copied.
- */
-{
- unsigned char cmd[5];
-
- cmd[0] = '"';
- store_unsigned_integer (&cmd[1], 4, ninaddr);
- send( cmd, 5, hostaddr );
-}
-
-#if 0
-/* Not used. */
-
-/******************************************************************************
- * ninVersion:
- * Ask NINDY for version information about itself.
- * The information is sent as an ascii string in the form "x.xx,<arch>",
- * where,
- * x.xx is the version number
- * <arch> is the processor architecture: "KA", "KB", "MC", "CA" *
- *
- ******************************************************************************/
-int
-ninVersion( p )
- unsigned char *p; /* Where to place version string */
-{
-
- if ( old_nindy ){
- return OninVersion( p );
- }
- send((unsigned char *) "v", 1, p );
- return strlen(p);
-}
-#endif /* 0 */
diff --git a/gdb/nindy-share/stop.h b/gdb/nindy-share/stop.h
deleted file mode 100644
index 82a90a54840..00000000000
--- a/gdb/nindy-share/stop.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/******************************************************************
- Copyright 1990, 1992 Free Software Foundation, Inc.
-
- This code was donated by Intel Corp.
-
- Intel hereby grants you permission to copy, modify, and
- distribute this software and its documentation. Intel grants
- this permission provided that the above copyright notice
- appears in all copies and that both the copyright notice and
- this permission notice appear in supporting documentation. In
- addition, Intel grants this permission provided that you
- prominently mark as not part of the original any modifications
- made to this software or documentation, and that the name of
- Intel Corporation not be used in advertising or publicity
- pertaining to distribution of the software or the documentation
- without specific, written prior permission.
-
- Intel Corporation does not warrant, guarantee or make any
- representations regarding the use of, or the results of the use
- of, the software and documentation in terms of correctness,
- accuracy, reliability, currentness, or otherwise; and you rely
- on the software, documentation and results solely at your own
- risk. */
-/******************************************************************/
-
-
-/******************************************************************
- *
- * REASONS WHY NINDY CAN STOP EXECUTING AN APPLICATION PROGRAM
- *
- * When NINDY stops executing an application program that was running
- * under remote host ("gdb") control, it signals the host by sending
- * a single ^P. The host can then query as to the reason for the halt.
- * NINDY responds with two bytes of information.
- *
- * The first byte is a boolean flag that indicates whether or not
- * the application has exited.
- *
- * If the flag is true, the second byte contains the exit code.
- *
- * If the flag is false, the second byte contains a "reason for
- * stopping" code. This file defines the possible values of that
- * code.
- *
- * There are three categories of reasons why the halt may have occurred:
- * faults, traces, and software interactions. The first two categories
- * are processor-dependent; the values of these codes are tightly coupled
- * to the hardware and should not be changed without first examining
- * src/nindy/common/fault.c. The software interactions involve
- * communication between NINDY and the host debugger; their codes are
- * arbitrary.
- *
- ******************************************************************/
-
-#define FAULT_PARALLEL 0x00
-#define FAULT_UNKNOWN 0x01
-#define FAULT_OPERATION 0x02
-#define FAULT_ARITH 0x03
-#define FAULT_FP 0x04
-#define FAULT_CONSTR 0x05
-#define FAULT_VM 0x06
-#define FAULT_PROTECT 0x07
-#define FAULT_MACHINE 0x08
-#define FAULT_STRUCT 0x09
-#define FAULT_TYPE 0x0a
- /* 0x0b reserved */
-#define FAULT_PROCESS 0x0c
-#define FAULT_DESC 0x0d
-#define FAULT_EVENT 0x0e
- /* 0x0f reserved */
-
-#define LAST_FAULT 0x0f
-
-#define TRACE_STEP 0x10
-#define TRACE_BRANCH 0x11
-#define TRACE_CALL 0x12
-#define TRACE_RET 0x13
-#define TRACE_PRERET 0x14
-#define TRACE_SVC 0x15
-#define TRACE_BKPT 0x16
-
-#define STOP_SRQ 0xfe
- /* Application program has service request to make of host */
-
-#define STOP_GDB_BPT 0xff
- /* Application program has reached breakpoint (fmark) set by host */
diff --git a/gdb/nindy-share/ttyflush.c b/gdb/nindy-share/ttyflush.c
deleted file mode 100644
index f9aaa2edf4f..00000000000
--- a/gdb/nindy-share/ttyflush.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* 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. */
-
-/* This started out life as code shared between the nindy monitor and
- GDB. For various reasons, this is no longer true. Eventually, it
- probably should be merged into remote-nindy.c. */
-
-#include <stdio.h>
-#include "defs.h"
-#include "serial.h"
-
-/* Flush all pending input and output for SERIAL, wait for a second, and
- then if there is a character pending, discard it and flush again. */
-
-int
-tty_flush (serial)
- struct serial *serial;
-{
- while (1)
- {
- serial_flush_input (serial);
- serial_flush_output (serial);
- sleep(1);
- switch (serial_readchar (serial, 0))
- {
- case SERIAL_TIMEOUT:
- case SERIAL_ERROR:
- case SERIAL_EOF:
- return 0;
- default:
- /* We read something. Eeek. Try again. */
- break;
- }
- }
-}
diff --git a/gdb/nindy-tdep.c b/gdb/nindy-tdep.c
deleted file mode 100644
index 1f35062e2bd..00000000000
--- a/gdb/nindy-tdep.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/* Target-machine dependent code for the NINDY monitor running on the Intel 960
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 2000
- Free Software Foundation, Inc.
- Contributed by Intel Corporation.
-
- 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. */
-
-/* Miscellaneous NINDY-dependent routines.
- Some replace macros normally defined in "tm.h". */
-
-#include "defs.h"
-#include "symtab.h"
-#include "frame.h"
-#include "gdbcore.h"
-
-/* 'start_frame' is a variable in the NINDY runtime startup routine
- that contains the frame pointer of the 'start' routine (the routine
- that calls 'main'). By reading its contents out of remote memory,
- we can tell where the frame chain ends: backtraces should halt before
- they display this frame. */
-
-int
-nindy_frame_chain_valid (CORE_ADDR chain, struct frame_info *curframe)
-{
- struct symbol *sym;
- struct minimal_symbol *msymbol;
-
- /* crtnindy.o is an assembler module that is assumed to be linked
- * first in an i80960 executable. It contains the true entry point;
- * it performs startup up initialization and then calls 'main'.
- *
- * 'sf' is the name of a variable in crtnindy.o that is set
- * during startup to the address of the first frame.
- *
- * 'a' is the address of that variable in 80960 memory.
- */
- static char sf[] = "start_frame";
- CORE_ADDR a;
-
-
- chain &= ~0x3f; /* Zero low 6 bits because previous frame pointers
- contain return status info in them. */
- if (chain == 0)
- {
- return 0;
- }
-
- sym = lookup_symbol (sf, 0, VAR_NAMESPACE, (int *) NULL,
- (struct symtab **) NULL);
- if (sym != 0)
- {
- a = SYMBOL_VALUE (sym);
- }
- else
- {
- msymbol = lookup_minimal_symbol (sf, NULL, NULL);
- if (msymbol == NULL)
- return 0;
- a = SYMBOL_VALUE_ADDRESS (msymbol);
- }
-
- return (chain != read_memory_integer (a, 4));
-}
diff --git a/gdb/ptx4-nat.c b/gdb/ptx4-nat.c
deleted file mode 100644
index 1798b509f30..00000000000
--- a/gdb/ptx4-nat.c
+++ /dev/null
@@ -1,211 +0,0 @@
-/* Native-dependent code for ptx 4.0
- Copyright 1988, 1989, 1991, 1992, 1994, 1999, 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. */
-
-#include "defs.h"
-#include "inferior.h"
-#include "gdbcore.h"
-#include "regcache.h"
-#include <sys/procfs.h>
-#include <sys/ptrace.h>
-#include <sys/param.h>
-#include <fcntl.h>
-
-/* Prototypes for supply_gregset etc. */
-#include "gregset.h"
-
-/* Given a pointer to a general register set in /proc format (gregset_t *),
- unpack the register contents and supply them as gdb's idea of the current
- register values. */
-
-void
-supply_gregset (gregset_t *gregsetp)
-{
- supply_register (EAX_REGNUM, (char *) &(*gregsetp)[EAX]);
- supply_register (EDX_REGNUM, (char *) &(*gregsetp)[EDX]);
- supply_register (ECX_REGNUM, (char *) &(*gregsetp)[ECX]);
- supply_register (EBX_REGNUM, (char *) &(*gregsetp)[EBX]);
- supply_register (ESI_REGNUM, (char *) &(*gregsetp)[ESI]);
- supply_register (EDI_REGNUM, (char *) &(*gregsetp)[EDI]);
- supply_register (ESP_REGNUM, (char *) &(*gregsetp)[UESP]);
- supply_register (EBP_REGNUM, (char *) &(*gregsetp)[EBP]);
- supply_register (EIP_REGNUM, (char *) &(*gregsetp)[EIP]);
- supply_register (EFLAGS_REGNUM, (char *) &(*gregsetp)[EFL]);
-}
-
-void
-fill_gregset (gregset_t *gregsetp, int regno)
-{
- int regi;
-
- for (regi = 0; regi < NUM_REGS; regi++)
- {
- if ((regno == -1) || (regno == regi))
- {
- (*gregsetp)[regi] = *(greg_t *) & deprecated_registers[REGISTER_BYTE (regi)];
- }
- }
-}
-
-/* Given a pointer to a floating point register set in /proc format
- (fpregset_t *), unpack the register contents and supply them as gdb's
- idea of the current floating point register values. */
-
-void
-supply_fpregset (fpregset_t *fpregsetp)
-{
- supply_fpu_registers ((struct fpusave *) &fpregsetp->fp_reg_set);
- supply_fpa_registers ((struct fpasave *) &fpregsetp->f_wregs);
-}
-
-/* Given a pointer to a floating point register set in /proc format
- (fpregset_t *), update the register specified by REGNO from gdb's idea
- of the current floating point register set. If REGNO is -1, update
- them all. */
-
-void
-fill_fpregset (fpregset_t *fpregsetp, int regno)
-{
- int regi;
- char *to;
- char *from;
-
- /* FIXME: see m68k-tdep.c for an example, for the m68k. */
-}
-
-/*
- * This doesn't quite do the same thing as the procfs.c version, but give
- * it the same name so we don't have to put an ifdef in solib.c.
- */
-/* this could use elf_interpreter() from elfread.c */
-int
-proc_iterate_over_mappings (int (*func) (int, CORE_ADDR))
-{
- vaddr_t curseg, memptr;
- pt_vseg_t pv;
- int rv, cmperr;
- sec_ptr interp_sec;
- char *interp_content;
- int interp_fd, funcstat;
- unsigned int size;
- char buf1[NBPG], buf2[NBPG];
-
- /*
- * The following is really vile. We can get the name of the
- * shared library from the exec_bfd, and we can get a list of
- * each virtual memory segment, but there is no simple way to
- * find the mapped segment from the shared library (ala
- * procfs's PIOCOPENMEM). As a pretty nasty kludge, we
- * compare the virtual memory segment to the contents of the
- * .interp file. If they match, we assume that we've got the
- * right one.
- */
-
- /*
- * TODO: for attach, use XPT_OPENT to get the executable, in
- * case we're attached without knowning the executable's
- * filename.
- */
-
-#ifdef VERBOSE_DEBUG
- printf ("proc_iter\n");
-#endif
- interp_sec = bfd_get_section_by_name (exec_bfd, ".interp");
- if (!interp_sec)
- {
- return 0;
- }
-
- size = bfd_section_size (exec_bfd, interp_sec);
- interp_content = alloca (size);
- if (0 == bfd_get_section_contents (exec_bfd, interp_sec,
- interp_content, (file_ptr) 0, size))
- {
- return 0;
- }
-
-#ifdef VERBOSE_DEBUG
- printf ("proc_iter: \"%s\"\n", interp_content);
-#endif
- interp_fd = open (interp_content, O_RDONLY, 0);
- if (-1 == interp_fd)
- {
- return 0;
- }
-
- curseg = 0;
- while (1)
- {
- rv = ptrace (PT_NEXT_VSEG, PIDGET (inferior_ptid), &pv, curseg);
-#ifdef VERBOSE_DEBUG
- printf ("PT_NEXT_VSEG: rv %d errno %d\n", rv, errno);
-#endif
- if (-1 == rv)
- break;
- if (0 == rv)
- break;
-#ifdef VERBOSE_DEBUG
- printf ("pv.pv_start 0x%x pv_size 0x%x pv_prot 0x%x\n",
- pv.pv_start, pv.pv_size, pv.pv_prot);
-#endif
- curseg = pv.pv_start + pv.pv_size;
-
- rv = lseek (interp_fd, 0, SEEK_SET);
- if (-1 == rv)
- {
- perror ("lseek");
- close (interp_fd);
- return 0;
- }
- for (memptr = pv.pv_start; memptr < pv.pv_start + pv.pv_size;
- memptr += NBPG)
- {
-#ifdef VERBOSE_DEBUG
- printf ("memptr 0x%x\n", memptr);
-#endif
- rv = read (interp_fd, buf1, NBPG);
- if (-1 == rv)
- {
- perror ("read");
- close (interp_fd);
- return 0;
- }
- rv = ptrace (PT_RDATA_PAGE, PIDGET (inferior_ptid), buf2,
- memptr);
- if (-1 == rv)
- {
- perror ("ptrace");
- close (interp_fd);
- return 0;
- }
- cmperr = memcmp (buf1, buf2, NBPG);
- if (cmperr)
- break;
- }
- if (0 == cmperr)
- {
- /* this is it */
- funcstat = (*func) (interp_fd, pv.pv_start);
- break;
- }
- }
- close (interp_fd);
- return 0;
-}
diff --git a/gdb/saber.suppress b/gdb/saber.suppress
deleted file mode 100644
index 6dda1c5f2da..00000000000
--- a/gdb/saber.suppress
+++ /dev/null
@@ -1,451 +0,0 @@
-
-
-/* Options for project */
-unsetopt ansi
-setopt auto_compile
-unsetopt auto_reload
-setopt auto_replace
-unsetopt batch_load
-unsetopt batch_run
-unsetopt cc_prog
-setopt ccargs -g
-unsetopt create_file
-unsetopt debug_child
-unsetopt echo
-setopt edit_jobs 5
-unsetopt eight_bit
-setopt line_edit
-setopt line_meta
-setopt lint_load 2
-setopt lint_run 2
-setopt list_action
-setopt load_flags -I. -g -I.. -I../vx-share
-unsetopt long_not_int
-unsetopt make_args
-setopt make_hfiles
-unsetopt make_offset
-unsetopt make_prog
-setopt make_symbol #
-setopt mem_config 16384
-unsetopt mem_trace
-setopt num_proc 1
-unsetopt page_cmds
-setopt page_list 19
-unsetopt page_load
-unsetopt path
-setopt proto_path . /s2/saber_dir30/sun4-40/proto /s2/saber_dir30/sun4-40/../common/proto
-unsetopt preprocessor
-setopt program_name a.out
-unsetopt print_custom
-setopt print_pointer
-setopt print_string 20
-unsetopt save_memory
-setopt sbrk_size 1048576
-setopt src_err 3
-setopt src_step 1
-setopt src_stop 3
-setopt sys_load_flags -L/lib -L/usr/lib -L/usr/local/lib -I/usr/include -Dunix -Dsun -Dsparc
-unsetopt tab_stop
-unsetopt terse_suppress
-unsetopt terse_where
-setopt unset_value 191
-unsetopt win_fork_nodup
-setopt win_no_raise
-unsetopt win_message_list
-unsetopt win_project_list
-/* Suppressions for project */
-suppress 6 in read_huge_number
-/* Over/underflow <plus> */
-suppress 8 in read_huge_number
-/* Over/underflow <multiply> */
-suppress 22
-/* Pointer subtraction */
-suppress 22 in free_all_psymtabs
-/* Pointer subtraction */
-suppress 22 in free_all_symtabs
-/* Pointer subtraction */
-suppress 56 in print_string
-/* Information lost <function> */
-suppress 65 "../bfd/bfd.c":379
-/* Too many function arguments */
-suppress 65 on printf_filtered
-/* Too many function arguments */
-suppress 65 on fprintf_filtered
-/* Too many function arguments */
-suppress 65 on vfprintf_filtered
-/* Too many function arguments */
-suppress 65 on query
-/* Too many function arguments */
-suppress 65 on fatal_dump_core
-/* Too many function arguments */
-suppress 65 on fatal
-/* Too many function arguments */
-suppress 65 on error
-/* Too many function arguments */
-suppress 65 on noprocess
-/* Too many function arguments */
-suppress 65
-/* Too many function arguments */
-suppress 66 on say
-/* Too few function arguments */
-suppress 66 on printf_filtered
-/* Too few function arguments */
-suppress 66 on fprintf_filtered
-/* Too few function arguments */
-suppress 66 on vfprintf_filtered
-/* Too few function arguments */
-suppress 66 on query
-/* Too few function arguments */
-suppress 66 on fatal_dump_core
-/* Too few function arguments */
-suppress 66 on fatal
-/* Too few function arguments */
-suppress 66 on error
-/* Too few function arguments */
-suppress 67 on printf_filtered
-/* Signed/unsigned argument mismatch */
-suppress 67 on fprintf_filtered
-/* Signed/unsigned argument mismatch */
-suppress 67 on vfprintf_filtered
-/* Signed/unsigned argument mismatch */
-suppress 67 on query
-/* Signed/unsigned argument mismatch */
-suppress 67 on fatal_dump_core
-/* Signed/unsigned argument mismatch */
-suppress 67 on fatal
-/* Signed/unsigned argument mismatch */
-suppress 67 on error
-/* Signed/unsigned argument mismatch */
-suppress 67
-/* Signed/unsigned argument mismatch */
-suppress 68 on bfd_get_section_contents
-/* Benign argument mismatch */
-suppress 68 on _do_getblong
-/* Benign argument mismatch */
-suppress 68 on supply_register
-/* Benign argument mismatch */
-suppress 68 on target_write_memory
-/* Benign argument mismatch */
-suppress 68 on write_register_bytes
-/* Benign argument mismatch */
-suppress 68 on read_register_bytes
-/* Benign argument mismatch */
-suppress 68 on read_memory
-/* Benign argument mismatch */
-suppress 68 on say
-/* Benign argument mismatch */
-suppress 68 on printf_filtered
-/* Benign argument mismatch */
-suppress 68 on fprintf_filtered
-/* Benign argument mismatch */
-suppress 68 on vfprintf_filtered
-/* Benign argument mismatch */
-suppress 68 on query
-/* Benign argument mismatch */
-suppress 68 on fatal_dump_core
-/* Benign argument mismatch */
-suppress 68 on fatal
-/* Benign argument mismatch */
-suppress 68 on error
-/* Benign argument mismatch */
-suppress 68 in find_solib
-/* Benign argument mismatch */
-suppress 68 on child_wait
-/* Benign argument mismatch */
-suppress 68 on xrealloc
-/* Benign argument mismatch */
-suppress 68 on myread
-/* Benign argument mismatch */
-suppress 68 in do_cleanups
-/* Benign argument mismatch */
-suppress 68 on make_cleanup
-/* Benign argument mismatch */
-suppress 68 on target_read_memory
-/* Benign argument mismatch */
-suppress 69 on printf_filtered
-/* Serious argument mismatch */
-suppress 69 on fprintf_filtered
-/* Serious argument mismatch */
-suppress 69 on vfprintf_filtered
-/* Serious argument mismatch */
-suppress 69 on query
-/* Serious argument mismatch */
-suppress 69 on fatal_dump_core
-/* Serious argument mismatch */
-suppress 69 on fatal
-/* Serious argument mismatch */
-suppress 69 on error
-/* Serious argument mismatch */
-suppress 70 on printf_filtered
-/* Passing illegal enumeration value */
-suppress 70 on fprintf_filtered
-/* Passing illegal enumeration value */
-suppress 70 on vfprintf_filtered
-/* Passing illegal enumeration value */
-suppress 70 on query
-/* Passing illegal enumeration value */
-suppress 70 on fatal_dump_core
-/* Passing illegal enumeration value */
-suppress 70 on fatal
-/* Passing illegal enumeration value */
-suppress 70 on error
-/* Passing illegal enumeration value */
-suppress 80 on first_link_map_member
-/* Returning invalid pointer */
-suppress 110 in printf_filtered
-/* Signed/unsigned memory retrieval */
-suppress 110 in fprintf_filtered
-/* Signed/unsigned memory retrieval */
-suppress 110 in vfprintf_filtered
-/* Signed/unsigned memory retrieval */
-suppress 110 in query
-/* Signed/unsigned memory retrieval */
-suppress 110 in fatal_dump_core
-/* Signed/unsigned memory retrieval */
-suppress 110 in fatal
-/* Signed/unsigned memory retrieval */
-suppress 110 in error
-/* Signed/unsigned memory retrieval */
-suppress 112 in printf_filtered
-/* Memory retrieval */
-suppress 112 in fprintf_filtered
-/* Memory retrieval */
-suppress 112 in vfprintf_filtered
-/* Memory retrieval */
-suppress 112 in query
-/* Memory retrieval */
-suppress 112 in fatal_dump_core
-/* Memory retrieval */
-suppress 112 in fatal
-/* Memory retrieval */
-suppress 112 in error
-/* Memory retrieval */
-suppress 112
-/* Memory retrieval */
-suppress 112 ../symtab.c
-/* Memory retrieval */
-suppress 112 in child_xfer_memory
-/* Memory retrieval */
-suppress 165 in frame_saved_pc
-/* Dereference */
-suppress 165 in get_prev_frame_info
-/* Dereference */
-suppress 167 in get_prev_frame_info
-/* Selection */
-suppress 167 in frame_saved_pc
-/* Selection */
-suppress 442 in try_baudrate
-/* Escape has null value */
-suppress 529 in read_range_type
-/* Statement not reached */
-suppress 529 in process_one_symbol
-/* Statement not reached */
-suppress 529 in unpack_double
-/* Statement not reached */
-suppress 529 in wait_for_inferior
-/* Statement not reached */
-suppress 529 in do_registers_info
-/* Statement not reached */
-suppress 529 in value_from_register
-/* Statement not reached */
-suppress 529 in solib_create_inferior_hook
-/* Constant in conditional */
-suppress 530
-/* Empty body of statement */
-suppress 546 in net_quit
-/* Function exits through bottom */
-suppress 546 in net_wait
-/* Function exits through bottom */
-suppress 546 in vx_remove_breakpoint
-/* Function exits through bottom */
-suppress 546 in vx_insert_breakpoint
-/* Function exits through bottom */
-suppress 546 in value_less
-/* Function exits through bottom */
-suppress 546 in value_equal
-/* Function exits through bottom */
-suppress 546 in unpack_long
-/* Function exits through bottom */
-suppress 558 in solib_create_inferior_hook
-/* Constant in conditional */
-suppress 558 in read_range_type
-/* Constant in conditional */
-suppress 558 in process_one_symbol
-/* Constant in conditional */
-suppress 558 in read_dbx_symtab
-/* Constant in conditional */
-suppress 558 in vx_write_register
-/* Constant in conditional */
-suppress 558 in vx_read_register
-/* Constant in conditional */
-suppress 558 in unpack_double
-/* Constant in conditional */
-suppress 558 in wait_for_inferior
-/* Constant in conditional */
-suppress 558 in do_registers_info
-/* Constant in conditional */
-suppress 558 in value_from_register
-/* Constant in conditional */
-suppress 558 in add_enum_psymbol
-/* Constant in conditional */
-suppress 558 in add_partial_symbol
-/* Constant in conditional */
-suppress 558 mfree.c
-/* Constant in conditional */
-suppress 558 mmalloc.c
-/* Constant in conditional */
-suppress 558 mrealloc.c
-/* Constant in conditional */
-suppress 560 in solib_address
-/* Assignment within conditional */
-suppress 560 in solib_info
-/* Assignment within conditional */
-suppress 560 in solib_add
-/* Assignment within conditional */
-suppress 560 in read_type
-/* Assignment within conditional */
-suppress 560 in type_print_base
-/* Assignment within conditional */
-suppress 560 in type_print_derivation_info
-/* Assignment within conditional */
-suppress 560 in block_depth
-/* Assignment within conditional */
-suppress 560 in select_source_symtab
-/* Assignment within conditional */
-suppress 560 in clear_value_history
-/* Assignment within conditional */
-suppress 560 in clear_displays
-/* Assignment within conditional */
-suppress 560 in initialize_main
-/* Assignment within conditional */
-suppress 560 in echo_command
-/* Assignment within conditional */
-suppress 560 in unset_in_environ
-/* Assignment within conditional */
-suppress 560 in set_in_environ
-/* Assignment within conditional */
-suppress 560 in get_in_environ
-/* Assignment within conditional */
-suppress 560 in do_setshow_command
-/* Assignment within conditional */
-suppress 560 in breakpoint_1
-/* Assignment within conditional */
-suppress 590 on sig
-/* Unused formal parameter */
-suppress 590 in nindy_create_inferior
-/* Unused formal parameter */
-suppress 590 in add_to_section_table
-/* Unused formal parameter */
-suppress 590 in vx_create_inferior
-/* Unused formal parameter */
-suppress 590 in host_convert_from_virtual
-/* Unused formal parameter */
-suppress 590 in host_convert_to_virtual
-/* Unused formal parameter */
-suppress 590 on siggnal
-/* Unused formal parameter */
-suppress 590 in init_sig
-/* Unused formal parameter */
-suppress 590 in nindy_resume
-/* Unused formal parameter */
-suppress 590 in set_history_size_command
-/* Unused formal parameter */
-suppress 590 in not_just_help_class_command
-/* Unused formal parameter */
-suppress 590 on regno
-/* Unused formal parameter */
-suppress 590 on from_tty
-/* Unused formal parameter */
-suppress 590 on args
-/* Unused formal parameter */
-suppress 590 in process_symbol_pair
-/* Unused formal parameter */
-suppress 591 in print_scalar_formatted
-/* Unused automatic variable */
-suppress 592 on rcsid
-/* Unused static */
-suppress 594 in call_function_by_hand
-/* Set but not used */
-suppress 594 in record_latest_value
-/* Set but not used */
-suppress 594 in bpstat_stop_status
-/* Set but not used */
-suppress 595 in coffstrip
-/* Used before set */
-suppress 652 ../include/bfd.h
-/* Declaration has no effect */
-suppress 652 /usr/include/machine/reg.h
-/* Declaration has no effect */
-suppress 652 /usr/include/sun4/reg.h
-/* Declaration has no effect */
-suppress 68 on complain
-/* Benign type mismatch */
-suppress 3 in read_range_type
-/* Over/underflow unary minus */
-suppress 442 ../bfd/archive.c
-/* \0 in string */
-suppress 558 ../bfd/b.out.c
-/* Conditional if always true */
-suppress 558 ../bfd/coffswap.c
-/* Conditional if always true -- bfd_h_put_x */
-suppress 529 ../bfd/coffswap.c
-/* Stmt unreach -- bfd_h_put_x */
-suppress 590 ../bfd/ecoff.c
-/* Formal parameter not used */
-suppress 590 on ignore
-/* Formal param not used */
-suppress 590 on ignore_exec_bfd
-/* Formal param not used */
-suppress 590 on ignore_core_bfd
-/* Formal param not used */
-suppress 590 on ignore_input_section
-/* Formal param not used */
-suppress 590 on ignore_newsect
-/* Formal param not used */
-suppress 590 on ignore_abfd
-/* Formal param not used */
-suppress 590 on ignore_symbol
-/* Formal param not used */
-suppress 590 on ignore_symbols
-/* Formal param not used */
-suppress 590 on signo
-/* Formal param not used */
-suppress 652
-/* The declaration has no effect */
-suppress 442 in ../bfd/archive.c
-/* Escape sequence in string literal has null value */
-
-/* Signals caught and ignored */
-catch HUP
-catch QUIT
-catch ILL
-catch TRAP
-catch IOT
-catch EMT
-catch FPE
-catch KILL
-catch BUS
-catch SEGV
-catch SYS
-catch PIPE
-catch TERM
-catch URG
-catch STOP
-catch TSTP
-catch TTIN
-catch TTOU
-catch IO
-catch XCPU
-catch XFSZ
-catch VTALRM
-catch PROF
-catch LOST
-catch USR1
-catch USR2
-ignore INT
-ignore ALRM
-ignore CONT
-ignore CHLD
-ignore WINCH
-
-/* Status of project */