diff options
author | Andrew Cagney <cagney@redhat.com> | 2001-02-08 06:30:25 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2001-02-08 06:30:25 +0000 |
commit | 7fcca85b94e4e65b955508154a44466a2b79dff4 (patch) | |
tree | 6894b5f9c430dc46fd4a2afa40691c11880e0b27 | |
parent | 8e65ff28b0780a52bdbe067b6297a66f9ec4e16e (diff) | |
download | gdb-7fcca85b94e4e65b955508154a44466a2b79dff4.zip gdb-7fcca85b94e4e65b955508154a44466a2b79dff4.tar.gz gdb-7fcca85b94e4e65b955508154a44466a2b79dff4.tar.bz2 |
Remove configurations marked as obsolete in 5.0.
34 files changed, 50 insertions, 6168 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 62b0330..873e4aa 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,41 @@ +Wed Feb 7 22:28:31 2001 Andrew Cagney <cagney@redhat.com> + + * configure.tgt: Remove references to convex, pyramid, altos and + tahoe. + * configure.host: Ditto. + * MAINTAINERS: Ditto. + * NEWS: Update. + + * tahoe-tdep.c: Delete obsolete file. + * pyr-xdep.c: Ditto. + * pyr-tdep.c: Ditto. + * convex-tdep.c: Ditto. + * convex-xdep.c: Ditto. + * config/tahoe/xm-tahoe.h: Ditto. + * config/tahoe/tm-tahoe.h: Ditto. + * config/tahoe/tahoe.mt: Ditto. + * config/tahoe/tahoe.mh: Ditto. + * config/pyr/xm-pyr.h: Ditto. + * config/pyr/tm-pyr.h: Ditto. + * config/pyr/pyramid.mt: Ditto. + * config/pyr/pyramid.mh: Ditto. + * config/m68k/xm-altos.h: Ditto. + * config/m68k/tm-altos.h: Ditto. + * config/m68k/altos.mt: Ditto. + * config/m68k/altos.mh: Ditto. + * config/convex/xm-convex.h: Ditto. + * config/convex/tm-convex.h: Ditto. + * config/convex/convex.mt: Ditto. + * config/convex/convex.mh: Ditto. + * config/convex/Convex.notes: Ditto. + * config/arm/xm-arm.h: Ditto. + * config/arm/nm-arm.h: Ditto. + * config/arm/arm.mt: Ditto. + * config/arm/arm.mh: Ditto. + * arm-convert.s: Ditto. + * arm-xdep.c: Ditto. + * altos-xdep.c: Ditto. + Wed Feb 7 19:41:21 2001 Andrew Cagney <cagney@redhat.com> * defs.h (internal_error, internal_verror): Add __FILE__ and diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS index 87923a2..2048fc3 100644 --- a/gdb/MAINTAINERS +++ b/gdb/MAINTAINERS @@ -62,8 +62,6 @@ maintainer works with the native maintainer when resolving API issues. Jim Ingham jingham@apple.com Scott Bambrough scottb@netwinder.org - convex OBSOLETE - d10v --target=d10v-elf ,-Werror Andrew Cagney cagney@cygnus.com @@ -125,8 +123,6 @@ maintainer works with the native maintainer when resolving API issues. Kevin Buettner kevinb@cygnus.com Nick Duffek nsd@cygnus.com - pyramid OBSOLETE - romp (?) Maintenance only @@ -139,8 +135,6 @@ maintainer works with the native maintainer when resolving API issues. sparc --target=sparc-elf,sparc64-elf ,-Werror David Taylor taylor@cygnus.com - tahoe OBSOLETE - tic80 (--target=tic80-coff broken) Maintenance only @@ -14,7 +14,18 @@ x86 FreeBSD 3.x and 4.x i[3456]86*-freebsd[34]* x86 FreeBSD before 2.2 i[3456]86*-freebsd{1,2.[01]}*, -* Deleted configurations +Configurations that have been declared obsolete in this release have +been commented out. Unless there is activity to revive these +configurations, the next release of GDB will have their sources +permanently REMOVED. + +* REMOVED configurations + +Altos 3068 m68*-altos-* +Convex c1-*-*, c2-*-* +Pyramid pyramid-*-* +ARM RISCix arm-*-* (as host) +Tahoe tahoe-*-* * Other news: diff --git a/gdb/altos-xdep.c b/gdb/altos-xdep.c deleted file mode 100644 index 2ccefac..0000000 --- a/gdb/altos-xdep.c +++ /dev/null @@ -1,163 +0,0 @@ -/* OBSOLETE /* Low level interface to ptrace, for GDB when running under m68k SVR2 Unix */ -/* OBSOLETE on Altos 3068. Report bugs to Jyrki Kuoppala <jkp@cs.hut.fi> */ -/* OBSOLETE Copyright (C) 1989, 1991 Free Software Foundation, Inc. */ -/* OBSOLETE */ -/* OBSOLETE This file is part of GDB. */ -/* OBSOLETE */ -/* OBSOLETE This program is free software; you can redistribute it and/or modify */ -/* OBSOLETE it under the terms of the GNU General Public License as published by */ -/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */ -/* OBSOLETE (at your option) any later version. */ -/* OBSOLETE */ -/* OBSOLETE This program is distributed in the hope that it will be useful, */ -/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */ -/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ -/* OBSOLETE GNU General Public License for more details. */ -/* OBSOLETE */ -/* OBSOLETE You should have received a copy of the GNU General Public License */ -/* OBSOLETE along with this program; if not, write to the Free Software */ -/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #include "defs.h" */ -/* OBSOLETE #include "frame.h" */ -/* OBSOLETE #include "inferior.h" */ -/* OBSOLETE */ -/* OBSOLETE #ifdef USG */ -/* OBSOLETE #include <sys/types.h> */ -/* OBSOLETE #endif */ -/* OBSOLETE */ -/* OBSOLETE #include <sys/param.h> */ -/* OBSOLETE #include <sys/dir.h> */ -/* OBSOLETE #include <signal.h> */ -/* OBSOLETE #include <sys/ioctl.h> */ -/* OBSOLETE #include <fcntl.h> */ -/* OBSOLETE #ifdef USG */ -/* OBSOLETE #include <sys/page.h> */ -/* OBSOLETE #ifdef ALTOS */ -/* OBSOLETE #include <sys/net.h> */ -/* OBSOLETE #include <errno.h> */ -/* OBSOLETE #endif */ -/* OBSOLETE #endif */ -/* OBSOLETE */ -/* OBSOLETE #include "gdbcore.h" */ -/* OBSOLETE #include <sys/user.h> /* After a.out.h *x/ */ -/* OBSOLETE #include <sys/file.h> */ -/* OBSOLETE #include "gdb_stat.h" */ -/* OBSOLETE */ -/* OBSOLETE */ -/* OBSOLETE /* Work with core dump and executable files, for GDB. */ -/* OBSOLETE This code would be in corefile.c if it weren't machine-dependent. *x/ */ -/* OBSOLETE */ -/* OBSOLETE void */ -/* OBSOLETE core_file_command (filename, from_tty) */ -/* OBSOLETE char *filename; */ -/* OBSOLETE int from_tty; */ -/* OBSOLETE { */ -/* OBSOLETE int val; */ -/* OBSOLETE */ -/* OBSOLETE /* Discard all vestiges of any previous core file */ -/* OBSOLETE and mark data and stack spaces as empty. *x/ */ -/* OBSOLETE */ -/* OBSOLETE if (corefile) */ -/* OBSOLETE xfree (corefile); */ -/* OBSOLETE corefile = 0; */ -/* OBSOLETE */ -/* OBSOLETE if (corechan >= 0) */ -/* OBSOLETE close (corechan); */ -/* OBSOLETE corechan = -1; */ -/* OBSOLETE */ -/* OBSOLETE data_start = 0; */ -/* OBSOLETE data_end = 0; */ -/* OBSOLETE stack_start = STACK_END_ADDR; */ -/* OBSOLETE stack_end = STACK_END_ADDR; */ -/* OBSOLETE */ -/* OBSOLETE /* Now, if a new core file was specified, open it and digest it. *x/ */ -/* OBSOLETE */ -/* OBSOLETE if (filename) */ -/* OBSOLETE { */ -/* OBSOLETE filename = tilde_expand (filename); */ -/* OBSOLETE make_cleanup (xfree, filename); */ -/* OBSOLETE */ -/* OBSOLETE if (have_inferior_p ()) */ -/* OBSOLETE error ("To look at a core file, you must kill the program with \"kill\"."); */ -/* OBSOLETE corechan = open (filename, O_RDONLY, 0); */ -/* OBSOLETE if (corechan < 0) */ -/* OBSOLETE perror_with_name (filename); */ -/* OBSOLETE /* 4.2-style (and perhaps also sysV-style) core dump file. *x/ */ -/* OBSOLETE { */ -/* OBSOLETE struct user u; */ -/* OBSOLETE */ -/* OBSOLETE unsigned int reg_offset; */ -/* OBSOLETE */ -/* OBSOLETE val = myread (corechan, &u, sizeof u); */ -/* OBSOLETE if (val < 0) */ -/* OBSOLETE perror_with_name ("Not a core file: reading upage"); */ -/* OBSOLETE if (val != sizeof u) */ -/* OBSOLETE error ("Not a core file: could only read %d bytes", val); */ -/* OBSOLETE data_start = exec_data_start; */ -/* OBSOLETE */ -/* OBSOLETE #if !defined (NBPG) */ -/* OBSOLETE #define NBPG NBPP */ -/* OBSOLETE #endif */ -/* OBSOLETE #if !defined (UPAGES) */ -/* OBSOLETE #define UPAGES USIZE */ -/* OBSOLETE #endif */ -/* OBSOLETE */ -/* OBSOLETE data_end = data_start + NBPG * u.u_dsize; */ -/* OBSOLETE stack_start = stack_end - NBPG * u.u_ssize; */ -/* OBSOLETE data_offset = NBPG * UPAGES + exec_data_start % NBPG /* Not sure about this //jkp *x/; */ -/* OBSOLETE stack_offset = NBPG * (UPAGES + u.u_dsize); */ -/* OBSOLETE */ -/* OBSOLETE /* Some machines put an absolute address in here and some put */ -/* OBSOLETE the offset in the upage of the regs. *x/ */ -/* OBSOLETE reg_offset = (int) u.u_state; */ -/* OBSOLETE if (reg_offset > NBPG * UPAGES) */ -/* OBSOLETE reg_offset -= KERNEL_U_ADDR; */ -/* OBSOLETE */ -/* OBSOLETE memcpy (&core_aouthdr, &u.u_exdata, sizeof (AOUTHDR)); */ -/* OBSOLETE printf_unfiltered ("Core file is from \"%s\".\n", u.u_comm); */ -/* OBSOLETE */ -/* OBSOLETE /* I don't know where to find this info. */ -/* OBSOLETE So, for now, mark it as not available. *x/ */ -/* OBSOLETE N_SET_MAGIC (core_aouthdr, 0); */ -/* OBSOLETE */ -/* OBSOLETE /* Read the register values out of the core file and store */ -/* OBSOLETE them where `read_register' will find them. *x/ */ -/* OBSOLETE */ -/* OBSOLETE { */ -/* OBSOLETE register int regno; */ -/* OBSOLETE */ -/* OBSOLETE for (regno = 0; regno < NUM_REGS; regno++) */ -/* OBSOLETE { */ -/* OBSOLETE char buf[MAX_REGISTER_RAW_SIZE]; */ -/* OBSOLETE */ -/* OBSOLETE val = lseek (corechan, register_addr (regno, reg_offset), 0); */ -/* OBSOLETE if (val < 0 */ -/* OBSOLETE || (val = myread (corechan, buf, sizeof buf)) < 0) */ -/* OBSOLETE { */ -/* OBSOLETE char * buffer = (char *) alloca (strlen (REGISTER_NAME (regno)) */ -/* OBSOLETE + 30); */ -/* OBSOLETE strcpy (buffer, "Reading register "); */ -/* OBSOLETE strcat (buffer, REGISTER_NAME (regno)); */ -/* OBSOLETE */ -/* OBSOLETE perror_with_name (buffer); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE supply_register (regno, buf); */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE if (filename[0] == '/') */ -/* OBSOLETE corefile = savestring (filename, strlen (filename)); */ -/* OBSOLETE else */ -/* OBSOLETE { */ -/* OBSOLETE corefile = concat (current_directory, "/", filename, NULL); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE flush_cached_frames (); */ -/* OBSOLETE select_frame (get_current_frame (), 0); */ -/* OBSOLETE validate_files (); */ -/* OBSOLETE } */ -/* OBSOLETE else if (from_tty) */ -/* OBSOLETE printf_unfiltered ("No core file now.\n"); */ -/* OBSOLETE } */ diff --git a/gdb/arm-convert.s b/gdb/arm-convert.s deleted file mode 100644 index 8124052..0000000 --- a/gdb/arm-convert.s +++ /dev/null @@ -1,16 +0,0 @@ -/* OBSOLETE .text */ -/* OBSOLETE .global _convert_from_extended */ -/* OBSOLETE */ -/* OBSOLETE _convert_from_extended: */ -/* OBSOLETE */ -/* OBSOLETE ldfe f0,[a1] */ -/* OBSOLETE stfd f0,[a2] */ -/* OBSOLETE movs pc,lr */ -/* OBSOLETE */ -/* OBSOLETE .global _convert_to_extended */ -/* OBSOLETE */ -/* OBSOLETE _convert_to_extended: */ -/* OBSOLETE */ -/* OBSOLETE ldfd f0,[a1] */ -/* OBSOLETE stfe f0,[a2] */ -/* OBSOLETE movs pc,lr */ diff --git a/gdb/arm-xdep.c b/gdb/arm-xdep.c deleted file mode 100644 index b38d26c..0000000 --- a/gdb/arm-xdep.c +++ /dev/null @@ -1,575 +0,0 @@ -/* OBSOLETE /* Acorn Risc Machine host machine support. */ -/* OBSOLETE Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc. */ -/* OBSOLETE */ -/* OBSOLETE This file is part of GDB. */ -/* OBSOLETE */ -/* OBSOLETE This program is free software; you can redistribute it and/or modify */ -/* OBSOLETE it under the terms of the GNU General Public License as published by */ -/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */ -/* OBSOLETE (at your option) any later version. */ -/* OBSOLETE */ -/* OBSOLETE This program is distributed in the hope that it will be useful, */ -/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */ -/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ -/* OBSOLETE GNU General Public License for more details. */ -/* OBSOLETE */ -/* OBSOLETE You should have received a copy of the GNU General Public License */ -/* OBSOLETE along with this program; if not, write to the Free Software */ -/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */ -/* OBSOLETE Boston, MA 02111-1307, USA. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #include "defs.h" */ -/* OBSOLETE #include "frame.h" */ -/* OBSOLETE #include "inferior.h" */ -/* OBSOLETE #include "opcode/arm.h" */ -/* OBSOLETE */ -/* OBSOLETE #include <sys/param.h> */ -/* OBSOLETE #include <sys/dir.h> */ -/* OBSOLETE #include <signal.h> */ -/* OBSOLETE #include <sys/ioctl.h> */ -/* OBSOLETE #include <sys/ptrace.h> */ -/* OBSOLETE #include <machine/reg.h> */ -/* OBSOLETE */ -/* OBSOLETE #define N_TXTADDR(hdr) 0x8000 */ -/* OBSOLETE #define N_DATADDR(hdr) (hdr.a_text + 0x8000) */ -/* OBSOLETE */ -/* OBSOLETE #include "gdbcore.h" */ -/* OBSOLETE */ -/* OBSOLETE #include <sys/user.h> /* After a.out.h *x/ */ -/* OBSOLETE #include <sys/file.h> */ -/* OBSOLETE #include "gdb_stat.h" */ -/* OBSOLETE */ -/* OBSOLETE #include <errno.h> */ -/* OBSOLETE */ -/* OBSOLETE void */ -/* OBSOLETE fetch_inferior_registers (regno) */ -/* OBSOLETE int regno; /* Original value discarded *x/ */ -/* OBSOLETE { */ -/* OBSOLETE register unsigned int regaddr; */ -/* OBSOLETE char buf[MAX_REGISTER_RAW_SIZE]; */ -/* OBSOLETE register int i; */ -/* OBSOLETE */ -/* OBSOLETE struct user u; */ -/* OBSOLETE unsigned int offset = (char *) &u.u_ar0 - (char *) &u; */ -/* OBSOLETE offset = ptrace (PT_READ_U, inferior_pid, (PTRACE_ARG3_TYPE) offset, 0) */ -/* OBSOLETE - KERNEL_U_ADDR; */ -/* OBSOLETE */ -/* OBSOLETE registers_fetched (); */ -/* OBSOLETE */ -/* OBSOLETE for (regno = 0; regno < 16; regno++) */ -/* OBSOLETE { */ -/* OBSOLETE regaddr = offset + regno * 4; */ -/* OBSOLETE *(int *) &buf[0] = ptrace (PT_READ_U, inferior_pid, */ -/* OBSOLETE (PTRACE_ARG3_TYPE) regaddr, 0); */ -/* OBSOLETE if (regno == PC_REGNUM) */ -/* OBSOLETE *(int *) &buf[0] = GET_PC_PART (*(int *) &buf[0]); */ -/* OBSOLETE supply_register (regno, buf); */ -/* OBSOLETE } */ -/* OBSOLETE *(int *) &buf[0] = ptrace (PT_READ_U, inferior_pid, */ -/* OBSOLETE (PTRACE_ARG3_TYPE) (offset + PC * 4), 0); */ -/* OBSOLETE supply_register (PS_REGNUM, buf); /* set virtual register ps same as pc *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* read the floating point registers *x/ */ -/* OBSOLETE offset = (char *) &u.u_fp_regs - (char *) &u; */ -/* OBSOLETE *(int *) buf = ptrace (PT_READ_U, inferior_pid, (PTRACE_ARG3_TYPE) offset, 0); */ -/* OBSOLETE supply_register (FPS_REGNUM, buf); */ -/* OBSOLETE for (regno = 16; regno < 24; regno++) */ -/* OBSOLETE { */ -/* OBSOLETE regaddr = offset + 4 + 12 * (regno - 16); */ -/* OBSOLETE for (i = 0; i < 12; i += sizeof (int)) */ -/* OBSOLETE *(int *) &buf[i] = ptrace (PT_READ_U, inferior_pid, */ -/* OBSOLETE (PTRACE_ARG3_TYPE) (regaddr + i), 0); */ -/* OBSOLETE supply_register (regno, buf); */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Store our register values back into the inferior. */ -/* OBSOLETE If REGNO is -1, do this for all registers. */ -/* OBSOLETE Otherwise, REGNO specifies which register (so we can save time). *x/ */ -/* OBSOLETE */ -/* OBSOLETE void */ -/* OBSOLETE store_inferior_registers (regno) */ -/* OBSOLETE int regno; */ -/* OBSOLETE { */ -/* OBSOLETE register unsigned int regaddr; */ -/* OBSOLETE char buf[80]; */ -/* OBSOLETE */ -/* OBSOLETE struct user u; */ -/* OBSOLETE unsigned long value; */ -/* OBSOLETE unsigned int offset = (char *) &u.u_ar0 - (char *) &u; */ -/* OBSOLETE offset = ptrace (PT_READ_U, inferior_pid, (PTRACE_ARG3_TYPE) offset, 0) */ -/* OBSOLETE - KERNEL_U_ADDR; */ -/* OBSOLETE */ -/* OBSOLETE if (regno >= 0) */ -/* OBSOLETE { */ -/* OBSOLETE if (regno >= 16) */ -/* OBSOLETE return; */ -/* OBSOLETE regaddr = offset + 4 * regno; */ -/* OBSOLETE errno = 0; */ -/* OBSOLETE value = read_register (regno); */ -/* OBSOLETE if (regno == PC_REGNUM) */ -/* OBSOLETE value = SET_PC_PART (read_register (PS_REGNUM), value); */ -/* OBSOLETE ptrace (PT_WRITE_U, inferior_pid, (PTRACE_ARG3_TYPE) regaddr, value); */ -/* OBSOLETE if (errno != 0) */ -/* OBSOLETE { */ -/* OBSOLETE sprintf (buf, "writing register number %d", regno); */ -/* OBSOLETE perror_with_name (buf); */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE else */ -/* OBSOLETE for (regno = 0; regno < 15; regno++) */ -/* OBSOLETE { */ -/* OBSOLETE regaddr = offset + regno * 4; */ -/* OBSOLETE errno = 0; */ -/* OBSOLETE value = read_register (regno); */ -/* OBSOLETE if (regno == PC_REGNUM) */ -/* OBSOLETE value = SET_PC_PART (read_register (PS_REGNUM), value); */ -/* OBSOLETE ptrace (6, inferior_pid, (PTRACE_ARG3_TYPE) regaddr, value); */ -/* OBSOLETE if (errno != 0) */ -/* OBSOLETE { */ -/* OBSOLETE sprintf (buf, "writing all regs, number %d", regno); */ -/* OBSOLETE perror_with_name (buf); */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Work with core dump and executable files, for GDB. */ -/* OBSOLETE This code would be in corefile.c if it weren't machine-dependent. *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* Structure to describe the chain of shared libraries used */ -/* OBSOLETE by the execfile. */ -/* OBSOLETE e.g. prog shares Xt which shares X11 which shares c. *x/ */ -/* OBSOLETE */ -/* OBSOLETE struct shared_library */ -/* OBSOLETE { */ -/* OBSOLETE struct exec_header header; */ -/* OBSOLETE char name[SHLIBLEN]; */ -/* OBSOLETE CORE_ADDR text_start; /* CORE_ADDR of 1st byte of text, this file *x/ */ -/* OBSOLETE long data_offset; /* offset of data section in file *x/ */ -/* OBSOLETE int chan; /* file descriptor for the file *x/ */ -/* OBSOLETE struct shared_library *shares; /* library this one shares *x/ */ -/* OBSOLETE }; */ -/* OBSOLETE static struct shared_library *shlib = 0; */ -/* OBSOLETE */ -/* OBSOLETE /* Hook for `exec_file_command' command to call. *x/ */ -/* OBSOLETE */ -/* OBSOLETE extern void (*exec_file_display_hook) (); */ -/* OBSOLETE */ -/* OBSOLETE static CORE_ADDR unshared_text_start; */ -/* OBSOLETE */ -/* OBSOLETE /* extended header from exec file (for shared library info) *x/ */ -/* OBSOLETE */ -/* OBSOLETE static struct exec_header exec_header; */ -/* OBSOLETE */ -/* OBSOLETE void */ -/* OBSOLETE core_file_command (filename, from_tty) */ -/* OBSOLETE char *filename; */ -/* OBSOLETE int from_tty; */ -/* OBSOLETE { */ -/* OBSOLETE int val; */ -/* OBSOLETE */ -/* OBSOLETE /* Discard all vestiges of any previous core file */ -/* OBSOLETE and mark data and stack spaces as empty. *x/ */ -/* OBSOLETE */ -/* OBSOLETE if (corefile) */ -/* OBSOLETE xfree (corefile); */ -/* OBSOLETE corefile = 0; */ -/* OBSOLETE */ -/* OBSOLETE if (corechan >= 0) */ -/* OBSOLETE close (corechan); */ -/* OBSOLETE corechan = -1; */ -/* OBSOLETE */ -/* OBSOLETE data_start = 0; */ -/* OBSOLETE data_end = 0; */ -/* OBSOLETE stack_start = STACK_END_ADDR; */ -/* OBSOLETE stack_end = STACK_END_ADDR; */ -/* OBSOLETE */ -/* OBSOLETE /* Now, if a new core file was specified, open it and digest it. *x/ */ -/* OBSOLETE */ -/* OBSOLETE if (filename) */ -/* OBSOLETE { */ -/* OBSOLETE filename = tilde_expand (filename); */ -/* OBSOLETE make_cleanup (xfree, filename); */ -/* OBSOLETE */ -/* OBSOLETE if (have_inferior_p ()) */ -/* OBSOLETE error ("To look at a core file, you must kill the program with \"kill\"."); */ -/* OBSOLETE corechan = open (filename, O_RDONLY, 0); */ -/* OBSOLETE if (corechan < 0) */ -/* OBSOLETE perror_with_name (filename); */ -/* OBSOLETE /* 4.2-style (and perhaps also sysV-style) core dump file. *x/ */ -/* OBSOLETE { */ -/* OBSOLETE struct user u; */ -/* OBSOLETE */ -/* OBSOLETE unsigned int reg_offset, fp_reg_offset; */ -/* OBSOLETE */ -/* OBSOLETE val = myread (corechan, &u, sizeof u); */ -/* OBSOLETE if (val < 0) */ -/* OBSOLETE perror_with_name ("Not a core file: reading upage"); */ -/* OBSOLETE if (val != sizeof u) */ -/* OBSOLETE error ("Not a core file: could only read %d bytes", val); */ -/* OBSOLETE */ -/* OBSOLETE /* We are depending on exec_file_command having been called */ -/* OBSOLETE previously to set exec_data_start. Since the executable */ -/* OBSOLETE and the core file share the same text segment, the address */ -/* OBSOLETE of the data segment will be the same in both. *x/ */ -/* OBSOLETE data_start = exec_data_start; */ -/* OBSOLETE */ -/* OBSOLETE data_end = data_start + NBPG * u.u_dsize; */ -/* OBSOLETE stack_start = stack_end - NBPG * u.u_ssize; */ -/* OBSOLETE data_offset = NBPG * UPAGES; */ -/* OBSOLETE stack_offset = NBPG * (UPAGES + u.u_dsize); */ -/* OBSOLETE */ -/* OBSOLETE /* Some machines put an absolute address in here and some put */ -/* OBSOLETE the offset in the upage of the regs. *x/ */ -/* OBSOLETE reg_offset = (int) u.u_ar0; */ -/* OBSOLETE if (reg_offset > NBPG * UPAGES) */ -/* OBSOLETE reg_offset -= KERNEL_U_ADDR; */ -/* OBSOLETE fp_reg_offset = (char *) &u.u_fp_regs - (char *) &u; */ -/* OBSOLETE */ -/* OBSOLETE /* I don't know where to find this info. */ -/* OBSOLETE So, for now, mark it as not available. *x/ */ -/* OBSOLETE N_SET_MAGIC (core_aouthdr, 0); */ -/* OBSOLETE */ -/* OBSOLETE /* Read the register values out of the core file and store */ -/* OBSOLETE them where `read_register' will find them. *x/ */ -/* OBSOLETE */ -/* OBSOLETE { */ -/* OBSOLETE register int regno; */ -/* OBSOLETE */ -/* OBSOLETE for (regno = 0; regno < NUM_REGS; regno++) */ -/* OBSOLETE { */ -/* OBSOLETE char buf[MAX_REGISTER_RAW_SIZE]; */ -/* OBSOLETE */ -/* OBSOLETE if (regno < 16) */ -/* OBSOLETE val = lseek (corechan, reg_offset + 4 * regno, 0); */ -/* OBSOLETE else if (regno < 24) */ -/* OBSOLETE val = lseek (corechan, fp_reg_offset + 4 + 12 * (regno - 24), 0); */ -/* OBSOLETE else if (regno == 24) */ -/* OBSOLETE val = lseek (corechan, fp_reg_offset, 0); */ -/* OBSOLETE else if (regno == 25) */ -/* OBSOLETE val = lseek (corechan, reg_offset + 4 * PC, 0); */ -/* OBSOLETE if (val < 0 */ -/* OBSOLETE || (val = myread (corechan, buf, sizeof buf)) < 0) */ -/* OBSOLETE { */ -/* OBSOLETE char *buffer = (char *) alloca (strlen (REGISTER_NAME (regno)) */ -/* OBSOLETE + 30); */ -/* OBSOLETE strcpy (buffer, "Reading register "); */ -/* OBSOLETE strcat (buffer, REGISTER_NAME (regno)); */ -/* OBSOLETE */ -/* OBSOLETE perror_with_name (buffer); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE if (regno == PC_REGNUM) */ -/* OBSOLETE *(int *) buf = GET_PC_PART (*(int *) buf); */ -/* OBSOLETE supply_register (regno, buf); */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE if (filename[0] == '/') */ -/* OBSOLETE corefile = savestring (filename, strlen (filename)); */ -/* OBSOLETE else */ -/* OBSOLETE { */ -/* OBSOLETE corefile = concat (current_directory, "/", filename, NULL); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE flush_cached_frames (); */ -/* OBSOLETE select_frame (get_current_frame (), 0); */ -/* OBSOLETE validate_files (); */ -/* OBSOLETE } */ -/* OBSOLETE else if (from_tty) */ -/* OBSOLETE printf ("No core file now.\n"); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE #if 0 */ -/* OBSOLETE /* Work with core dump and executable files, for GDB. */ -/* OBSOLETE This code would be in corefile.c if it weren't machine-dependent. *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* Structure to describe the chain of shared libraries used */ -/* OBSOLETE by the execfile. */ -/* OBSOLETE e.g. prog shares Xt which shares X11 which shares c. *x/ */ -/* OBSOLETE */ -/* OBSOLETE struct shared_library */ -/* OBSOLETE { */ -/* OBSOLETE struct exec_header header; */ -/* OBSOLETE char name[SHLIBLEN]; */ -/* OBSOLETE CORE_ADDR text_start; /* CORE_ADDR of 1st byte of text, this file *x/ */ -/* OBSOLETE long data_offset; /* offset of data section in file *x/ */ -/* OBSOLETE int chan; /* file descriptor for the file *x/ */ -/* OBSOLETE struct shared_library *shares; /* library this one shares *x/ */ -/* OBSOLETE }; */ -/* OBSOLETE static struct shared_library *shlib = 0; */ -/* OBSOLETE */ -/* OBSOLETE /* Hook for `exec_file_command' command to call. *x/ */ -/* OBSOLETE */ -/* OBSOLETE extern void (*exec_file_display_hook) (); */ -/* OBSOLETE */ -/* OBSOLETE static CORE_ADDR unshared_text_start; */ -/* OBSOLETE */ -/* OBSOLETE /* extended header from exec file (for shared library info) *x/ */ -/* OBSOLETE */ -/* OBSOLETE static struct exec_header exec_header; */ -/* OBSOLETE */ -/* OBSOLETE void */ -/* OBSOLETE exec_file_command (filename, from_tty) */ -/* OBSOLETE char *filename; */ -/* OBSOLETE int from_tty; */ -/* OBSOLETE { */ -/* OBSOLETE int val; */ -/* OBSOLETE */ -/* OBSOLETE /* Eliminate all traces of old exec file. */ -/* OBSOLETE Mark text segment as empty. *x/ */ -/* OBSOLETE */ -/* OBSOLETE if (execfile) */ -/* OBSOLETE xfree (execfile); */ -/* OBSOLETE execfile = 0; */ -/* OBSOLETE data_start = 0; */ -/* OBSOLETE data_end -= exec_data_start; */ -/* OBSOLETE text_start = 0; */ -/* OBSOLETE unshared_text_start = 0; */ -/* OBSOLETE text_end = 0; */ -/* OBSOLETE exec_data_start = 0; */ -/* OBSOLETE exec_data_end = 0; */ -/* OBSOLETE if (execchan >= 0) */ -/* OBSOLETE close (execchan); */ -/* OBSOLETE execchan = -1; */ -/* OBSOLETE if (shlib) */ -/* OBSOLETE { */ -/* OBSOLETE close_shared_library (shlib); */ -/* OBSOLETE shlib = 0; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Now open and digest the file the user requested, if any. *x/ */ -/* OBSOLETE */ -/* OBSOLETE if (filename) */ -/* OBSOLETE { */ -/* OBSOLETE filename = tilde_expand (filename); */ -/* OBSOLETE make_cleanup (xfree, filename); */ -/* OBSOLETE */ -/* OBSOLETE execchan = openp (getenv ("PATH"), 1, filename, O_RDONLY, 0, */ -/* OBSOLETE &execfile); */ -/* OBSOLETE if (execchan < 0) */ -/* OBSOLETE perror_with_name (filename); */ -/* OBSOLETE */ -/* OBSOLETE { */ -/* OBSOLETE struct stat st_exec; */ -/* OBSOLETE */ -/* OBSOLETE #ifdef HEADER_SEEK_FD */ -/* OBSOLETE HEADER_SEEK_FD (execchan); */ -/* OBSOLETE #endif */ -/* OBSOLETE */ -/* OBSOLETE val = myread (execchan, &exec_header, sizeof exec_header); */ -/* OBSOLETE exec_aouthdr = exec_header.a_exec; */ -/* OBSOLETE */ -/* OBSOLETE if (val < 0) */ -/* OBSOLETE perror_with_name (filename); */ -/* OBSOLETE */ -/* OBSOLETE text_start = 0x8000; */ -/* OBSOLETE */ -/* OBSOLETE /* Look for shared library if needed *x/ */ -/* OBSOLETE if (exec_header.a_exec.a_magic & MF_USES_SL) */ -/* OBSOLETE shlib = open_shared_library (exec_header.a_shlibname, text_start); */ -/* OBSOLETE */ -/* OBSOLETE text_offset = N_TXTOFF (exec_aouthdr); */ -/* OBSOLETE exec_data_offset = N_TXTOFF (exec_aouthdr) + exec_aouthdr.a_text; */ -/* OBSOLETE */ -/* OBSOLETE if (shlib) */ -/* OBSOLETE { */ -/* OBSOLETE unshared_text_start = shared_text_end (shlib) & ~0x7fff; */ -/* OBSOLETE stack_start = shlib->header.a_exec.a_sldatabase; */ -/* OBSOLETE stack_end = STACK_END_ADDR; */ -/* OBSOLETE } */ -/* OBSOLETE else */ -/* OBSOLETE unshared_text_start = 0x8000; */ -/* OBSOLETE text_end = unshared_text_start + exec_aouthdr.a_text; */ -/* OBSOLETE */ -/* OBSOLETE exec_data_start = unshared_text_start + exec_aouthdr.a_text; */ -/* OBSOLETE exec_data_end = exec_data_start + exec_aouthdr.a_data; */ -/* OBSOLETE */ -/* OBSOLETE data_start = exec_data_start; */ -/* OBSOLETE data_end += exec_data_start; */ -/* OBSOLETE */ -/* OBSOLETE fstat (execchan, &st_exec); */ -/* OBSOLETE exec_mtime = st_exec.st_mtime; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE validate_files (); */ -/* OBSOLETE } */ -/* OBSOLETE else if (from_tty) */ -/* OBSOLETE printf ("No executable file now.\n"); */ -/* OBSOLETE */ -/* OBSOLETE /* Tell display code (if any) about the changed file name. *x/ */ -/* OBSOLETE if (exec_file_display_hook) */ -/* OBSOLETE (*exec_file_display_hook) (filename); */ -/* OBSOLETE } */ -/* OBSOLETE #endif */ -/* OBSOLETE */ -/* OBSOLETE #if 0 */ -/* OBSOLETE /* Read from the program's memory (except for inferior processes). */ -/* OBSOLETE This function is misnamed, since it only reads, never writes; and */ -/* OBSOLETE since it will use the core file and/or executable file as necessary. */ -/* OBSOLETE */ -/* OBSOLETE It should be extended to write as well as read, FIXME, for patching files. */ -/* OBSOLETE */ -/* OBSOLETE Return 0 if address could be read, EIO if addresss out of bounds. *x/ */ -/* OBSOLETE */ -/* OBSOLETE int */ -/* OBSOLETE xfer_core_file (memaddr, myaddr, len) */ -/* OBSOLETE CORE_ADDR memaddr; */ -/* OBSOLETE char *myaddr; */ -/* OBSOLETE int len; */ -/* OBSOLETE { */ -/* OBSOLETE register int i; */ -/* OBSOLETE register int val; */ -/* OBSOLETE int xferchan; */ -/* OBSOLETE char **xferfile; */ -/* OBSOLETE int fileptr; */ -/* OBSOLETE int returnval = 0; */ -/* OBSOLETE */ -/* OBSOLETE while (len > 0) */ -/* OBSOLETE { */ -/* OBSOLETE xferfile = 0; */ -/* OBSOLETE xferchan = 0; */ -/* OBSOLETE */ -/* OBSOLETE /* Determine which file the next bunch of addresses reside in, */ -/* OBSOLETE and where in the file. Set the file's read/write pointer */ -/* OBSOLETE to point at the proper place for the desired address */ -/* OBSOLETE and set xferfile and xferchan for the correct file. */ -/* OBSOLETE */ -/* OBSOLETE If desired address is nonexistent, leave them zero. */ -/* OBSOLETE */ -/* OBSOLETE i is set to the number of bytes that can be handled */ -/* OBSOLETE along with the next address. */ -/* OBSOLETE */ -/* OBSOLETE We put the most likely tests first for efficiency. *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* Note that if there is no core file */ -/* OBSOLETE data_start and data_end are equal. *x/ */ -/* OBSOLETE if (memaddr >= data_start && memaddr < data_end) */ -/* OBSOLETE { */ -/* OBSOLETE i = min (len, data_end - memaddr); */ -/* OBSOLETE fileptr = memaddr - data_start + data_offset; */ -/* OBSOLETE xferfile = &corefile; */ -/* OBSOLETE xferchan = corechan; */ -/* OBSOLETE } */ -/* OBSOLETE /* Note that if there is no core file */ -/* OBSOLETE stack_start and stack_end define the shared library data. *x/ */ -/* OBSOLETE else if (memaddr >= stack_start && memaddr < stack_end) */ -/* OBSOLETE { */ -/* OBSOLETE if (corechan < 0) */ -/* OBSOLETE { */ -/* OBSOLETE struct shared_library *lib; */ -/* OBSOLETE for (lib = shlib; lib; lib = lib->shares) */ -/* OBSOLETE if (memaddr >= lib->header.a_exec.a_sldatabase && */ -/* OBSOLETE memaddr < lib->header.a_exec.a_sldatabase + */ -/* OBSOLETE lib->header.a_exec.a_data) */ -/* OBSOLETE break; */ -/* OBSOLETE if (lib) */ -/* OBSOLETE { */ -/* OBSOLETE i = min (len, lib->header.a_exec.a_sldatabase + */ -/* OBSOLETE lib->header.a_exec.a_data - memaddr); */ -/* OBSOLETE fileptr = lib->data_offset + memaddr - */ -/* OBSOLETE lib->header.a_exec.a_sldatabase; */ -/* OBSOLETE xferfile = execfile; */ -/* OBSOLETE xferchan = lib->chan; */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE else */ -/* OBSOLETE { */ -/* OBSOLETE i = min (len, stack_end - memaddr); */ -/* OBSOLETE fileptr = memaddr - stack_start + stack_offset; */ -/* OBSOLETE xferfile = &corefile; */ -/* OBSOLETE xferchan = corechan; */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE else if (corechan < 0 */ -/* OBSOLETE && memaddr >= exec_data_start && memaddr < exec_data_end) */ -/* OBSOLETE { */ -/* OBSOLETE i = min (len, exec_data_end - memaddr); */ -/* OBSOLETE fileptr = memaddr - exec_data_start + exec_data_offset; */ -/* OBSOLETE xferfile = &execfile; */ -/* OBSOLETE xferchan = execchan; */ -/* OBSOLETE } */ -/* OBSOLETE else if (memaddr >= text_start && memaddr < text_end) */ -/* OBSOLETE { */ -/* OBSOLETE struct shared_library *lib; */ -/* OBSOLETE for (lib = shlib; lib; lib = lib->shares) */ -/* OBSOLETE if (memaddr >= lib->text_start && */ -/* OBSOLETE memaddr < lib->text_start + lib->header.a_exec.a_text) */ -/* OBSOLETE break; */ -/* OBSOLETE if (lib) */ -/* OBSOLETE { */ -/* OBSOLETE i = min (len, lib->header.a_exec.a_text + */ -/* OBSOLETE lib->text_start - memaddr); */ -/* OBSOLETE fileptr = memaddr - lib->text_start + text_offset; */ -/* OBSOLETE xferfile = &execfile; */ -/* OBSOLETE xferchan = lib->chan; */ -/* OBSOLETE } */ -/* OBSOLETE else */ -/* OBSOLETE { */ -/* OBSOLETE i = min (len, text_end - memaddr); */ -/* OBSOLETE fileptr = memaddr - unshared_text_start + text_offset; */ -/* OBSOLETE xferfile = &execfile; */ -/* OBSOLETE xferchan = execchan; */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE else if (memaddr < text_start) */ -/* OBSOLETE { */ -/* OBSOLETE i = min (len, text_start - memaddr); */ -/* OBSOLETE } */ -/* OBSOLETE else if (memaddr >= text_end */ -/* OBSOLETE && memaddr < (corechan >= 0 ? data_start : exec_data_start)) */ -/* OBSOLETE { */ -/* OBSOLETE i = min (len, data_start - memaddr); */ -/* OBSOLETE } */ -/* OBSOLETE else if (corechan >= 0 */ -/* OBSOLETE && memaddr >= data_end && memaddr < stack_start) */ -/* OBSOLETE { */ -/* OBSOLETE i = min (len, stack_start - memaddr); */ -/* OBSOLETE } */ -/* OBSOLETE else if (corechan < 0 && memaddr >= exec_data_end) */ -/* OBSOLETE { */ -/* OBSOLETE i = min (len, -memaddr); */ -/* OBSOLETE } */ -/* OBSOLETE else if (memaddr >= stack_end && stack_end != 0) */ -/* OBSOLETE { */ -/* OBSOLETE i = min (len, -memaddr); */ -/* OBSOLETE } */ -/* OBSOLETE else */ -/* OBSOLETE { */ -/* OBSOLETE /* Address did not classify into one of the known ranges. */ -/* OBSOLETE This shouldn't happen; we catch the endpoints. *x/ */ -/* OBSOLETE internal_error ("Bad case logic in xfer_core_file."); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Now we know which file to use. */ -/* OBSOLETE Set up its pointer and transfer the data. *x/ */ -/* OBSOLETE if (xferfile) */ -/* OBSOLETE { */ -/* OBSOLETE if (*xferfile == 0) */ -/* OBSOLETE if (xferfile == &execfile) */ -/* OBSOLETE error ("No program file to examine."); */ -/* OBSOLETE else */ -/* OBSOLETE error ("No core dump file or running program to examine."); */ -/* OBSOLETE val = lseek (xferchan, fileptr, 0); */ -/* OBSOLETE if (val < 0) */ -/* OBSOLETE perror_with_name (*xferfile); */ -/* OBSOLETE val = myread (xferchan, myaddr, i); */ -/* OBSOLETE if (val < 0) */ -/* OBSOLETE perror_with_name (*xferfile); */ -/* OBSOLETE } */ -/* OBSOLETE /* If this address is for nonexistent memory, */ -/* OBSOLETE read zeros if reading, or do nothing if writing. */ -/* OBSOLETE Actually, we never right. *x/ */ -/* OBSOLETE else */ -/* OBSOLETE { */ -/* OBSOLETE memset (myaddr, '\0', i); */ -/* OBSOLETE returnval = EIO; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE memaddr += i; */ -/* OBSOLETE myaddr += i; */ -/* OBSOLETE len -= i; */ -/* OBSOLETE } */ -/* OBSOLETE return returnval; */ -/* OBSOLETE } */ -/* OBSOLETE #endif */ diff --git a/gdb/config/arm/arm.mh b/gdb/config/arm/arm.mh deleted file mode 100644 index 60381f0..0000000 --- a/gdb/config/arm/arm.mh +++ /dev/null @@ -1,6 +0,0 @@ -# OBSOLETE # Host: Acorn RISC machine running RISCiX (4.3bsd) -# OBSOLETE XDEPFILES= infptrace.o inftarg.o fork-child.o arm-xdep.o arm-convert.o -# OBSOLETE -# OBSOLETE XM_FILE= xm-arm.h -# OBSOLETE -# OBSOLETE NAT_FILE= nm-arm.h diff --git a/gdb/config/arm/arm.mt b/gdb/config/arm/arm.mt deleted file mode 100644 index ef34aa5..0000000 --- a/gdb/config/arm/arm.mt +++ /dev/null @@ -1,7 +0,0 @@ -# OBSOLETE # Target: Acorn RISC machine (ARM) with simulator -# OBSOLETE TDEPFILES= arm-tdep.o remote-rdp.o remote-rdi.oT -# OBSOLETE DEPLIBS= rdi-share/libangsd.a -# OBSOLETE TM_FILE= tm-arm.h -# OBSOLETE -# OBSOLETE SIM_OBS = remote-sim.o -# OBSOLETE SIM = ../sim/arm/libsim.a diff --git a/gdb/config/arm/nm-arm.h b/gdb/config/arm/nm-arm.h deleted file mode 100644 index 06ba837..0000000 --- a/gdb/config/arm/nm-arm.h +++ /dev/null @@ -1,28 +0,0 @@ -/* OBSOLETE /* Definitions to make GDB run on an ARM under RISCiX (4.3bsd). */ -/* OBSOLETE Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc. */ -/* OBSOLETE */ -/* OBSOLETE This file is part of GDB. */ -/* OBSOLETE */ -/* OBSOLETE This program is free software; you can redistribute it and/or modify */ -/* OBSOLETE it under the terms of the GNU General Public License as published by */ -/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */ -/* OBSOLETE (at your option) any later version. */ -/* OBSOLETE */ -/* OBSOLETE This program is distributed in the hope that it will be useful, */ -/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */ -/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ -/* OBSOLETE GNU General Public License for more details. */ -/* OBSOLETE */ -/* OBSOLETE You should have received a copy of the GNU General Public License */ -/* OBSOLETE along with this program; if not, write to the Free Software */ -/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */ -/* OBSOLETE Boston, MA 02111-1307, USA. *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* This is the amount to subtract from u.u_ar0 */ -/* OBSOLETE to get the offset in the core file of the register values. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define KERNEL_U_ADDR (0x01000000 - (UPAGES * NBPG)) */ -/* OBSOLETE */ -/* OBSOLETE /* Override copies of {fetch,store}_inferior_registers in infptrace.c. *x/ */ -/* OBSOLETE #define FETCH_INFERIOR_REGISTERS */ -/* OBSOLETE #define HOST_BYTE_ORDER LITTLE_ENDIAN */ diff --git a/gdb/config/arm/xm-arm.h b/gdb/config/arm/xm-arm.h deleted file mode 100644 index c3b6185..0000000 --- a/gdb/config/arm/xm-arm.h +++ /dev/null @@ -1,77 +0,0 @@ -/* OBSOLETE /* Definitions to make GDB run on an ARM under RISCiX (4.3bsd). */ -/* OBSOLETE Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc. */ -/* OBSOLETE */ -/* OBSOLETE This file is part of GDB. */ -/* OBSOLETE */ -/* OBSOLETE This program is free software; you can redistribute it and/or modify */ -/* OBSOLETE it under the terms of the GNU General Public License as published by */ -/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */ -/* OBSOLETE (at your option) any later version. */ -/* OBSOLETE */ -/* OBSOLETE This program is distributed in the hope that it will be useful, */ -/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */ -/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ -/* OBSOLETE GNU General Public License for more details. */ -/* OBSOLETE */ -/* OBSOLETE You should have received a copy of the GNU General Public License */ -/* OBSOLETE along with this program; if not, write to the Free Software */ -/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */ -/* OBSOLETE Boston, MA 02111-1307, USA. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define HOST_BYTE_ORDER LITTLE_ENDIAN */ -/* OBSOLETE */ -/* OBSOLETE */ -/* OBSOLETE #if 0 */ -/* OBSOLETE /* Interface definitions for kernel debugger KDB. *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* Map machine fault codes into signal numbers. */ -/* OBSOLETE First subtract 0, divide by 4, then index in a table. */ -/* OBSOLETE Faults for which the entry in this table is 0 */ -/* OBSOLETE are not handled by KDB; the program's own trap handler */ -/* OBSOLETE gets to handle then. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define FAULT_CODE_ORIGIN 0 */ -/* OBSOLETE #define FAULT_CODE_UNITS 4 */ -/* OBSOLETE #define FAULT_TABLE \ */ -/* OBSOLETE { 0, SIGKILL, SIGSEGV, 0, 0, 0, 0, 0, \ */ -/* OBSOLETE 0, 0, SIGTRAP, SIGTRAP, 0, 0, 0, 0, \ */ -/* OBSOLETE 0, 0, 0, 0, 0, 0, 0, 0} */ -/* OBSOLETE */ -/* OBSOLETE /* Start running with a stack stretching from BEG to END. */ -/* OBSOLETE BEG and END should be symbols meaningful to the assembler. */ -/* OBSOLETE This is used only for kdb. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define INIT_STACK(beg, end) \ */ -/* OBSOLETE { asm (".globl end"); \ */ -/* OBSOLETE asm ("movl $ end, sp"); \ */ -/* OBSOLETE asm ("clrl fp"); } */ -/* OBSOLETE */ -/* OBSOLETE /* Push the frame pointer register on the stack. *x/ */ -/* OBSOLETE #define PUSH_FRAME_PTR \ */ -/* OBSOLETE asm ("pushl fp"); */ -/* OBSOLETE */ -/* OBSOLETE /* Copy the top-of-stack to the frame pointer register. *x/ */ -/* OBSOLETE #define POP_FRAME_PTR \ */ -/* OBSOLETE asm ("movl (sp), fp"); */ -/* OBSOLETE */ -/* OBSOLETE /* After KDB is entered by a fault, push all registers */ -/* OBSOLETE that GDB thinks about (all NUM_REGS of them), */ -/* OBSOLETE so that they appear in order of ascending GDB register number. */ -/* OBSOLETE The fault code will be on the stack beyond the last register. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define PUSH_REGISTERS \ */ -/* OBSOLETE { asm ("pushl 8(sp)"); \ */ -/* OBSOLETE asm ("pushl 8(sp)"); \ */ -/* OBSOLETE asm ("pushal 0x14(sp)"); \ */ -/* OBSOLETE asm ("pushr $037777"); } */ -/* OBSOLETE */ -/* OBSOLETE /* Assuming the registers (including processor status) have been */ -/* OBSOLETE pushed on the stack in order of ascending GDB register number, */ -/* OBSOLETE restore them and return to the address in the saved PC register. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define POP_REGISTERS \ */ -/* OBSOLETE { asm ("popr $037777"); \ */ -/* OBSOLETE asm ("subl2 $8,(sp)"); \ */ -/* OBSOLETE asm ("movl (sp),sp"); \ */ -/* OBSOLETE asm ("rei"); } */ -/* OBSOLETE #endif /* 0 *x/ */ diff --git a/gdb/config/convex/Convex.notes b/gdb/config/convex/Convex.notes deleted file mode 100644 index 828778c..0000000 --- a/gdb/config/convex/Convex.notes +++ /dev/null @@ -1,164 +0,0 @@ -@c OBSOLETE -@c OBSOLETE @node Convex,,, Top -@c OBSOLETE @appendix Convex-specific info -@c OBSOLETE @cindex Convex notes -@c OBSOLETE -@c OBSOLETE Scalar registers are 64 bits long, which is a pain since -@c OBSOLETE left half of an S register frequently contains noise. -@c OBSOLETE Therefore there are two ways to obtain the value of an S register. -@c OBSOLETE -@c OBSOLETE @table @kbd -@c OBSOLETE @item $s0 -@c OBSOLETE returns the low half of the register as an int -@c OBSOLETE -@c OBSOLETE @item $S0 -@c OBSOLETE returns the whole register as a long long -@c OBSOLETE @end table -@c OBSOLETE -@c OBSOLETE You can print the value in floating point by using @samp{p/f $s0} or @samp{p/f $S0} -@c OBSOLETE to print a single or double precision value. -@c OBSOLETE -@c OBSOLETE @cindex vector registers -@c OBSOLETE Vector registers are handled similarly, with @samp{$V0} denoting the whole -@c OBSOLETE 64-bit register and @kbd{$v0} denoting the 32-bit low half; @samp{p/f $v0} -@c OBSOLETE or @samp{p/f $V0} can be used to examine the register in floating point. -@c OBSOLETE The length of the vector registers is taken from @samp{$vl}. -@c OBSOLETE -@c OBSOLETE Individual elements of a vector register are denoted in the obvious way; -@c OBSOLETE @samp{print $v3[9]} prints the tenth element of register @kbd{v3}, and -@c OBSOLETE @samp{set $v3[9] = 1234} alters it. -@c OBSOLETE -@c OBSOLETE @kbd{$vl} and @kbd{$vs} are int, and @kbd{$vm} is an int vector. -@c OBSOLETE Elements of @kbd{$vm} can't be assigned to. -@c OBSOLETE -@c OBSOLETE @cindex communication registers -@c OBSOLETE @kindex info comm-registers -@c OBSOLETE Communication registers have names @kbd{$C0 .. $C63}, with @kbd{$c0 .. $c63} -@c OBSOLETE denoting the low-order halves. @samp{info comm-registers} will print them -@c OBSOLETE all out, and tell which are locked. (A communication register is -@c OBSOLETE locked when a value is sent to it, and unlocked when the value is -@c OBSOLETE received.) Communication registers are, of course, global to all -@c OBSOLETE threads, so it does not matter what the currently selected thread is. -@c OBSOLETE @samp{info comm-reg @var{name}} prints just that one communication -@c OBSOLETE register; @samp{name} may also be a communication register number -@c OBSOLETE @samp{nn} or @samp{0xnn}. -@c OBSOLETE @samp{info comm-reg @var{address}} prints the contents of the resource -@c OBSOLETE structure at that address. -@c OBSOLETE -@c OBSOLETE @kindex info psw -@c OBSOLETE The command @samp{info psw} prints the processor status word @kbd{$ps} -@c OBSOLETE bit by bit. -@c OBSOLETE -@c OBSOLETE @kindex set base -@c OBSOLETE GDB normally prints all integers in base 10, but the leading -@c OBSOLETE @kbd{0x80000000} of pointers is intolerable in decimal, so the default -@c OBSOLETE output radix has been changed to try to print addresses appropriately. -@c OBSOLETE The @samp{set base} command can be used to change this. -@c OBSOLETE -@c OBSOLETE @table @code -@c OBSOLETE @item set base 10 -@c OBSOLETE Integer values always print in decimal. -@c OBSOLETE -@c OBSOLETE @item set base 16 -@c OBSOLETE Integer values always print in hex. -@c OBSOLETE -@c OBSOLETE @item set base -@c OBSOLETE Go back to the initial state, which prints integer values in hex if they -@c OBSOLETE look like pointers (specifically, if they start with 0x8 or 0xf in the -@c OBSOLETE stack), otherwise in decimal. -@c OBSOLETE @end table -@c OBSOLETE -@c OBSOLETE @kindex set pipeline -@c OBSOLETE When an exception such as a bus error or overflow happens, usually the PC -@c OBSOLETE is several instructions ahead by the time the exception is detected. -@c OBSOLETE The @samp{set pipe} command will disable this. -@c OBSOLETE -@c OBSOLETE @table @code -@c OBSOLETE @item set pipeline off -@c OBSOLETE Forces serial execution of instructions; no vector chaining and no -@c OBSOLETE scalar instruction overlap. With this, exceptions are detected with -@c OBSOLETE the PC pointing to the instruction after the one in error. -@c OBSOLETE -@c OBSOLETE @item set pipeline on -@c OBSOLETE Returns to normal, fast, execution. This is the default. -@c OBSOLETE @end table -@c OBSOLETE -@c OBSOLETE @cindex parallel -@c OBSOLETE In a parallel program, multiple threads may be executing, each -@c OBSOLETE with its own registers, stack, and local memory. When one of them -@c OBSOLETE hits a breakpoint, that thread is selected. Other threads do -@c OBSOLETE not run while the thread is in the breakpoint. -@c OBSOLETE -@c OBSOLETE @kindex 1cont -@c OBSOLETE The selected thread can be single-stepped, given signals, and so -@c OBSOLETE on. Any other threads remain stopped. When a @samp{cont} command is given, -@c OBSOLETE all threads are resumed. To resume just the selected thread, use -@c OBSOLETE the command @samp{1cont}. -@c OBSOLETE -@c OBSOLETE @kindex thread -@c OBSOLETE The @samp{thread} command will show the active threads and the -@c OBSOLETE instruction they are about to execute. The selected thread is marked -@c OBSOLETE with an asterisk. The command @samp{thread @var{n}} will select thread @var{n}, -@c OBSOLETE shifting the debugger's attention to it for single-stepping, -@c OBSOLETE registers, local memory, and so on. -@c OBSOLETE -@c OBSOLETE @kindex info threads -@c OBSOLETE The @samp{info threads} command will show what threads, if any, have -@c OBSOLETE invisibly hit breakpoints or signals and are waiting to be noticed. -@c OBSOLETE -@c OBSOLETE @kindex set parallel -@c OBSOLETE The @samp{set parallel} command controls how many threads can be active. -@c OBSOLETE -@c OBSOLETE @table @code -@c OBSOLETE @item set parallel off -@c OBSOLETE One thread. Requests by the program that other threads join in -@c OBSOLETE (spawn and pfork instructions) do not cause other threads to start up. -@c OBSOLETE This does the same thing as the @samp{limit concurrency 1} command. -@c OBSOLETE -@c OBSOLETE @item set parallel fixed -@c OBSOLETE All CPUs are assigned to your program whenever it runs. When it -@c OBSOLETE executes a pfork or spawn instruction, it begins parallel execution -@c OBSOLETE immediately. This does the same thing as the @samp{mpa -f} command. -@c OBSOLETE -@c OBSOLETE @item set parallel on -@c OBSOLETE One or more threads. Spawn and pfork cause CPUs to join in when and if -@c OBSOLETE they are free. This is the default. It is very good for system -@c OBSOLETE throughput, but not very good for finding bugs in parallel code. If you -@c OBSOLETE suspect a bug in parallel code, you probably want @samp{set parallel fixed.} -@c OBSOLETE @end table -@c OBSOLETE -@c OBSOLETE @subsection Limitations -@c OBSOLETE -@c OBSOLETE WARNING: Convex GDB evaluates expressions in long long, because S -@c OBSOLETE registers are 64 bits long. However, GDB expression semantics are not -@c OBSOLETE exactly C semantics. This is a bug, strictly speaking, but it's not one I -@c OBSOLETE know how to fix. If @samp{x} is a program variable of type int, then it -@c OBSOLETE is also type int to GDB, but @samp{x + 1} is long long, as is @samp{x + y} -@c OBSOLETE or any other expression requiring computation. So is the expression -@c OBSOLETE @samp{1}, or any other constant. You only really have to watch out for -@c OBSOLETE calls. The innocuous expression @samp{list_node (0x80001234)} has an -@c OBSOLETE argument of type long long. You must explicitly cast it to int. -@c OBSOLETE -@c OBSOLETE It is not possible to continue after an uncaught fatal signal by using -@c OBSOLETE @samp{signal 0}, @samp{return}, @samp{jump}, or anything else. The difficulty is with -@c OBSOLETE Unix, not GDB. -@c OBSOLETE -@c OBSOLETE I have made no big effort to make such things as single-stepping a -@c OBSOLETE @kbd{join} instruction do something reasonable. If the program seems to -@c OBSOLETE hang when doing this, type @kbd{ctrl-c} and @samp{cont}, or use -@c OBSOLETE @samp{thread} to shift to a live thread. Single-stepping a @kbd{spawn} -@c OBSOLETE instruction apparently causes new threads to be born with their T bit set; -@c OBSOLETE this is not handled gracefully. When a thread has hit a breakpoint, other -@c OBSOLETE threads may have invisibly hit the breakpoint in the background; if you -@c OBSOLETE clear the breakpoint gdb will be surprised when threads seem to continue -@c OBSOLETE to stop at it. All of these situations produce spurious signal 5 traps; -@c OBSOLETE if this happens, just type @samp{cont}. If it becomes a nuisance, use -@c OBSOLETE @samp{handle 5 nostop}. (It will ask if you are sure. You are.) -@c OBSOLETE -@c OBSOLETE There is no way in GDB to store a float in a register, as with -@c OBSOLETE @kbd{set $s0 = 3.1416}. The identifier @kbd{$s0} denotes an integer, -@c OBSOLETE and like any C expression which assigns to an integer variable, the -@c OBSOLETE right-hand side is casted to type int. If you should need to do -@c OBSOLETE something like this, you can assign the value to @kbd{@{float@} ($sp-4)} -@c OBSOLETE and then do @kbd{set $s0 = $sp[-4]}. Same deal with @kbd{set $v0[69] = 6.9}. - diff --git a/gdb/config/convex/convex.mh b/gdb/config/convex/convex.mh deleted file mode 100644 index 5ec3bfe..0000000 --- a/gdb/config/convex/convex.mh +++ /dev/null @@ -1,3 +0,0 @@ -# OBSOLETE # Host: Convex Unix (4bsd) -# OBSOLETE XDEPFILES= convex-xdep.o -# OBSOLETE XM_FILE= xm-convex.h diff --git a/gdb/config/convex/convex.mt b/gdb/config/convex/convex.mt deleted file mode 100644 index 425b171..0000000 --- a/gdb/config/convex/convex.mt +++ /dev/null @@ -1,3 +0,0 @@ -# OBSOLETE # Target: Convex Unix (4bsd) -# OBSOLETE TDEPFILES= convex-tdep.o -# OBSOLETE TM_FILE= tm-convex.h diff --git a/gdb/config/convex/tm-convex.h b/gdb/config/convex/tm-convex.h deleted file mode 100644 index 5ddd1f4..0000000 --- a/gdb/config/convex/tm-convex.h +++ /dev/null @@ -1,486 +0,0 @@ -/* OBSOLETE /* Definitions to make GDB run on Convex Unix (4bsd) */ -/* OBSOLETE Copyright 1989, 1991, 1993 Free Software Foundation, Inc. */ -/* OBSOLETE */ -/* OBSOLETE This file is part of GDB. */ -/* OBSOLETE */ -/* OBSOLETE This program is free software; you can redistribute it and/or modify */ -/* OBSOLETE it under the terms of the GNU General Public License as published by */ -/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */ -/* OBSOLETE (at your option) any later version. */ -/* OBSOLETE */ -/* OBSOLETE This program is distributed in the hope that it will be useful, */ -/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */ -/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ -/* OBSOLETE GNU General Public License for more details. */ -/* OBSOLETE */ -/* OBSOLETE You should have received a copy of the GNU General Public License */ -/* OBSOLETE along with this program; if not, write to the Free Software */ -/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define TARGET_BYTE_ORDER BIG_ENDIAN */ -/* OBSOLETE */ -/* OBSOLETE /* There is come problem with the debugging symbols generated by the */ -/* OBSOLETE compiler such that the debugging symbol for the first line of a */ -/* OBSOLETE function overlap with the function prologue. *x/ */ -/* OBSOLETE #define PROLOGUE_FIRSTLINE_OVERLAP */ -/* OBSOLETE */ -/* OBSOLETE /* When convex pcc says CHAR or SHORT, it provides the correct address. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define BELIEVE_PCC_PROMOTION 1 */ -/* OBSOLETE */ -/* OBSOLETE /* Symbol types to ignore. *x/ */ -/* OBSOLETE /* 0xc4 is N_MONPT. Use the numeric value for the benefit of people */ -/* OBSOLETE with (rather) old OS's. *x/ */ -/* OBSOLETE #define IGNORE_SYMBOL(TYPE) \ */ -/* OBSOLETE (((TYPE) & ~N_EXT) == N_TBSS \ */ -/* OBSOLETE || ((TYPE) & ~N_EXT) == N_TDATA \ */ -/* OBSOLETE || ((TYPE) & ~N_EXT) == 0xc4) */ -/* OBSOLETE */ -/* OBSOLETE /* Offset from address of function to start of its code. */ -/* OBSOLETE Zero on most machines. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define FUNCTION_START_OFFSET 0 */ -/* OBSOLETE */ -/* OBSOLETE /* Advance PC across any function entry prologue instructions */ -/* OBSOLETE to reach some "real" code. */ -/* OBSOLETE Convex prolog is: */ -/* OBSOLETE [sub.w #-,sp] in one of 3 possible sizes */ -/* OBSOLETE [mov psw,- fc/vc main program prolog */ -/* OBSOLETE and #-,- (skip it because the "mov psw" saves the */ -/* OBSOLETE mov -,psw] T bit, so continue gets a surprise trap) */ -/* OBSOLETE [and #-,sp] fc/vc O2 main program prolog */ -/* OBSOLETE [ld.- -(ap),-] pcc/gcc register arg loads */ -/* OBSOLETE *x/ */ -/* OBSOLETE */ -/* OBSOLETE extern CORE_ADDR convex_skip_prologue (CORE_ADDR pc); */ -/* OBSOLETE #define SKIP_PROLOGUE(pc) (convex_skip_prologue (pc)) */ -/* OBSOLETE */ -/* OBSOLETE /* Immediately after a function call, return the saved pc. */ -/* OBSOLETE (ignore frame and return *$sp so we can handle both calls and callq) *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define SAVED_PC_AFTER_CALL(frame) \ */ -/* OBSOLETE read_memory_integer (read_register (SP_REGNUM), 4) */ -/* OBSOLETE */ -/* OBSOLETE /* Address of end of stack space. */ -/* OBSOLETE This is ((USRSTACK + 0xfff) & -0x1000)) from <convex/vmparam.h> but */ -/* OBSOLETE that expression depends on the kernel version; instead, fetch a */ -/* OBSOLETE page-zero pointer and get it from that. This will be invalid if */ -/* OBSOLETE they ever change the way bkpt signals are delivered. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define STACK_END_ADDR (0xfffff000 & *(unsigned *) 0x80000050) */ -/* OBSOLETE */ -/* OBSOLETE /* User-mode traps push an extended rtn block, */ -/* OBSOLETE then fault with one of the following PCs *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define is_trace_pc(pc) ((unsigned) ((pc) - (*(int *) 0x80000040)) <= 4) */ -/* OBSOLETE #define is_arith_pc(pc) ((unsigned) ((pc) - (*(int *) 0x80000044)) <= 4) */ -/* OBSOLETE #define is_break_pc(pc) ((unsigned) ((pc) - (*(int *) 0x80000050)) <= 4) */ -/* OBSOLETE */ -/* OBSOLETE /* We need to manipulate trap bits in the psw *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define PSW_TRAP_FLAGS 0x69670000 */ -/* OBSOLETE #define PSW_T_BIT 0x08000000 */ -/* OBSOLETE #define PSW_S_BIT 0x01000000 */ -/* OBSOLETE */ -/* OBSOLETE /* Stack grows downward. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) < (rhs)) */ -/* OBSOLETE */ -/* OBSOLETE /* Sequence of bytes for breakpoint instruction. (bkpt) *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define BREAKPOINT {0x7d,0x50} */ -/* OBSOLETE */ -/* OBSOLETE /* Amount PC must be decremented by after a breakpoint. */ -/* OBSOLETE This is often the number of bytes in BREAKPOINT but not always. */ -/* OBSOLETE (The break PC needs to be decremented by 2, but we do it when the */ -/* OBSOLETE break frame is recognized and popped. That way gdb can tell breaks */ -/* OBSOLETE from trace traps with certainty.) *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define DECR_PC_AFTER_BREAK 0 */ -/* OBSOLETE */ -/* OBSOLETE /* Say how long (ordinary) registers are. This is a piece of bogosity */ -/* OBSOLETE used in push_word and a few other places; REGISTER_RAW_SIZE is the */ -/* OBSOLETE real way to know how big a register is. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define REGISTER_SIZE 8 */ -/* OBSOLETE */ -/* OBSOLETE /* Number of machine registers *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define NUM_REGS 26 */ -/* OBSOLETE */ -/* OBSOLETE /* Initializer for an array of names of registers. */ -/* OBSOLETE There should be NUM_REGS strings in this initializer. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define REGISTER_NAMES {"pc","psw","fp","ap","a5","a4","a3","a2","a1","sp",\ */ -/* OBSOLETE "s7","s6","s5","s4","s3","s2","s1","s0",\ */ -/* OBSOLETE "S7","S6","S5","S4","S3","S2","S1","S0"} */ -/* OBSOLETE */ -/* OBSOLETE /* Register numbers of various important registers. */ -/* OBSOLETE Note that some of these values are "real" register numbers, */ -/* OBSOLETE and correspond to the general registers of the machine, */ -/* OBSOLETE and some are "phony" register numbers which are too large */ -/* OBSOLETE to be actual register numbers as far as the user is concerned */ -/* OBSOLETE but do serve to get the desired values when passed to read_register. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define S0_REGNUM 25 /* the real S regs *x/ */ -/* OBSOLETE #define S7_REGNUM 18 */ -/* OBSOLETE #define s0_REGNUM 17 /* low-order halves of S regs *x/ */ -/* OBSOLETE #define s7_REGNUM 10 */ -/* OBSOLETE #define SP_REGNUM 9 /* A regs *x/ */ -/* OBSOLETE #define A1_REGNUM 8 */ -/* OBSOLETE #define A5_REGNUM 4 */ -/* OBSOLETE #define AP_REGNUM 3 */ -/* OBSOLETE #define FP_REGNUM 2 /* Contains address of executing stack frame *x/ */ -/* OBSOLETE #define PS_REGNUM 1 /* Contains processor status *x/ */ -/* OBSOLETE #define PC_REGNUM 0 /* Contains program counter *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* convert dbx stab register number (from `r' declaration) to a gdb REGNUM *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define STAB_REG_TO_REGNUM(value) \ */ -/* OBSOLETE ((value) < 8 ? S0_REGNUM - (value) : SP_REGNUM - ((value) - 8)) */ -/* OBSOLETE */ -/* OBSOLETE /* Vector register numbers, not handled as ordinary regs. */ -/* OBSOLETE They are treated as convenience variables whose values are read */ -/* OBSOLETE from the inferior when needed. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define V0_REGNUM 0 */ -/* OBSOLETE #define V7_REGNUM 7 */ -/* OBSOLETE #define VM_REGNUM 8 */ -/* OBSOLETE #define VS_REGNUM 9 */ -/* OBSOLETE #define VL_REGNUM 10 */ -/* OBSOLETE */ -/* OBSOLETE /* Total amount of space needed to store our copies of the machine's */ -/* OBSOLETE register state, the array `registers'. *x/ */ -/* OBSOLETE #define REGISTER_BYTES (4*10 + 8*8) */ -/* OBSOLETE */ -/* OBSOLETE /* Index within `registers' of the first byte of the space for */ -/* OBSOLETE register N. */ -/* OBSOLETE NB: must match structure of struct syscall_context for correct operation *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define REGISTER_BYTE(N) ((N) < s7_REGNUM ? 4*(N) : \ */ -/* OBSOLETE (N) < S7_REGNUM ? 44 + 8 * ((N)-s7_REGNUM) : \ */ -/* OBSOLETE 40 + 8 * ((N)-S7_REGNUM)) */ -/* OBSOLETE */ -/* OBSOLETE /* Number of bytes of storage in the actual machine representation */ -/* OBSOLETE for register N. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define REGISTER_RAW_SIZE(N) ((N) < S7_REGNUM ? 4 : 8) */ -/* OBSOLETE */ -/* OBSOLETE /* Number of bytes of storage in the program's representation */ -/* OBSOLETE for register N. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define REGISTER_VIRTUAL_SIZE(N) REGISTER_RAW_SIZE(N) */ -/* OBSOLETE */ -/* OBSOLETE /* Largest value REGISTER_RAW_SIZE can have. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define MAX_REGISTER_RAW_SIZE 8 */ -/* OBSOLETE */ -/* OBSOLETE /* Largest value REGISTER_VIRTUAL_SIZE can have. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE 8 */ -/* OBSOLETE */ -/* OBSOLETE /* Return the GDB type object for the "standard" data type */ -/* OBSOLETE of data in register N. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) \ */ -/* OBSOLETE ((N) < S7_REGNUM ? builtin_type_int : builtin_type_long_long) */ -/* OBSOLETE */ -/* OBSOLETE /* Store the address of the place in which to copy the structure the */ -/* OBSOLETE subroutine will return. This is called from call_function. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define STORE_STRUCT_RETURN(ADDR, SP) \ */ -/* OBSOLETE { write_register (A1_REGNUM, (ADDR)); } */ -/* OBSOLETE */ -/* OBSOLETE /* Extract from an array REGBUF containing the (raw) register state */ -/* OBSOLETE a function return value of type TYPE, and copy that, in virtual format, */ -/* OBSOLETE into VALBUF. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ */ -/* OBSOLETE memcpy (VALBUF, &((char *) REGBUF) [REGISTER_BYTE (S0_REGNUM) + \ */ -/* OBSOLETE 8 - TYPE_LENGTH (TYPE)],\ */ -/* OBSOLETE TYPE_LENGTH (TYPE)) */ -/* OBSOLETE */ -/* OBSOLETE /* Write into appropriate registers a function return value */ -/* OBSOLETE of type TYPE, given in virtual format. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define STORE_RETURN_VALUE(TYPE,VALBUF) \ */ -/* OBSOLETE write_register_bytes (REGISTER_BYTE (S0_REGNUM), VALBUF, 8) */ -/* OBSOLETE */ -/* OBSOLETE /* Extract from an array REGBUF containing the (raw) register state */ -/* OBSOLETE the address in which a function should return its structure value, */ -/* OBSOLETE as a CORE_ADDR (or an expression that can be used as one). *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \ */ -/* OBSOLETE (*(int *) & ((char *) REGBUF) [REGISTER_BYTE (s0_REGNUM)]) */ -/* OBSOLETE */ -/* OBSOLETE /* Define trapped internal variable hooks to read and write */ -/* OBSOLETE vector and communication registers. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define IS_TRAPPED_INTERNALVAR is_trapped_internalvar */ -/* OBSOLETE #define VALUE_OF_TRAPPED_INTERNALVAR value_of_trapped_internalvar */ -/* OBSOLETE #define SET_TRAPPED_INTERNALVAR set_trapped_internalvar */ -/* OBSOLETE */ -/* OBSOLETE extern struct value *value_of_trapped_internalvar (); */ -/* OBSOLETE */ -/* OBSOLETE /* Hooks to read data from soff exec and core files, */ -/* OBSOLETE and to describe the files. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define FILES_INFO_HOOK print_maps */ -/* OBSOLETE */ -/* OBSOLETE /* Hook to call to print a typeless integer value, normally printed in decimal. */ -/* OBSOLETE For convex, use hex instead if the number looks like an address. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define PRINT_TYPELESS_INTEGER decout */ -/* OBSOLETE */ -/* OBSOLETE /* For the native compiler, variables for a particular lexical context */ -/* OBSOLETE are listed after the beginning LBRAC instead of before in the */ -/* OBSOLETE executables list of symbols. Using "gcc_compiled." to distinguish */ -/* OBSOLETE between GCC and native compiler doesn't work on Convex because the */ -/* OBSOLETE linker sorts the symbols to put "gcc_compiled." in the wrong place. */ -/* OBSOLETE desc is nonzero for native, zero for gcc. *x/ */ -/* OBSOLETE #define VARIABLES_INSIDE_BLOCK(desc, gcc_p) (desc != 0) */ -/* OBSOLETE */ -/* OBSOLETE /* Pcc occaisionally puts an SO where there should be an SOL. *x/ */ -/* OBSOLETE #define PCC_SOL_BROKEN */ -/* OBSOLETE */ -/* OBSOLETE /* Describe the pointer in each stack frame to the previous stack frame */ -/* OBSOLETE (its caller). *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* FRAME_CHAIN takes a frame_info with a frame's nominal address in fi->frame, */ -/* OBSOLETE and produces the frame's chain-pointer. *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* (caller fp is saved at 8(fp)) *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define FRAME_CHAIN(fi) (read_memory_integer ((fi)->frame + 8, 4)) */ -/* OBSOLETE */ -/* OBSOLETE /* Define other aspects of the stack frame. *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* We need the boundaries of the text in the exec file, as a kludge, */ -/* OBSOLETE for FRAMELESS_FUNCTION_INVOCATION and CALL_DUMMY_LOCATION. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define NEED_TEXT_START_END 1 */ -/* OBSOLETE */ -/* OBSOLETE /* An expression that tells us whether the function invocation represented */ -/* OBSOLETE by FI does not have a frame on the stack associated with it. */ -/* OBSOLETE On convex, check at the return address for `callq' -- if so, frameless, */ -/* OBSOLETE otherwise, not. *x/ */ -/* OBSOLETE */ -/* OBSOLETE extern int convex_frameless_function_invocation (struct frame_info *fi); */ -/* OBSOLETE #define FRAMELESS_FUNCTION_INVOCATION(FI) (convex_frameless_function_invocatio (FI)) */ -/* OBSOLETE */ -/* OBSOLETE #define FRAME_SAVED_PC(fi) (read_memory_integer ((fi)->frame, 4)) */ -/* OBSOLETE */ -/* OBSOLETE #define FRAME_ARGS_ADDRESS(fi) (read_memory_integer ((fi)->frame + 12, 4)) */ -/* OBSOLETE */ -/* OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) (fi)->frame */ -/* OBSOLETE */ -/* OBSOLETE /* Return number of args passed to a frame. */ -/* OBSOLETE Can return -1, meaning no way to tell. *x/ */ -/* OBSOLETE */ -/* OBSOLETE extern int convex_frame_num_args (struct frame_info *fi); */ -/* OBSOLETE #define FRAME_NUM_ARGS(fi) (convex_frame_num_args ((fi))) */ -/* OBSOLETE */ -/* OBSOLETE /* Return number of bytes at start of arglist that are not really args. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define FRAME_ARGS_SKIP 0 */ -/* OBSOLETE */ -/* OBSOLETE /* Put here the code to store, into a struct frame_saved_regs, */ -/* OBSOLETE the addresses of the saved registers of frame described by FRAME_INFO. */ -/* OBSOLETE This includes special registers such as pc and fp saved in special */ -/* OBSOLETE ways in the stack frame. sp is even more special: */ -/* OBSOLETE the address we return for it IS the sp for the next frame. *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* Normal (short) frames save only PC, FP, (callee's) AP. To reasonably */ -/* OBSOLETE handle gcc and pcc register variables, scan the code following the */ -/* OBSOLETE call for the instructions the compiler inserts to reload register */ -/* OBSOLETE variables from stack slots and record the stack slots as the saved */ -/* OBSOLETE locations of those registers. This will occasionally identify some */ -/* OBSOLETE random load as a saved register; this is harmless. vc does not */ -/* OBSOLETE declare its register allocation actions in the stabs. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \ */ -/* OBSOLETE { register int regnum; \ */ -/* OBSOLETE register int frame_length = /* 3 short, 2 long, 1 extended, 0 context *x/\ */ -/* OBSOLETE (read_memory_integer ((frame_info)->frame + 4, 4) >> 25) & 3; \ */ -/* OBSOLETE register CORE_ADDR frame_fp = \ */ -/* OBSOLETE read_memory_integer ((frame_info)->frame + 8, 4); \ */ -/* OBSOLETE register CORE_ADDR next_addr; \ */ -/* OBSOLETE memset (&frame_saved_regs, '\0', sizeof frame_saved_regs); \ */ -/* OBSOLETE (frame_saved_regs).regs[PC_REGNUM] = (frame_info)->frame + 0; \ */ -/* OBSOLETE (frame_saved_regs).regs[PS_REGNUM] = (frame_info)->frame + 4; \ */ -/* OBSOLETE (frame_saved_regs).regs[FP_REGNUM] = (frame_info)->frame + 8; \ */ -/* OBSOLETE (frame_saved_regs).regs[AP_REGNUM] = frame_fp + 12; \ */ -/* OBSOLETE next_addr = (frame_info)->frame + 12; \ */ -/* OBSOLETE if (frame_length < 3) \ */ -/* OBSOLETE for (regnum = A5_REGNUM; regnum < SP_REGNUM; ++regnum) \ */ -/* OBSOLETE (frame_saved_regs).regs[regnum] = (next_addr += 4); \ */ -/* OBSOLETE if (frame_length < 2) \ */ -/* OBSOLETE (frame_saved_regs).regs[SP_REGNUM] = (next_addr += 4); \ */ -/* OBSOLETE next_addr -= 4; \ */ -/* OBSOLETE if (frame_length < 3) \ */ -/* OBSOLETE for (regnum = S7_REGNUM; regnum < S0_REGNUM; ++regnum) \ */ -/* OBSOLETE (frame_saved_regs).regs[regnum] = (next_addr += 8); \ */ -/* OBSOLETE if (frame_length < 2) \ */ -/* OBSOLETE (frame_saved_regs).regs[S0_REGNUM] = (next_addr += 8); \ */ -/* OBSOLETE else \ */ -/* OBSOLETE (frame_saved_regs).regs[SP_REGNUM] = next_addr + 8; \ */ -/* OBSOLETE if (frame_length == 3) { \ */ -/* OBSOLETE CORE_ADDR pc = read_memory_integer ((frame_info)->frame, 4); \ */ -/* OBSOLETE int op, ix, disp; \ */ -/* OBSOLETE op = read_memory_integer (pc, 2); \ */ -/* OBSOLETE if ((op & 0xffc7) == 0x1480) pc += 4; /* add.w #-,sp *x/ \ */ -/* OBSOLETE else if ((op & 0xffc7) == 0x58c0) pc += 2; /* add.w #-,sp *x/ \ */ -/* OBSOLETE op = read_memory_integer (pc, 2); \ */ -/* OBSOLETE if ((op & 0xffc7) == 0x2a06) pc += 4; /* ld.w -,ap *x/ \ */ -/* OBSOLETE for (;;) { \ */ -/* OBSOLETE op = read_memory_integer (pc, 2); \ */ -/* OBSOLETE ix = (op >> 3) & 7; \ */ -/* OBSOLETE if ((op & 0xfcc0) == 0x2800) { /* ld.- -,ak *x/ \ */ -/* OBSOLETE regnum = SP_REGNUM - (op & 7); \ */ -/* OBSOLETE disp = read_memory_integer (pc + 2, 2); \ */ -/* OBSOLETE pc += 4;} \ */ -/* OBSOLETE else if ((op & 0xfcc0) == 0x2840) { /* ld.- -,ak *x/ \ */ -/* OBSOLETE regnum = SP_REGNUM - (op & 7); \ */ -/* OBSOLETE disp = read_memory_integer (pc + 2, 4); \ */ -/* OBSOLETE pc += 6;} \ */ -/* OBSOLETE if ((op & 0xfcc0) == 0x3000) { /* ld.- -,sk *x/ \ */ -/* OBSOLETE regnum = S0_REGNUM - (op & 7); \ */ -/* OBSOLETE disp = read_memory_integer (pc + 2, 2); \ */ -/* OBSOLETE pc += 4;} \ */ -/* OBSOLETE else if ((op & 0xfcc0) == 0x3040) { /* ld.- -,sk *x/ \ */ -/* OBSOLETE regnum = S0_REGNUM - (op & 7); \ */ -/* OBSOLETE disp = read_memory_integer (pc + 2, 4); \ */ -/* OBSOLETE pc += 6;} \ */ -/* OBSOLETE else if ((op & 0xff00) == 0x7100) { /* br crossjump *x/ \ */ -/* OBSOLETE pc += 2 * (char) op; \ */ -/* OBSOLETE continue;} \ */ -/* OBSOLETE else if (op == 0x0140) { /* jmp crossjump *x/ \ */ -/* OBSOLETE pc = read_memory_integer (pc + 2, 4); \ */ -/* OBSOLETE continue;} \ */ -/* OBSOLETE else break; \ */ -/* OBSOLETE if ((frame_saved_regs).regs[regnum]) \ */ -/* OBSOLETE break; \ */ -/* OBSOLETE if (ix == 7) disp += frame_fp; \ */ -/* OBSOLETE else if (ix == 6) disp += read_memory_integer (frame_fp + 12, 4); \ */ -/* OBSOLETE else if (ix != 0) break; \ */ -/* OBSOLETE (frame_saved_regs).regs[regnum] = \ */ -/* OBSOLETE disp - 8 + (1 << ((op >> 8) & 3)); \ */ -/* OBSOLETE if (regnum >= S7_REGNUM) \ */ -/* OBSOLETE (frame_saved_regs).regs[regnum - S0_REGNUM + s0_REGNUM] = \ */ -/* OBSOLETE disp - 4 + (1 << ((op >> 8) & 3)); \ */ -/* OBSOLETE } \ */ -/* OBSOLETE } \ */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Things needed for making the inferior call functions. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define CALL_DUMMY_LOCATION BEFORE_TEXT_END */ -/* OBSOLETE */ -/* OBSOLETE /* Push an empty stack frame, to record the current PC, etc. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define PUSH_DUMMY_FRAME \ */ -/* OBSOLETE { register CORE_ADDR sp = read_register (SP_REGNUM); \ */ -/* OBSOLETE register int regnum; \ */ -/* OBSOLETE char buf[8]; \ */ -/* OBSOLETE long word; \ */ -/* OBSOLETE for (regnum = S0_REGNUM; regnum >= S7_REGNUM; --regnum) { \ */ -/* OBSOLETE read_register_bytes (REGISTER_BYTE (regnum), buf, 8); \ */ -/* OBSOLETE sp = push_bytes (sp, buf, 8);} \ */ -/* OBSOLETE for (regnum = SP_REGNUM; regnum >= FP_REGNUM; --regnum) { \ */ -/* OBSOLETE word = read_register (regnum); \ */ -/* OBSOLETE sp = push_bytes (sp, &word, 4);} \ */ -/* OBSOLETE word = (read_register (PS_REGNUM) &~ (3<<25)) | (1<<25); \ */ -/* OBSOLETE sp = push_bytes (sp, &word, 4); \ */ -/* OBSOLETE word = read_register (PC_REGNUM); \ */ -/* OBSOLETE sp = push_bytes (sp, &word, 4); \ */ -/* OBSOLETE write_register (SP_REGNUM, sp); \ */ -/* OBSOLETE write_register (FP_REGNUM, sp); \ */ -/* OBSOLETE write_register (AP_REGNUM, sp);} */ -/* OBSOLETE */ -/* OBSOLETE /* Discard from the stack the innermost frame, restoring all registers. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define POP_FRAME do {\ */ -/* OBSOLETE register CORE_ADDR fp = read_register (FP_REGNUM); \ */ -/* OBSOLETE register int regnum; \ */ -/* OBSOLETE register int frame_length = /* 3 short, 2 long, 1 extended, 0 context *x/ \ */ -/* OBSOLETE (read_memory_integer (fp + 4, 4) >> 25) & 3; \ */ -/* OBSOLETE char buf[8]; \ */ -/* OBSOLETE write_register (PC_REGNUM, read_memory_integer (fp, 4)); \ */ -/* OBSOLETE write_register (PS_REGNUM, read_memory_integer (fp += 4, 4)); \ */ -/* OBSOLETE write_register (FP_REGNUM, read_memory_integer (fp += 4, 4)); \ */ -/* OBSOLETE write_register (AP_REGNUM, read_memory_integer (fp += 4, 4)); \ */ -/* OBSOLETE if (frame_length < 3) \ */ -/* OBSOLETE for (regnum = A5_REGNUM; regnum < SP_REGNUM; ++regnum) \ */ -/* OBSOLETE write_register (regnum, read_memory_integer (fp += 4, 4)); \ */ -/* OBSOLETE if (frame_length < 2) \ */ -/* OBSOLETE write_register (SP_REGNUM, read_memory_integer (fp += 4, 4)); \ */ -/* OBSOLETE fp -= 4; \ */ -/* OBSOLETE if (frame_length < 3) \ */ -/* OBSOLETE for (regnum = S7_REGNUM; regnum < S0_REGNUM; ++regnum) { \ */ -/* OBSOLETE read_memory (fp += 8, buf, 8); \ */ -/* OBSOLETE write_register_bytes (REGISTER_BYTE (regnum), buf, 8);} \ */ -/* OBSOLETE if (frame_length < 2) { \ */ -/* OBSOLETE read_memory (fp += 8, buf, 8); \ */ -/* OBSOLETE write_register_bytes (REGISTER_BYTE (regnum), buf, 8);} \ */ -/* OBSOLETE else write_register (SP_REGNUM, fp + 8); \ */ -/* OBSOLETE flush_cached_frames (); \ */ -/* OBSOLETE } while (0) */ -/* OBSOLETE */ -/* OBSOLETE /* This sequence of words is the instructions */ -/* OBSOLETE mov sp,ap */ -/* OBSOLETE pshea 69696969 */ -/* OBSOLETE calls 32323232 */ -/* OBSOLETE bkpt */ -/* OBSOLETE Note this is 16 bytes. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define CALL_DUMMY {0x50860d4069696969LL,0x2140323232327d50LL} */ -/* OBSOLETE */ -/* OBSOLETE #define CALL_DUMMY_LENGTH 16 */ -/* OBSOLETE */ -/* OBSOLETE #define CALL_DUMMY_START_OFFSET 0 */ -/* OBSOLETE */ -/* OBSOLETE /* Insert the specified number of args and function address */ -/* OBSOLETE into a call sequence of the above form stored at DUMMYNAME. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \ */ -/* OBSOLETE { *(int *)((char *) dummyname + 4) = nargs; \ */ -/* OBSOLETE *(int *)((char *) dummyname + 10) = fun; } */ -/* OBSOLETE */ -/* OBSOLETE /* Defs to read soff symbol tables, see dbxread.c *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define NUMBER_OF_SYMBOLS ((long) opthdr.o_nsyms) */ -/* OBSOLETE #define STRING_TABLE_OFFSET ((long) filehdr.h_strptr) */ -/* OBSOLETE #define SYMBOL_TABLE_OFFSET ((long) opthdr.o_symptr) */ -/* OBSOLETE #define STRING_TABLE_SIZE ((long) filehdr.h_strsiz) */ -/* OBSOLETE #define SIZE_OF_TEXT_SEGMENT ((long) txthdr.s_size) */ -/* OBSOLETE #define ENTRY_POINT ((long) opthdr.o_entry) */ -/* OBSOLETE */ -/* OBSOLETE #define READ_STRING_TABLE_SIZE(BUFFER) \ */ -/* OBSOLETE (BUFFER = STRING_TABLE_SIZE) */ -/* OBSOLETE */ -/* OBSOLETE #define DECLARE_FILE_HEADERS \ */ -/* OBSOLETE FILEHDR filehdr; \ */ -/* OBSOLETE OPTHDR opthdr; \ */ -/* OBSOLETE SCNHDR txthdr */ -/* OBSOLETE */ -/* OBSOLETE #define READ_FILE_HEADERS(DESC,NAME) \ */ -/* OBSOLETE { \ */ -/* OBSOLETE int n; \ */ -/* OBSOLETE val = myread (DESC, &filehdr, sizeof filehdr); \ */ -/* OBSOLETE if (val < 0) \ */ -/* OBSOLETE perror_with_name (NAME); \ */ -/* OBSOLETE if (! IS_SOFF_MAGIC (filehdr.h_magic)) \ */ -/* OBSOLETE error ("%s: not an executable file.", NAME); \ */ -/* OBSOLETE lseek (DESC, 0L, 0); \ */ -/* OBSOLETE if (myread (DESC, &filehdr, sizeof filehdr) < 0) \ */ -/* OBSOLETE perror_with_name (NAME); \ */ -/* OBSOLETE if (myread (DESC, &opthdr, filehdr.h_opthdr) <= 0) \ */ -/* OBSOLETE perror_with_name (NAME); \ */ -/* OBSOLETE for (n = 0; n < filehdr.h_nscns; n++) \ */ -/* OBSOLETE { \ */ -/* OBSOLETE if (myread (DESC, &txthdr, sizeof txthdr) < 0) \ */ -/* OBSOLETE perror_with_name (NAME); \ */ -/* OBSOLETE if ((txthdr.s_flags & S_TYPMASK) == S_TEXT) \ */ -/* OBSOLETE break; \ */ -/* OBSOLETE } \ */ -/* OBSOLETE } */ diff --git a/gdb/config/convex/xm-convex.h b/gdb/config/convex/xm-convex.h deleted file mode 100644 index 8552a3a..0000000 --- a/gdb/config/convex/xm-convex.h +++ /dev/null @@ -1,35 +0,0 @@ -/* OBSOLETE /* Definitions to make GDB run on Convex Unix (4bsd) */ -/* OBSOLETE Copyright 1989, 1991, 1992, 1996 Free Software Foundation, Inc. */ -/* OBSOLETE */ -/* OBSOLETE This file is part of GDB. */ -/* OBSOLETE */ -/* OBSOLETE This program is free software; you can redistribute it and/or modify */ -/* OBSOLETE it under the terms of the GNU General Public License as published by */ -/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */ -/* OBSOLETE (at your option) any later version. */ -/* OBSOLETE */ -/* OBSOLETE This program is distributed in the hope that it will be useful, */ -/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */ -/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ -/* OBSOLETE GNU General Public License for more details. */ -/* OBSOLETE */ -/* OBSOLETE You should have received a copy of the GNU General Public License */ -/* OBSOLETE along with this program; if not, write to the Free Software */ -/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define HOST_BYTE_ORDER BIG_ENDIAN */ -/* OBSOLETE */ -/* OBSOLETE #define ATTACH_DETACH */ -/* OBSOLETE #define HAVE_WAIT_STRUCT */ -/* OBSOLETE #define NO_SIGINTERRUPT */ -/* OBSOLETE */ -/* OBSOLETE /* Use SIGCONT rather than SIGTSTP because convex Unix occasionally */ -/* OBSOLETE turkeys SIGTSTP. I think. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define STOP_SIGNAL SIGCONT */ -/* OBSOLETE */ -/* OBSOLETE /* Hook to call after creating inferior process. Now init_trace_fun */ -/* OBSOLETE is in the same place. So re-write this to use the init_trace_fun */ -/* OBSOLETE (making convex a debugging target). FIXME. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define CREATE_INFERIOR_HOOK create_inferior_hook */ diff --git a/gdb/config/m68k/altos.mh b/gdb/config/m68k/altos.mh deleted file mode 100644 index 51415be..0000000 --- a/gdb/config/m68k/altos.mh +++ /dev/null @@ -1,5 +0,0 @@ -# OBSOLETE # Host: Altos 3068 (m68k, System V release 2) -# OBSOLETE -# OBSOLETE XM_FILE= xm-altos.h -# OBSOLETE XDEPFILES= infptrace.o inftarg.o fork-child.o altos-xdep.o - diff --git a/gdb/config/m68k/altos.mt b/gdb/config/m68k/altos.mt deleted file mode 100644 index 7dc654b..0000000 --- a/gdb/config/m68k/altos.mt +++ /dev/null @@ -1,3 +0,0 @@ -# OBSOLETE # Target: Altos 3068 (m68k, System V release 2) -# OBSOLETE TDEPFILES= m68k-tdep.o -# OBSOLETE TM_FILE= tm-altos.h diff --git a/gdb/config/m68k/tm-altos.h b/gdb/config/m68k/tm-altos.h deleted file mode 100644 index 7c14009..0000000 --- a/gdb/config/m68k/tm-altos.h +++ /dev/null @@ -1,44 +0,0 @@ -/* OBSOLETE /* Target definitions for GDB on an Altos 3068 (m68k running SVR2) */ -/* OBSOLETE Copyright 1987, 1989, 1991, 1993 Free Software Foundation, Inc. */ -/* OBSOLETE */ -/* OBSOLETE This file is part of GDB. */ -/* OBSOLETE */ -/* OBSOLETE This program is free software; you can redistribute it and/or modify */ -/* OBSOLETE it under the terms of the GNU General Public License as published by */ -/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */ -/* OBSOLETE (at your option) any later version. */ -/* OBSOLETE */ -/* OBSOLETE This program is distributed in the hope that it will be useful, */ -/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */ -/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ -/* OBSOLETE GNU General Public License for more details. */ -/* OBSOLETE */ -/* OBSOLETE You should have received a copy of the GNU General Public License */ -/* OBSOLETE along with this program; if not, write to the Free Software */ -/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* The child target can't deal with floating registers. *x/ */ -/* OBSOLETE #define CANNOT_STORE_REGISTER(regno) ((regno) >= FP0_REGNUM) */ -/* OBSOLETE */ -/* OBSOLETE /* Define BPT_VECTOR if it is different than the default. */ -/* OBSOLETE This is the vector number used by traps to indicate a breakpoint. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define BPT_VECTOR 0xe */ -/* OBSOLETE */ -/* OBSOLETE /* Address of end of stack space. *x/ */ -/* OBSOLETE */ -/* OBSOLETE /*#define STACK_END_ADDR (0xffffff)*x/ */ -/* OBSOLETE #define STACK_END_ADDR (0x1000000) */ -/* OBSOLETE */ -/* OBSOLETE /* Amount PC must be decremented by after a breakpoint. */ -/* OBSOLETE On the Altos, the kernel resets the pc to the trap instr *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define DECR_PC_AFTER_BREAK 0 */ -/* OBSOLETE */ -/* OBSOLETE /* The only reason this is here is the tm-altos.h reference below. It */ -/* OBSOLETE was moved back here from tm-m68k.h. FIXME? *x/ */ -/* OBSOLETE */ -/* OBSOLETE extern CORE_ADDR altos_skip_prologue (CORE_ADDR); */ -/* OBSOLETE #define SKIP_PROLOGUE(pc) (altos_skip_prologue (pc)) */ -/* OBSOLETE */ -/* OBSOLETE #include "m68k/tm-m68k.h" */ diff --git a/gdb/config/m68k/xm-altos.h b/gdb/config/m68k/xm-altos.h deleted file mode 100644 index 084c7b0..0000000 --- a/gdb/config/m68k/xm-altos.h +++ /dev/null @@ -1,202 +0,0 @@ -/* OBSOLETE /* Definitions to make GDB run on an Altos 3068 (m68k running SVR2) */ -/* OBSOLETE Copyright (C) 1987,1989 Free Software Foundation, Inc. */ -/* OBSOLETE */ -/* OBSOLETE This file is part of GDB. */ -/* OBSOLETE */ -/* OBSOLETE This program is free software; you can redistribute it and/or modify */ -/* OBSOLETE it under the terms of the GNU General Public License as published by */ -/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */ -/* OBSOLETE (at your option) any later version. */ -/* OBSOLETE */ -/* OBSOLETE This program is distributed in the hope that it will be useful, */ -/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */ -/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ -/* OBSOLETE GNU General Public License for more details. */ -/* OBSOLETE */ -/* OBSOLETE You should have received a copy of the GNU General Public License */ -/* OBSOLETE along with this program; if not, write to the Free Software */ -/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define HOST_BYTE_ORDER BIG_ENDIAN */ -/* OBSOLETE */ -/* OBSOLETE /* The altos support would make a good base for a port to other USGR2 systems */ -/* OBSOLETE (like the 3b1 and the Convergent miniframe). *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* This is only needed in one file, but it's cleaner to put it here than */ -/* OBSOLETE putting in more #ifdef's. *x/ */ -/* OBSOLETE #include <sys/page.h> */ -/* OBSOLETE #include <sys/net.h> */ -/* OBSOLETE */ -/* OBSOLETE #define USG */ -/* OBSOLETE */ -/* OBSOLETE #define HAVE_TERMIO */ -/* OBSOLETE */ -/* OBSOLETE #define CBREAK XTABS /* It takes all kinds... *x/ */ -/* OBSOLETE */ -/* OBSOLETE #ifndef R_OK */ -/* OBSOLETE #define R_OK 4 */ -/* OBSOLETE #define W_OK 2 */ -/* OBSOLETE #define X_OK 1 */ -/* OBSOLETE #define F_OK 0 */ -/* OBSOLETE #endif */ -/* OBSOLETE */ -/* OBSOLETE /* Get sys/wait.h ie. from a Sun and edit it a little (mc68000 to m68k) *x/ */ -/* OBSOLETE /* Why bother? *x/ */ -/* OBSOLETE #if 0 */ -/* OBSOLETE #define HAVE_WAIT_STRUCT */ -/* OBSOLETE #endif */ -/* OBSOLETE */ -/* OBSOLETE /* This is the amount to subtract from u.u_ar0 */ -/* OBSOLETE to get the offset in the core file of the register values. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define KERNEL_U_ADDR 0x1fbf000 */ -/* OBSOLETE */ -/* OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \ */ -/* OBSOLETE { if (regno <= SP_REGNUM) \ */ -/* OBSOLETE addr = blockend + regno * 4; \ */ -/* OBSOLETE else if (regno == PS_REGNUM) \ */ -/* OBSOLETE addr = blockend + regno * 4 + 4; \ */ -/* OBSOLETE else if (regno == PC_REGNUM) \ */ -/* OBSOLETE addr = blockend + regno * 4 + 2; \ */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE #define REGISTER_ADDR(u_ar0, regno) \ */ -/* OBSOLETE (((regno) < PS_REGNUM) \ */ -/* OBSOLETE ? (&((struct exception_stack *) (u_ar0))->e_regs[(regno + R0)]) \ */ -/* OBSOLETE : (((regno) == PS_REGNUM) \ */ -/* OBSOLETE ? ((int *) (&((struct exception_stack *) (u_ar0))->e_PS)) \ */ -/* OBSOLETE : (&((struct exception_stack *) (u_ar0))->e_PC))) */ -/* OBSOLETE */ -/* OBSOLETE #define FP_REGISTER_ADDR(u, regno) \ */ -/* OBSOLETE (((char *) \ */ -/* OBSOLETE (((regno) < FPC_REGNUM) \ */ -/* OBSOLETE ? (&u.u_pcb.pcb_mc68881[FMC68881_R0 + (((regno) - FP0_REGNUM) * 3)]) \ */ -/* OBSOLETE : (&u.u_pcb.pcb_mc68881[FMC68881_C + ((regno) - FPC_REGNUM)]))) \ */ -/* OBSOLETE - ((char *) (& u))) */ -/* OBSOLETE */ -/* OBSOLETE */ -/* OBSOLETE #ifndef __GNUC__ */ -/* OBSOLETE #undef USE_GAS */ -/* OBSOLETE #define ALTOS_AS */ -/* OBSOLETE #else */ -/* OBSOLETE #define USE_GAS */ -/* OBSOLETE #endif */ -/* OBSOLETE */ -/* OBSOLETE /* Motorola assembly format *x/ */ -/* OBSOLETE #if !defined(USE_GAS) && !defined(ALTOS) */ -/* OBSOLETE #define MOTOROLA */ -/* OBSOLETE #endif */ -/* OBSOLETE */ -/* OBSOLETE /* Interface definitions for kernel debugger KDB. *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* Map machine fault codes into signal numbers. */ -/* OBSOLETE First subtract 0, divide by 4, then index in a table. */ -/* OBSOLETE Faults for which the entry in this table is 0 */ -/* OBSOLETE are not handled by KDB; the program's own trap handler */ -/* OBSOLETE gets to handle then. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define FAULT_CODE_ORIGIN 0 */ -/* OBSOLETE #define FAULT_CODE_UNITS 4 */ -/* OBSOLETE #define FAULT_TABLE \ */ -/* OBSOLETE { 0, 0, 0, 0, SIGTRAP, 0, 0, 0, \ */ -/* OBSOLETE 0, SIGTRAP, 0, 0, 0, 0, 0, SIGKILL, \ */ -/* OBSOLETE 0, 0, 0, 0, 0, 0, 0, 0, \ */ -/* OBSOLETE SIGILL } */ -/* OBSOLETE */ -/* OBSOLETE /* Start running with a stack stretching from BEG to END. */ -/* OBSOLETE BEG and END should be symbols meaningful to the assembler. */ -/* OBSOLETE This is used only for kdb. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #ifdef MOTOROLA */ -/* OBSOLETE #define INIT_STACK(beg, end) \ */ -/* OBSOLETE { asm (".globl end"); \ */ -/* OBSOLETE asm ("move.l $ end, sp"); \ */ -/* OBSOLETE asm ("clr.l fp"); } */ -/* OBSOLETE #else */ -/* OBSOLETE #ifdef ALTOS_AS */ -/* OBSOLETE #define INIT_STACK(beg, end) \ */ -/* OBSOLETE { asm ("global end"); \ */ -/* OBSOLETE asm ("mov.l &end,%sp"); \ */ -/* OBSOLETE asm ("clr.l %fp"); } */ -/* OBSOLETE #else */ -/* OBSOLETE #define INIT_STACK(beg, end) \ */ -/* OBSOLETE { asm (".globl end"); \ */ -/* OBSOLETE asm ("movel $ end, sp"); \ */ -/* OBSOLETE asm ("clrl fp"); } */ -/* OBSOLETE #endif */ -/* OBSOLETE #endif */ -/* OBSOLETE */ -/* OBSOLETE /* Push the frame pointer register on the stack. *x/ */ -/* OBSOLETE #ifdef MOTOROLA */ -/* OBSOLETE #define PUSH_FRAME_PTR \ */ -/* OBSOLETE asm ("move.l fp, -(sp)"); */ -/* OBSOLETE #else */ -/* OBSOLETE #ifdef ALTOS_AS */ -/* OBSOLETE #define PUSH_FRAME_PTR \ */ -/* OBSOLETE asm ("mov.l %fp, -(%sp)"); */ -/* OBSOLETE #else */ -/* OBSOLETE #define PUSH_FRAME_PTR \ */ -/* OBSOLETE asm ("movel fp, -(sp)"); */ -/* OBSOLETE #endif */ -/* OBSOLETE #endif */ -/* OBSOLETE */ -/* OBSOLETE /* Copy the top-of-stack to the frame pointer register. *x/ */ -/* OBSOLETE #ifdef MOTOROLA */ -/* OBSOLETE #define POP_FRAME_PTR \ */ -/* OBSOLETE asm ("move.l (sp), fp"); */ -/* OBSOLETE #else */ -/* OBSOLETE #ifdef ALTOS_AS */ -/* OBSOLETE #define POP_FRAME_PTR \ */ -/* OBSOLETE asm ("mov.l (%sp), %fp"); */ -/* OBSOLETE #else */ -/* OBSOLETE #define POP_FRAME_PTR \ */ -/* OBSOLETE asm ("movl (sp), fp"); */ -/* OBSOLETE #endif */ -/* OBSOLETE #endif */ -/* OBSOLETE */ -/* OBSOLETE /* After KDB is entered by a fault, push all registers */ -/* OBSOLETE that GDB thinks about (all NUM_REGS of them), */ -/* OBSOLETE so that they appear in order of ascending GDB register number. */ -/* OBSOLETE The fault code will be on the stack beyond the last register. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #ifdef MOTOROLA */ -/* OBSOLETE #define PUSH_REGISTERS \ */ -/* OBSOLETE { asm ("clr.w -(sp)"); \ */ -/* OBSOLETE asm ("pea (10,sp)"); \ */ -/* OBSOLETE asm ("movem $ 0xfffe,-(sp)"); } */ -/* OBSOLETE #else */ -/* OBSOLETE #ifdef ALTOS_AS */ -/* OBSOLETE #define PUSH_REGISTERS \ */ -/* OBSOLETE { asm ("clr.w -(%sp)"); \ */ -/* OBSOLETE asm ("pea (10,%sp)"); \ */ -/* OBSOLETE asm ("movm.l &0xfffe,-(%sp)"); } */ -/* OBSOLETE #else */ -/* OBSOLETE #define PUSH_REGISTERS \ */ -/* OBSOLETE { asm ("clrw -(sp)"); \ */ -/* OBSOLETE asm ("pea 10(sp)"); \ */ -/* OBSOLETE asm ("movem $ 0xfffe,-(sp)"); } */ -/* OBSOLETE #endif */ -/* OBSOLETE #endif */ -/* OBSOLETE */ -/* OBSOLETE /* Assuming the registers (including processor status) have been */ -/* OBSOLETE pushed on the stack in order of ascending GDB register number, */ -/* OBSOLETE restore them and return to the address in the saved PC register. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #ifdef MOTOROLA */ -/* OBSOLETE #define POP_REGISTERS \ */ -/* OBSOLETE { asm ("subi.l $8,28(sp)"); \ */ -/* OBSOLETE asm ("movem (sp),$ 0xffff"); \ */ -/* OBSOLETE asm ("rte"); } */ -/* OBSOLETE #else */ -/* OBSOLETE #ifdef ALTOS_AS */ -/* OBSOLETE #define POP_REGISTERS \ */ -/* OBSOLETE { asm ("sub.l &8,28(%sp)"); \ */ -/* OBSOLETE asm ("movem (%sp),&0xffff"); \ */ -/* OBSOLETE asm ("rte"); } */ -/* OBSOLETE #else */ -/* OBSOLETE #define POP_REGISTERS \ */ -/* OBSOLETE { asm ("subil $8,28(sp)"); \ */ -/* OBSOLETE asm ("movem (sp),$ 0xffff"); \ */ -/* OBSOLETE asm ("rte"); } */ -/* OBSOLETE #endif */ -/* OBSOLETE #endif */ diff --git a/gdb/config/pyr/pyramid.mh b/gdb/config/pyr/pyramid.mh deleted file mode 100644 index d7ebc37..0000000 --- a/gdb/config/pyr/pyramid.mh +++ /dev/null @@ -1,8 +0,0 @@ -# OBSOLETE # Host: Pyramid under OSx 4.0 (4.2bsd). -# OBSOLETE -# OBSOLETE #msg If you don't compile GDB with GCC, you'll need to add -# OBSOLETE #msg ALLOCA=alloca.o and ALLOCA1=alloca.o to the Makefile.# -# OBSOLETE msg -# OBSOLETE -# OBSOLETE XDEPFILES= pyr-xdep.o infptrace.o inftarg.o fork-child.o -# OBSOLETE XM_FILE= xm-pyr.h diff --git a/gdb/config/pyr/pyramid.mt b/gdb/config/pyr/pyramid.mt deleted file mode 100644 index 342a77d..0000000 --- a/gdb/config/pyr/pyramid.mt +++ /dev/null @@ -1,3 +0,0 @@ -# OBSOLETE # Target: Pyramid under OSx 4.0 (4.2bsd). -# OBSOLETE TDEPFILES= pyr-tdep.o -# OBSOLETE TM_FILE= tm-pyr.h diff --git a/gdb/config/pyr/tm-pyr.h b/gdb/config/pyr/tm-pyr.h deleted file mode 100644 index 2647e15..0000000 --- a/gdb/config/pyr/tm-pyr.h +++ /dev/null @@ -1,483 +0,0 @@ -/* OBSOLETE /* Definitions to make GDB run on a Pyramid under OSx 4.0 (4.2bsd). */ -/* OBSOLETE Copyright 1988, 1989, 1991, 1993 Free Software Foundation, Inc. */ -/* OBSOLETE */ -/* OBSOLETE This file is part of GDB. */ -/* OBSOLETE */ -/* OBSOLETE This program is free software; you can redistribute it and/or modify */ -/* OBSOLETE it under the terms of the GNU General Public License as published by */ -/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */ -/* OBSOLETE (at your option) any later version. */ -/* OBSOLETE */ -/* OBSOLETE This program is distributed in the hope that it will be useful, */ -/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */ -/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ -/* OBSOLETE GNU General Public License for more details. */ -/* OBSOLETE */ -/* OBSOLETE You should have received a copy of the GNU General Public License */ -/* OBSOLETE along with this program; if not, write to the Free Software */ -/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define TARGET_BYTE_ORDER BIG_ENDIAN */ -/* OBSOLETE */ -/* OBSOLETE /* Traditional Unix virtual address spaces have thre regions: text, */ -/* OBSOLETE data and stack. The text, initialised data, and uninitialised data */ -/* OBSOLETE are represented in separate segments of the a.out file. */ -/* OBSOLETE When a process dumps core, the data and stack regions are written */ -/* OBSOLETE to a core file. This gives a debugger enough information to */ -/* OBSOLETE reconstruct (and debug) the virtual address space at the time of */ -/* OBSOLETE the coredump. */ -/* OBSOLETE Pyramids have an distinct fourth region of the virtual address */ -/* OBSOLETE space, in which the contents of the windowed registers are stacked */ -/* OBSOLETE in fixed-size frames. Pyramid refer to this region as the control */ -/* OBSOLETE stack. Each call (or trap) automatically allocates a new register */ -/* OBSOLETE frame; each return deallocates the current frame and restores the */ -/* OBSOLETE windowed registers to their values before the call. */ -/* OBSOLETE */ -/* OBSOLETE When dumping core, the control stack is written to a core files as */ -/* OBSOLETE a third segment. The core-handling functions need to know to deal */ -/* OBSOLETE with it. *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* Tell corefile.c there is an extra segment. *x/ */ -/* OBSOLETE #define REG_STACK_SEGMENT */ -/* OBSOLETE */ -/* OBSOLETE /* Floating point is IEEE compatible on most Pyramid hardware */ -/* OBSOLETE (Older processors do not have IEEE NaNs). *x/ */ -/* OBSOLETE #define IEEE_FLOAT */ -/* OBSOLETE */ -/* OBSOLETE /* Offset from address of function to start of its code. */ -/* OBSOLETE Zero on most machines. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define FUNCTION_START_OFFSET 0 */ -/* OBSOLETE */ -/* OBSOLETE /* Advance PC across any function entry prologue instructions */ -/* OBSOLETE to reach some "real" code. *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* FIXME -- do we want to skip insns to allocate the local frame? */ -/* OBSOLETE If so, what do they look like? */ -/* OBSOLETE This is becoming harder, since tege@sics.SE wants to change */ -/* OBSOLETE gcc to not output a prologue when no frame is needed. *x/ */ -/* OBSOLETE #define SKIP_PROLOGUE(pc) (pc) */ -/* OBSOLETE */ -/* OBSOLETE */ -/* OBSOLETE /* Immediately after a function call, return the saved pc. */ -/* OBSOLETE Can't always go through the frames for this because on some machines */ -/* OBSOLETE the new frame is not set up until the new function executes */ -/* OBSOLETE some instructions. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define SAVED_PC_AFTER_CALL(frame) FRAME_SAVED_PC(frame) */ -/* OBSOLETE */ -/* OBSOLETE /* Address of end of stack space. *x/ */ -/* OBSOLETE /* This seems to be right for the 90x comp.vuw.ac.nz. */ -/* OBSOLETE The correct value at any site may be a function of the configured */ -/* OBSOLETE maximum control stack depth. If so, I don't know where the */ -/* OBSOLETE control-stack depth is configured, so I can't #include it here. *x/ */ -/* OBSOLETE #define STACK_END_ADDR (0xc00cc000) */ -/* OBSOLETE */ -/* OBSOLETE /* Register window stack (Control stack) stack definitions */ -/* OBSOLETE - Address of beginning of control stack. */ -/* OBSOLETE - size of control stack frame */ -/* OBSOLETE (Note that since crts0 is usually the first function called, */ -/* OBSOLETE main()'s control stack is one frame (0x80 bytes) beyond this value. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define CONTROL_STACK_ADDR (0xc00cd000) */ -/* OBSOLETE */ -/* OBSOLETE /* Bytes in a register window -- 16 parameter regs, 16 local regs */ -/* OBSOLETE for each call, is 32 regs * 4 bytes *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define CONTROL_STACK_FRAME_SIZE (32*4) */ -/* OBSOLETE */ -/* OBSOLETE /* FIXME. On a pyr, Data Stack grows downward; control stack goes upwards. */ -/* OBSOLETE Which direction should we use for INNER_THAN, PC_INNER_THAN ?? *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) < (rhs)) */ -/* OBSOLETE */ -/* OBSOLETE /* Stack must be aligned on 32-bit boundaries when synthesizing */ -/* OBSOLETE function calls. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define STACK_ALIGN(ADDR) (((ADDR) + 3) & -4) */ -/* OBSOLETE */ -/* OBSOLETE /* Sequence of bytes for breakpoint instruction. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define BREAKPOINT {0xf0, 00, 00, 00} */ -/* OBSOLETE */ -/* OBSOLETE /* Amount PC must be decremented by after a breakpoint. */ -/* OBSOLETE This is often the number of bytes in BREAKPOINT */ -/* OBSOLETE but not always. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define DECR_PC_AFTER_BREAK 0 */ -/* OBSOLETE */ -/* OBSOLETE /* Say how long (ordinary) registers are. This is a piece of bogosity */ -/* OBSOLETE used in push_word and a few other places; REGISTER_RAW_SIZE is the */ -/* OBSOLETE real way to know how big a register is. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define REGISTER_SIZE 4 */ -/* OBSOLETE */ -/* OBSOLETE /* Number of machine registers *x/ */ -/* OBSOLETE /* pyramids have 64, plus one for the PSW; plus perhaps one more for the */ -/* OBSOLETE kernel stack pointer (ksp) and control-stack pointer (CSP) *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define NUM_REGS 67 */ -/* OBSOLETE */ -/* OBSOLETE /* Initializer for an array of names of registers. */ -/* OBSOLETE There should be NUM_REGS strings in this initializer. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define REGISTER_NAMES \ */ -/* OBSOLETE {"gr0", "gr1", "gr2", "gr3", "gr4", "gr5", "gr6", "gr7", \ */ -/* OBSOLETE "gr8", "gr9", "gr10", "gr11", "logpsw", "cfp", "sp", "pc", \ */ -/* OBSOLETE "pr0", "pr1", "pr2", "pr3", "pr4", "pr5", "pr6", "pr7", \ */ -/* OBSOLETE "pr8", "pr9", "pr10", "pr11", "pr12", "pr13", "pr14", "pr15", \ */ -/* OBSOLETE "lr0", "lr1", "lr2", "lr3", "lr4", "lr5", "lr6", "lr7", \ */ -/* OBSOLETE "lr8", "lr9", "lr10", "lr11", "lr12", "lr13", "lr14", "lr15", \ */ -/* OBSOLETE "tr0", "tr1", "tr2", "tr3", "tr4", "tr5", "tr6", "tr7", \ */ -/* OBSOLETE "tr8", "tr9", "tr10", "tr11", "tr12", "tr13", "tr14", "tr15", \ */ -/* OBSOLETE "psw", "ksp", "csp"} */ -/* OBSOLETE */ -/* OBSOLETE /* Register numbers of various important registers. */ -/* OBSOLETE Note that some of these values are "real" register numbers, */ -/* OBSOLETE and correspond to the general registers of the machine, */ -/* OBSOLETE and some are "phony" register numbers which are too large */ -/* OBSOLETE to be actual register numbers as far as the user is concerned */ -/* OBSOLETE but do serve to get the desired values when passed to read_register. *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* pseudo-registers: *x/ */ -/* OBSOLETE #define PS_REGNUM 64 /* Contains processor status *x/ */ -/* OBSOLETE #define PSW_REGNUM 64 /* Contains current psw, whatever it is.*x/ */ -/* OBSOLETE #define CSP_REGNUM 65 /* address of this control stack frame*x/ */ -/* OBSOLETE #define KSP_REGNUM 66 /* Contains process's Kernel Stack Pointer *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define CFP_REGNUM 13 /* Current data-stack frame ptr *x/ */ -/* OBSOLETE #define TR0_REGNUM 48 /* After function call, contains */ -/* OBSOLETE function result *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* Registers interesting to the machine-independent part of gdb*x/ */ -/* OBSOLETE */ -/* OBSOLETE #define FP_REGNUM CSP_REGNUM /* Contains address of executing (control) */ -/* OBSOLETE stack frame *x/ */ -/* OBSOLETE #define SP_REGNUM 14 /* Contains address of top of stack -??*x/ */ -/* OBSOLETE #define PC_REGNUM 15 /* Contains program counter *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* Define DO_REGISTERS_INFO() to do machine-specific formatting */ -/* OBSOLETE of register dumps. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define DO_REGISTERS_INFO(_regnum, fp) pyr_do_registers_info(_regnum, fp) */ -/* OBSOLETE */ -/* OBSOLETE /* need this so we can find the global registers: they never get saved. *x/ */ -/* OBSOLETE extern unsigned int global_reg_offset; */ -/* OBSOLETE extern unsigned int last_frame_offset; */ -/* OBSOLETE */ -/* OBSOLETE /* Total amount of space needed to store our copies of the machine's */ -/* OBSOLETE register state, the array `registers'. *x/ */ -/* OBSOLETE #define REGISTER_BYTES (NUM_REGS*4) */ -/* OBSOLETE */ -/* OBSOLETE /* the Pyramid has register windows. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define HAVE_REGISTER_WINDOWS */ -/* OBSOLETE */ -/* OBSOLETE /* Is this register part of the register window system? A yes answer */ -/* OBSOLETE implies that 1) The name of this register will not be the same in */ -/* OBSOLETE other frames, and 2) This register is automatically "saved" (out */ -/* OBSOLETE registers shifting into ins counts) upon subroutine calls and thus */ -/* OBSOLETE there is no need to search more than one stack frame for it. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define REGISTER_IN_WINDOW_P(regnum) \ */ -/* OBSOLETE ((regnum) >= 16 && (regnum) < 64) */ -/* OBSOLETE */ -/* OBSOLETE /* Index within `registers' of the first byte of the space for */ -/* OBSOLETE register N. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define REGISTER_BYTE(N) ((N) * 4) */ -/* OBSOLETE */ -/* OBSOLETE /* Number of bytes of storage in the actual machine representation */ -/* OBSOLETE for register N. On the Pyramid, all regs are 4 bytes. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define REGISTER_RAW_SIZE(N) 4 */ -/* OBSOLETE */ -/* OBSOLETE /* Number of bytes of storage in the program's representation */ -/* OBSOLETE for register N. On the Pyramid, all regs are 4 bytes. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define REGISTER_VIRTUAL_SIZE(N) 4 */ -/* OBSOLETE */ -/* OBSOLETE /* Largest value REGISTER_RAW_SIZE can have. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define MAX_REGISTER_RAW_SIZE 4 */ -/* OBSOLETE */ -/* OBSOLETE /* Largest value REGISTER_VIRTUAL_SIZE can have. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE 4 */ -/* OBSOLETE */ -/* OBSOLETE /* Return the GDB type object for the "standard" data type */ -/* OBSOLETE of data in register N. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) builtin_type_int */ -/* OBSOLETE */ -/* OBSOLETE /* FIXME: It seems impossible for both EXTRACT_RETURN_VALUE and */ -/* OBSOLETE STORE_RETURN_VALUE to be correct. *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* Store the address of the place in which to copy the structure the */ -/* OBSOLETE subroutine will return. This is called from call_function. *x/ */ -/* OBSOLETE */ -/* OBSOLETE /****FIXME****x/ */ -/* OBSOLETE #define STORE_STRUCT_RETURN(ADDR, SP) \ */ -/* OBSOLETE { write_register (TR0_REGNUM, (ADDR)); } */ -/* OBSOLETE */ -/* OBSOLETE /* Extract from an array REGBUF containing the (raw) register state */ -/* OBSOLETE a function return value of type TYPE, and copy that, in virtual format, */ -/* OBSOLETE into VALBUF. *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* Note that on a register-windowing machine (eg, Pyr, SPARC), this is */ -/* OBSOLETE where the value is found after the function call -- ie, it should */ -/* OBSOLETE correspond to GNU CC's FUNCTION_VALUE rather than FUNCTION_OUTGOING_VALUE.*x/ */ -/* OBSOLETE */ -/* OBSOLETE #define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ */ -/* OBSOLETE memcpy (VALBUF, ((int *)(REGBUF))+TR0_REGNUM, TYPE_LENGTH (TYPE)) */ -/* OBSOLETE */ -/* OBSOLETE /* Write into appropriate registers a function return value */ -/* OBSOLETE of type TYPE, given in virtual format. *x/ */ -/* OBSOLETE /* on pyrs, values are returned in *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define STORE_RETURN_VALUE(TYPE,VALBUF) \ */ -/* OBSOLETE write_register_bytes (REGISTER_BYTE(TR0_REGNUM), VALBUF, TYPE_LENGTH (TYPE)) */ -/* OBSOLETE */ -/* OBSOLETE /* Extract from an array REGBUF containing the (raw) register state */ -/* OBSOLETE the address in which a function should return its structure value, */ -/* OBSOLETE as a CORE_ADDR (or an expression that can be used as one). *x/ */ -/* OBSOLETE /* FIXME *x/ */ -/* OBSOLETE #define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \ */ -/* OBSOLETE ( ((int *)(REGBUF)) [TR0_REGNUM]) */ -/* OBSOLETE */ -/* OBSOLETE */ -/* OBSOLETE /* Describe the pointer in each stack frame to the previous stack frame */ -/* OBSOLETE (its caller). *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define EXTRA_FRAME_INFO \ */ -/* OBSOLETE CORE_ADDR bottom; \ */ -/* OBSOLETE CORE_ADDR frame_cfp; \ */ -/* OBSOLETE CORE_ADDR frame_window_addr; */ -/* OBSOLETE */ -/* OBSOLETE /* The bottom field is misnamed, since it might imply that memory from */ -/* OBSOLETE bottom to frame contains this frame. That need not be true if */ -/* OBSOLETE stack frames are allocated in different segments (e.g. some on a */ -/* OBSOLETE stack, some on a heap in the data segment). *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define INIT_EXTRA_FRAME_INFO(fromleaf, fci) \ */ -/* OBSOLETE do { \ */ -/* OBSOLETE (fci)->frame_window_addr = (fci)->frame; \ */ -/* OBSOLETE (fci)->bottom = \ */ -/* OBSOLETE ((fci)->next ? \ */ -/* OBSOLETE ((fci)->frame == (fci)->next->frame ? \ */ -/* OBSOLETE (fci)->next->bottom : (fci)->next->frame) : \ */ -/* OBSOLETE read_register (SP_REGNUM)); \ */ -/* OBSOLETE (fci)->frame_cfp = \ */ -/* OBSOLETE read_register (CFP_REGNUM); \ */ -/* OBSOLETE /***fprintf (stderr, \ */ -/* OBSOLETE "[[creating new frame for %0x,pc=%0x,csp=%0x]]\n", \ */ -/* OBSOLETE (fci)->frame, (fci)->pc,(fci)->frame_cfp);*x/ \ */ -/* OBSOLETE } while (0); */ -/* OBSOLETE */ -/* OBSOLETE /* FRAME_CHAIN takes a frame's nominal address */ -/* OBSOLETE and produces the frame's chain-pointer. *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* In the case of the pyr, the frame's nominal address is the address */ -/* OBSOLETE of parameter register 0. The previous frame is found 32 words up. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define FRAME_CHAIN(thisframe) \ */ -/* OBSOLETE ( (thisframe) -> frame - CONTROL_STACK_FRAME_SIZE) */ -/* OBSOLETE */ -/* OBSOLETE /*((thisframe) >= CONTROL_STACK_ADDR))*x/ */ -/* OBSOLETE */ -/* OBSOLETE /* Define other aspects of the stack frame. *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* A macro that tells us whether the function invocation represented */ -/* OBSOLETE by FI does not have a frame on the stack associated with it. If it */ -/* OBSOLETE does not, FRAMELESS is set to 1, else 0. */ -/* OBSOLETE */ -/* OBSOLETE I do not understand what this means on a Pyramid, where functions */ -/* OBSOLETE *always* have a control-stack frame, but may or may not have a */ -/* OBSOLETE frame on the data stack. Since GBD uses the value of the */ -/* OBSOLETE control stack pointer as its "address" of a frame, FRAMELESS */ -/* OBSOLETE is always 1, so does not need to be defined. *x/ */ -/* OBSOLETE */ -/* OBSOLETE */ -/* OBSOLETE /* Where is the PC for a specific frame *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define FRAME_SAVED_PC(fi) \ */ -/* OBSOLETE ((CORE_ADDR) (read_memory_integer ( (fi) -> frame + 60, 4))) */ -/* OBSOLETE */ -/* OBSOLETE /* There may be bugs in FRAME_ARGS_ADDRESS and FRAME_LOCALS_ADDRESS; */ -/* OBSOLETE or there may be bugs in accessing the registers that break */ -/* OBSOLETE their definitions. */ -/* OBSOLETE Having the macros expand into functions makes them easier to debug. */ -/* OBSOLETE When the bug is finally located, the inline macro defintions can */ -/* OBSOLETE be un-#if 0ed, and frame_args_addr and frame_locals_address can */ -/* OBSOLETE be deleted from pyr-dep.c *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* If the argument is on the stack, it will be here. *x/ */ -/* OBSOLETE #define FRAME_ARGS_ADDRESS(fi) \ */ -/* OBSOLETE frame_args_addr(fi) */ -/* OBSOLETE */ -/* OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) \ */ -/* OBSOLETE frame_locals_address(fi) */ -/* OBSOLETE */ -/* OBSOLETE /* The following definitions doesn't seem to work. */ -/* OBSOLETE I don't understand why. *x/ */ -/* OBSOLETE #if 0 */ -/* OBSOLETE #define FRAME_ARGS_ADDRESS(fi) \ */ -/* OBSOLETE /*(FRAME_FP(fi) + (13*4))*x/ (read_register (CFP_REGNUM)) */ -/* OBSOLETE */ -/* OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) \ */ -/* OBSOLETE ((fi)->frame +(16*4)) */ -/* OBSOLETE */ -/* OBSOLETE #endif /* 0 *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* Return number of args passed to a frame. */ -/* OBSOLETE Can return -1, meaning no way to tell. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define FRAME_NUM_ARGS(fi) (-1) */ -/* OBSOLETE */ -/* OBSOLETE /* Return number of bytes at start of arglist that are not really args. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define FRAME_ARGS_SKIP 0 */ -/* OBSOLETE */ -/* OBSOLETE /* Put here the code to store, into a struct frame_saved_regs, */ -/* OBSOLETE the addresses of the saved registers of frame described by FRAME_INFO. */ -/* OBSOLETE This includes special registers such as pc and fp saved in special */ -/* OBSOLETE ways in the stack frame. sp is even more special: */ -/* OBSOLETE the address we return for it IS the sp for the next frame. */ -/* OBSOLETE */ -/* OBSOLETE Note that on register window machines, we are currently making the */ -/* OBSOLETE assumption that window registers are being saved somewhere in the */ -/* OBSOLETE frame in which they are being used. If they are stored in an */ -/* OBSOLETE inferior frame, find_saved_register will break. */ -/* OBSOLETE */ -/* OBSOLETE On pyrs, frames of window registers are stored contiguously on a */ -/* OBSOLETE separate stack. All window registers are always stored. */ -/* OBSOLETE The pc and psw (gr15 and gr14) are also always saved: the call */ -/* OBSOLETE insn saves them in pr15 and pr14 of the new frame (tr15,tr14 of the */ -/* OBSOLETE old frame). */ -/* OBSOLETE The data-stack frame pointer (CFP) is only saved in functions which */ -/* OBSOLETE allocate a (data)stack frame (with "adsf"). We detect them by */ -/* OBSOLETE looking at the first insn of the procedure. */ -/* OBSOLETE */ -/* OBSOLETE Other non-window registers (gr0-gr11) are never saved. Pyramid's C */ -/* OBSOLETE compiler and gcc currently ignore them, so it's not an issue. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define FRAME_FIND_SAVED_REGS(fi_p, frame_saved_regs) \ */ -/* OBSOLETE { register int regnum; \ */ -/* OBSOLETE register CORE_ADDR pc; \ */ -/* OBSOLETE register CORE_ADDR fn_start_pc; \ */ -/* OBSOLETE register int first_insn; \ */ -/* OBSOLETE register CORE_ADDR prev_cf_addr; \ */ -/* OBSOLETE register int window_ptr; \ */ -/* OBSOLETE if (!fi_p) fatal ("Bad frame info struct in FRAME_FIND_SAVED_REGS"); \ */ -/* OBSOLETE memset (&(frame_saved_regs), '\0', sizeof (frame_saved_regs)); \ */ -/* OBSOLETE \ */ -/* OBSOLETE window_ptr = prev_cf_addr = FRAME_FP(fi_p); \ */ -/* OBSOLETE \ */ -/* OBSOLETE for (regnum = 16 ; regnum < 64; regnum++,window_ptr+=4) \ */ -/* OBSOLETE { \ */ -/* OBSOLETE (frame_saved_regs).regs[regnum] = window_ptr; \ */ -/* OBSOLETE } \ */ -/* OBSOLETE \ */ -/* OBSOLETE /* In each window, psw, and pc are "saved" in tr14,tr15. *x/ \ */ -/* OBSOLETE /*** psw is sometimes saved in gr12 (so sez <sys/pcb.h>) *x/ \ */ -/* OBSOLETE (frame_saved_regs).regs[PS_REGNUM] = FRAME_FP(fi_p) + (14*4); \ */ -/* OBSOLETE \ */ -/* OBSOLETE /*(frame_saved_regs).regs[PC_REGNUM] = (frame_saved_regs).regs[31];*x/ \ */ -/* OBSOLETE (frame_saved_regs).regs[PC_REGNUM] = FRAME_FP(fi_p) + ((15+32)*4); \ */ -/* OBSOLETE \ */ -/* OBSOLETE /* Functions that allocate a frame save sp *where*? *x/ \ */ -/* OBSOLETE /*first_insn = read_memory_integer (get_pc_function_start ((fi_p)->pc),4); *x/ \ */ -/* OBSOLETE \ */ -/* OBSOLETE fn_start_pc = (get_pc_function_start ((fi_p)->pc)); \ */ -/* OBSOLETE first_insn = read_memory_integer(fn_start_pc, 4); \ */ -/* OBSOLETE \ */ -/* OBSOLETE if (0x08 == ((first_insn >> 20) &0x0ff)) { \ */ -/* OBSOLETE /* NB: because WINDOW_REGISTER_P(cfp) is false, a saved cfp \ */ -/* OBSOLETE in this frame is only visible in this frame's callers. \ */ -/* OBSOLETE That means the cfp we mark saved is my caller's cfp, ie pr13. \ */ -/* OBSOLETE I don't understand why we don't have to do that for pc, too. *x/ \ */ -/* OBSOLETE \ */ -/* OBSOLETE (frame_saved_regs).regs[CFP_REGNUM] = FRAME_FP(fi_p)+(13*4); \ */ -/* OBSOLETE \ */ -/* OBSOLETE (frame_saved_regs).regs[SP_REGNUM] = \ */ -/* OBSOLETE read_memory_integer (FRAME_FP(fi_p)+((13+32)*4),4); \ */ -/* OBSOLETE } \ */ -/* OBSOLETE \ */ -/* OBSOLETE /* \ */ -/* OBSOLETE *(frame_saved_regs).regs[CFP_REGNUM] = (frame_saved_regs).regs[61]; \ */ -/* OBSOLETE * (frame_saved_regs).regs[SP_REGNUM] = \ */ -/* OBSOLETE * read_memory_integer (FRAME_FP(fi_p)+((13+32)*4),4); \ */ -/* OBSOLETE *x/ \ */ -/* OBSOLETE \ */ -/* OBSOLETE (frame_saved_regs).regs[CSP_REGNUM] = prev_cf_addr; \ */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Things needed for making the inferior call functions. *x/ */ -/* OBSOLETE #if 0 */ -/* OBSOLETE /* These are all lies. These macro definitions are appropriate for a */ -/* OBSOLETE SPARC. On a pyramid, pushing a dummy frame will */ -/* OBSOLETE surely involve writing the control stack pointer, */ -/* OBSOLETE then saving the pc. This requires a privileged instruction. */ -/* OBSOLETE Maybe one day Pyramid can be persuaded to add a syscall to do this. */ -/* OBSOLETE Until then, we are out of luck. *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* Push an empty stack frame, to record the current PC, etc. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define PUSH_DUMMY_FRAME \ */ -/* OBSOLETE { register CORE_ADDR sp = read_register (SP_REGNUM);\ */ -/* OBSOLETE register int regnum; \ */ -/* OBSOLETE sp = push_word (sp, 0); /* arglist *x/ \ */ -/* OBSOLETE for (regnum = 11; regnum >= 0; regnum--) \ */ -/* OBSOLETE sp = push_word (sp, read_register (regnum)); \ */ -/* OBSOLETE sp = push_word (sp, read_register (PC_REGNUM)); \ */ -/* OBSOLETE sp = push_word (sp, read_register (FP_REGNUM)); \ */ -/* OBSOLETE /* sp = push_word (sp, read_register (AP_REGNUM));*x/ \ */ -/* OBSOLETE sp = push_word (sp, (read_register (PS_REGNUM) & 0xffef) \ */ -/* OBSOLETE + 0x2fff0000); \ */ -/* OBSOLETE sp = push_word (sp, 0); \ */ -/* OBSOLETE write_register (SP_REGNUM, sp); \ */ -/* OBSOLETE write_register (FP_REGNUM, sp); \ */ -/* OBSOLETE /* write_register (AP_REGNUM, sp + 17 * sizeof (int));*x/ } */ -/* OBSOLETE */ -/* OBSOLETE /* Discard from the stack the innermost frame, restoring all registers. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define POP_FRAME \ */ -/* OBSOLETE { register CORE_ADDR fp = read_register (FP_REGNUM); \ */ -/* OBSOLETE register int regnum; \ */ -/* OBSOLETE register int regmask = read_memory_integer (fp + 4, 4); \ */ -/* OBSOLETE write_register (PS_REGNUM, \ */ -/* OBSOLETE (regmask & 0xffff) \ */ -/* OBSOLETE | (read_register (PS_REGNUM) & 0xffff0000)); \ */ -/* OBSOLETE write_register (PC_REGNUM, read_memory_integer (fp + 16, 4)); \ */ -/* OBSOLETE write_register (FP_REGNUM, read_memory_integer (fp + 12, 4)); \ */ -/* OBSOLETE /* write_register (AP_REGNUM, read_memory_integer (fp + 8, 4));*x/ \ */ -/* OBSOLETE fp += 16; \ */ -/* OBSOLETE for (regnum = 0; regnum < 12; regnum++) \ */ -/* OBSOLETE if (regmask & (0x10000 << regnum)) \ */ -/* OBSOLETE write_register (regnum, read_memory_integer (fp += 4, 4)); \ */ -/* OBSOLETE fp = fp + 4 + ((regmask >> 30) & 3); \ */ -/* OBSOLETE if (regmask & 0x20000000) \ */ -/* OBSOLETE { regnum = read_memory_integer (fp, 4); \ */ -/* OBSOLETE fp += (regnum + 1) * 4; } \ */ -/* OBSOLETE write_register (SP_REGNUM, fp); \ */ -/* OBSOLETE set_current_frame (read_register (FP_REGNUM)); } */ -/* OBSOLETE */ -/* OBSOLETE /* This sequence of words is the instructions */ -/* OBSOLETE calls #69, @#32323232 */ -/* OBSOLETE bpt */ -/* OBSOLETE Note this is 8 bytes. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define CALL_DUMMY {0x329f69fb, 0x03323232} */ -/* OBSOLETE */ -/* OBSOLETE #define CALL_DUMMY_START_OFFSET 0 /* Start execution at beginning of dummy *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* Insert the specified number of args and function address */ -/* OBSOLETE into a call sequence of the above form stored at DUMMYNAME. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \ */ -/* OBSOLETE { *((char *) dummyname + 1) = nargs; \ */ -/* OBSOLETE *(int *)((char *) dummyname + 3) = fun; } */ -/* OBSOLETE #endif /* 0 *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define POP_FRAME \ */ -/* OBSOLETE { error ("The return command is not supported on this machine."); } */ diff --git a/gdb/config/pyr/xm-pyr.h b/gdb/config/pyr/xm-pyr.h deleted file mode 100644 index 9fb56b8..0000000 --- a/gdb/config/pyr/xm-pyr.h +++ /dev/null @@ -1,92 +0,0 @@ -/* OBSOLETE /* Definitions to make GDB run on a Pyramidax under OSx 4.0 (4.2bsd). */ -/* OBSOLETE Copyright 1988, 1989, 1992 Free Software Foundation, Inc. */ -/* OBSOLETE */ -/* OBSOLETE This file is part of GDB. */ -/* OBSOLETE */ -/* OBSOLETE This program is free software; you can redistribute it and/or modify */ -/* OBSOLETE it under the terms of the GNU General Public License as published by */ -/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */ -/* OBSOLETE (at your option) any later version. */ -/* OBSOLETE */ -/* OBSOLETE This program is distributed in the hope that it will be useful, */ -/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */ -/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ -/* OBSOLETE GNU General Public License for more details. */ -/* OBSOLETE */ -/* OBSOLETE You should have received a copy of the GNU General Public License */ -/* OBSOLETE along with this program; if not, write to the Free Software */ -/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define HOST_BYTE_ORDER BIG_ENDIAN */ -/* OBSOLETE */ -/* OBSOLETE /* Define PYRAMID_CONTROL_FRAME_DEBUGGING to get copious messages */ -/* OBSOLETE about reading the control stack on standard output. This */ -/* OBSOLETE makes gdb unusable as a debugger. *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* #define PYRAMID_CONTROL_FRAME_DEBUGGING *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* Define PYRAMID_FRAME_DEBUGGING for ? *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* use Pyramid's slightly strange ptrace *x/ */ -/* OBSOLETE #define PYRAMID_PTRACE */ -/* OBSOLETE */ -/* OBSOLETE /* Traditional Unix virtual address spaces have thre regions: text, */ -/* OBSOLETE data and stack. The text, initialised data, and uninitialised data */ -/* OBSOLETE are represented in separate segments of the a.out file. */ -/* OBSOLETE When a process dumps core, the data and stack regions are written */ -/* OBSOLETE to a core file. This gives a debugger enough information to */ -/* OBSOLETE reconstruct (and debug) the virtual address space at the time of */ -/* OBSOLETE the coredump. */ -/* OBSOLETE Pyramids have an distinct fourth region of the virtual address */ -/* OBSOLETE space, in which the contents of the windowed registers are stacked */ -/* OBSOLETE in fixed-size frames. Pyramid refer to this region as the control */ -/* OBSOLETE stack. Each call (or trap) automatically allocates a new register */ -/* OBSOLETE frame; each return deallocates the current frame and restores the */ -/* OBSOLETE windowed registers to their values before the call. */ -/* OBSOLETE */ -/* OBSOLETE When dumping core, the control stack is written to a core files as */ -/* OBSOLETE a third segment. The core-handling functions need to know to deal */ -/* OBSOLETE with it. *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* Tell dep.c what the extra segment is. *x/ */ -/* OBSOLETE #define PYRAMID_CORE */ -/* OBSOLETE */ -/* OBSOLETE #define NO_SIGINTERRUPT */ -/* OBSOLETE */ -/* OBSOLETE #define HAVE_WAIT_STRUCT */ -/* OBSOLETE */ -/* OBSOLETE /* This is the amount to subtract from u.u_ar0 */ -/* OBSOLETE to get the offset in the core file of the register values. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define KERNEL_U_ADDR (0x80000000 - (UPAGES * NBPG)) */ -/* OBSOLETE */ -/* OBSOLETE /* Define offsets of registers in the core file (or maybe u area) *x/ */ -/* OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \ */ -/* OBSOLETE { struct user __u; \ */ -/* OBSOLETE addr = blockend + (regno - 16 ) * 4; \ */ -/* OBSOLETE if (regno == 67) { \ */ -/* OBSOLETE printf("\\geting reg 67\\"); \ */ -/* OBSOLETE addr = (int)(&__u.u_pcb.pcb_csp) - (int) &__u; \ */ -/* OBSOLETE } else if (regno == KSP_REGNUM) { \ */ -/* OBSOLETE printf("\\geting KSP (reg %d)\\", KSP_REGNUM); \ */ -/* OBSOLETE addr = (int)(&__u.u_pcb.pcb_ksp) - (int) &__u; \ */ -/* OBSOLETE } else if (regno == CSP_REGNUM) { \ */ -/* OBSOLETE printf("\\geting CSP (reg %d\\",CSP_REGNUM); \ */ -/* OBSOLETE addr = (int)(&__u.u_pcb.pcb_csp) - (int) &__u; \ */ -/* OBSOLETE } else if (regno == 64) { \ */ -/* OBSOLETE printf("\\geting reg 64\\"); \ */ -/* OBSOLETE addr = (int)(&__u.u_pcb.pcb_csp) - (int) &__u; \ */ -/* OBSOLETE } else if (regno == PS_REGNUM) \ */ -/* OBSOLETE addr = blockend - 4; \ */ -/* OBSOLETE else if (1 && ((16 > regno) && (regno > 11))) \ */ -/* OBSOLETE addr = last_frame_offset + (4 *(regno+32)); \ */ -/* OBSOLETE else if (0 && (12 > regno)) \ */ -/* OBSOLETE addr = global_reg_offset + (4 *regno); \ */ -/* OBSOLETE else if (16 > regno) \ */ -/* OBSOLETE addr = global_reg_offset + (4 *regno); \ */ -/* OBSOLETE else \ */ -/* OBSOLETE addr = blockend + (regno - 16 ) * 4; \ */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Override copies of {fetch,store}_inferior_registers in infptrace.c. *x/ */ -/* OBSOLETE #define FETCH_INFERIOR_REGISTERS */ diff --git a/gdb/config/tahoe/tahoe.mh b/gdb/config/tahoe/tahoe.mh deleted file mode 100644 index 0b20f33..0000000 --- a/gdb/config/tahoe/tahoe.mh +++ /dev/null @@ -1,4 +0,0 @@ -# OBSOLETE # Host: CCI or Harris Tahoe running BSD Unix -# OBSOLETE -# OBSOLETE XM_FILE= xm-tahoe.h -# OBSOLETE XDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o diff --git a/gdb/config/tahoe/tahoe.mt b/gdb/config/tahoe/tahoe.mt deleted file mode 100644 index a5f6185..0000000 --- a/gdb/config/tahoe/tahoe.mt +++ /dev/null @@ -1,3 +0,0 @@ -# OBSOLETE # Target: CCI or Harris Tahoe running BSD Unix -# OBSOLETE TDEPFILES= tahoe-tdep.o -# OBSOLETE TM_FILE= tm-tahoe.h diff --git a/gdb/config/tahoe/tm-tahoe.h b/gdb/config/tahoe/tm-tahoe.h deleted file mode 100644 index b68e278..0000000 --- a/gdb/config/tahoe/tm-tahoe.h +++ /dev/null @@ -1,271 +0,0 @@ -/* OBSOLETE /* Definitions to make GDB target for a tahoe running 4.3-Reno. */ -/* OBSOLETE Copyright 1986, 1987, 1989, 1991, 1992, 1993 Free Software Foundation, Inc. */ -/* OBSOLETE */ -/* OBSOLETE This file is part of GDB. */ -/* OBSOLETE */ -/* OBSOLETE This program is free software; you can redistribute it and/or modify */ -/* OBSOLETE it under the terms of the GNU General Public License as published by */ -/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */ -/* OBSOLETE (at your option) any later version. */ -/* OBSOLETE */ -/* OBSOLETE This program is distributed in the hope that it will be useful, */ -/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */ -/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ -/* OBSOLETE GNU General Public License for more details. */ -/* OBSOLETE */ -/* OBSOLETE You should have received a copy of the GNU General Public License */ -/* OBSOLETE along with this program; if not, write to the Free Software */ -/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */ -/* OBSOLETE Boston, MA 02111-1307, USA. *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* */ -/* OBSOLETE * Ported by the State University of New York at Buffalo by the Distributed */ -/* OBSOLETE * Computer Systems Lab, Department of Computer Science, 1991. */ -/* OBSOLETE *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define TARGET_BYTE_ORDER BIG_ENDIAN */ -/* OBSOLETE #define BITS_BIG_ENDIAN 0 */ -/* OBSOLETE */ -/* OBSOLETE /* Offset from address of function to start of its code. */ -/* OBSOLETE Zero on most machines. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define FUNCTION_START_OFFSET 2 */ -/* OBSOLETE */ -/* OBSOLETE /* Advance PC across any function entry prologue instructions */ -/* OBSOLETE to reach some "real" code. *x/ */ -/* OBSOLETE */ -/* OBSOLETE extern CORE_ADDR tahoe_skip_prologue (CORE_ADDR); */ -/* OBSOLETE #define SKIP_PROLOGUE(pc) (tahoe_skip_prologue (pc)) */ -/* OBSOLETE */ -/* OBSOLETE /* Immediately after a function call, return the saved pc. */ -/* OBSOLETE Can't always go through the frames for this because on some machines */ -/* OBSOLETE the new frame is not set up until the new function executes */ -/* OBSOLETE some instructions. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define SAVED_PC_AFTER_CALL(frame) FRAME_SAVED_PC(frame) */ -/* OBSOLETE */ -/* OBSOLETE /* Wrong for cross-debugging. I don't know the real values. *x/ */ -/* OBSOLETE #include <machine/param.h> */ -/* OBSOLETE #define TARGET_UPAGES UPAGES */ -/* OBSOLETE #define TARGET_NBPG NBPG */ -/* OBSOLETE */ -/* OBSOLETE /* Address of end of stack space. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define STACK_END_ADDR (0xc0000000 - (TARGET_UPAGES * TARGET_NBPG)) */ -/* OBSOLETE */ -/* OBSOLETE /* On BSD, sigtramp is in the u area. Can't check the exact */ -/* OBSOLETE addresses because for cross-debugging we don't have target include */ -/* OBSOLETE files around. This should be close enough. *x/ */ -/* OBSOLETE #define IN_SIGTRAMP(pc, name) ((pc) >= STACK_END_ADDR && (pc < 0xc0000000)) */ -/* OBSOLETE */ -/* OBSOLETE /* Stack grows downward. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) < (rhs)) */ -/* OBSOLETE */ -/* OBSOLETE /* Sequence of bytes for breakpoint instruction. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define BREAKPOINT {0x30} */ -/* OBSOLETE */ -/* OBSOLETE /* Amount PC must be decremented by after a breakpoint. */ -/* OBSOLETE This is often the number of bytes in BREAKPOINT */ -/* OBSOLETE but not always. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define DECR_PC_AFTER_BREAK 0 */ -/* OBSOLETE */ -/* OBSOLETE /* Return 1 if P points to an invalid floating point value. */ -/* OBSOLETE LEN is the length in bytes -- not relevant on the Tahoe. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define INVALID_FLOAT(p, len) ((*(short *) p & 0xff80) == 0x8000) */ -/* OBSOLETE */ -/* OBSOLETE /* Say how long (ordinary) registers are. This is a piece of bogosity */ -/* OBSOLETE used in push_word and a few other places; REGISTER_RAW_SIZE is the */ -/* OBSOLETE real way to know how big a register is. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define REGISTER_SIZE 4 */ -/* OBSOLETE */ -/* OBSOLETE /* Number of machine registers *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define NUM_REGS 19 */ -/* OBSOLETE */ -/* OBSOLETE /* Initializer for an array of names of registers. */ -/* OBSOLETE There should be NUM_REGS strings in this initializer. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define REGISTER_NAMES {"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "fp", "sp", "pc", "ps", "al", "ah"} */ -/* OBSOLETE */ -/* OBSOLETE #define FP_REGNUM 13 /* Contains address of executing stack frame *x/ */ -/* OBSOLETE #define SP_REGNUM 14 /* Contains address of top of stack *x/ */ -/* OBSOLETE #define PC_REGNUM 15 /* Contains program counter *x/ */ -/* OBSOLETE #define PS_REGNUM 16 /* Contains processor status *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define AL_REGNUM 17 /* Contains accumulator *x/ */ -/* OBSOLETE #define AH_REGNUM 18 */ -/* OBSOLETE */ -/* OBSOLETE /* Total amount of space needed to store our copies of the machine's */ -/* OBSOLETE register state, the array `registers'. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define REGISTER_BYTES (19*4) */ -/* OBSOLETE */ -/* OBSOLETE /* Index within `registers' of the first byte of the space for */ -/* OBSOLETE register N. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define REGISTER_BYTE(N) ((N) * 4) */ -/* OBSOLETE */ -/* OBSOLETE /* Number of bytes of storage in the actual machine representation */ -/* OBSOLETE for register N. On the tahoe, all regs are 4 bytes. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define REGISTER_RAW_SIZE(N) 4 */ -/* OBSOLETE */ -/* OBSOLETE /* Number of bytes of storage in the program's representation */ -/* OBSOLETE for register N. On the tahoe, all regs are 4 bytes. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define REGISTER_VIRTUAL_SIZE(N) 4 */ -/* OBSOLETE */ -/* OBSOLETE /* Largest value REGISTER_RAW_SIZE can have. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define MAX_REGISTER_RAW_SIZE 4 */ -/* OBSOLETE */ -/* OBSOLETE /* Largest value REGISTER_VIRTUAL_SIZE can have. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE 4 */ -/* OBSOLETE */ -/* OBSOLETE /* Return the GDB type object for the "standard" data type */ -/* OBSOLETE of data in register N. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) builtin_type_int */ -/* OBSOLETE */ -/* OBSOLETE /* Store the address of the place in which to copy the structure the */ -/* OBSOLETE subroutine will return. This is called from call_function. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define STORE_STRUCT_RETURN(ADDR, SP) \ */ -/* OBSOLETE { write_register (1, (ADDR)); } */ -/* OBSOLETE */ -/* OBSOLETE /* Extract from an array REGBUF containing the (raw) register state */ -/* OBSOLETE a function return value of type TYPE, and copy that, in virtual format, */ -/* OBSOLETE into VALBUF. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ */ -/* OBSOLETE memcpy (VALBUF, REGBUF, TYPE_LENGTH (TYPE)) */ -/* OBSOLETE */ -/* OBSOLETE /* Write into appropriate registers a function return value */ -/* OBSOLETE of type TYPE, given in virtual format. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define STORE_RETURN_VALUE(TYPE,VALBUF) \ */ -/* OBSOLETE write_register_bytes (0, VALBUF, TYPE_LENGTH (TYPE)) */ -/* OBSOLETE */ -/* OBSOLETE /* Extract from an array REGBUF containing the (raw) register state */ -/* OBSOLETE the address in which a function should return its structure value, */ -/* OBSOLETE as a CORE_ADDR (or an expression that can be used as one). *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(int *)(REGBUF)) */ -/* OBSOLETE */ -/* OBSOLETE /* Describe the pointer in each stack frame to the previous stack frame */ -/* OBSOLETE (its caller). */ -/* OBSOLETE */ -/* OBSOLETE FRAME_CHAIN takes a frame's nominal address */ -/* OBSOLETE and produces the frame's chain-pointer. *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* In the case of the Tahoe, the frame's nominal address is the FP value, */ -/* OBSOLETE and it points to the old FP *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define FRAME_CHAIN(thisframe) \ */ -/* OBSOLETE (!inside_entry_file ((thisframe)->pc) ? \ */ -/* OBSOLETE read_memory_integer ((thisframe)->frame, 4) :\ */ -/* OBSOLETE 0) */ -/* OBSOLETE */ -/* OBSOLETE /* Define other aspects of the stack frame. *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* Saved PC *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define FRAME_SAVED_PC(FRAME) (read_memory_integer ((FRAME)->frame - 8, 4)) */ -/* OBSOLETE */ -/* OBSOLETE /* In most of GDB, getting the args address is too important to */ -/* OBSOLETE just say "I don't know". *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define FRAME_ARGS_ADDRESS(fi) ((fi)->frame) */ -/* OBSOLETE */ -/* OBSOLETE /* Address to use as an anchor for finding local variables *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame) */ -/* OBSOLETE */ -/* OBSOLETE /* Return number of args passed to a frame. */ -/* OBSOLETE Can return -1, meaning no way to tell. *x/ */ -/* OBSOLETE */ -/* OBSOLETE extern int tahoe_frame_num_args (struct frame_info * fi); */ -/* OBSOLETE #define FRAME_NUM_ARGS(fi) (tahoe_frame_num_args ((fi))) */ -/* OBSOLETE */ -/* OBSOLETE /* Return number of bytes at start of arglist that are not really args. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define FRAME_ARGS_SKIP 0 */ -/* OBSOLETE */ -/* OBSOLETE /* Put here the code to store, into a struct frame_saved_regs, */ -/* OBSOLETE the addresses of the saved registers of frame described by FRAME_INFO. */ -/* OBSOLETE This includes special registers such as pc and fp saved in special */ -/* OBSOLETE ways in the stack frame. sp is even more special: */ -/* OBSOLETE the address we return for it IS the sp for the next frame. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \ */ -/* OBSOLETE { register int regnum; \ */ -/* OBSOLETE register int rmask = read_memory_integer ((frame_info)->frame-4, 4) >> 16;\ */ -/* OBSOLETE register CORE_ADDR next_addr; \ */ -/* OBSOLETE memset (&frame_saved_regs, '\0', sizeof frame_saved_regs); \ */ -/* OBSOLETE next_addr = (frame_info)->frame - 8; \ */ -/* OBSOLETE for (regnum = 12; regnum >= 0; regnum--, rmask <<= 1) \ */ -/* OBSOLETE (frame_saved_regs).regs[regnum] = (rmask & 0x1000) ? (next_addr -= 4) : 0;\ */ -/* OBSOLETE (frame_saved_regs).regs[SP_REGNUM] = (frame_info)->frame + 4; \ */ -/* OBSOLETE (frame_saved_regs).regs[PC_REGNUM] = (frame_info)->frame - 8; \ */ -/* OBSOLETE (frame_saved_regs).regs[FP_REGNUM] = (frame_info)->frame; \ */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Things needed for making the inferior call functions. *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* Push an empty stack frame, to record the current PC, etc. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define PUSH_DUMMY_FRAME \ */ -/* OBSOLETE { register CORE_ADDR sp = read_register (SP_REGNUM); \ */ -/* OBSOLETE register int regnum; \ */ -/* OBSOLETE printf("PUSH_DUMMY_FRAME\n"); \ */ -/* OBSOLETE sp = push_word (sp, read_register (FP_REGNUM)); \ */ -/* OBSOLETE write_register (FP_REGNUM, sp); \ */ -/* OBSOLETE sp = push_word (sp, 0x1fff0004); /*SAVE MASK*x/ \ */ -/* OBSOLETE sp = push_word (sp, read_register (PC_REGNUM)); \ */ -/* OBSOLETE for (regnum = 12; regnum >= 0; regnum--) \ */ -/* OBSOLETE sp = push_word (sp, read_register (regnum)); \ */ -/* OBSOLETE write_register (SP_REGNUM, sp); \ */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Discard from the stack the innermost frame, restoring all registers. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define POP_FRAME \ */ -/* OBSOLETE { register CORE_ADDR fp = read_register (FP_REGNUM); \ */ -/* OBSOLETE register int regnum; \ */ -/* OBSOLETE register int regmask = read_memory_integer (fp-4, 4); \ */ -/* OBSOLETE printf("POP_FRAME\n"); \ */ -/* OBSOLETE regmask >>= 16; \ */ -/* OBSOLETE write_register (SP_REGNUM, fp+4); \ */ -/* OBSOLETE write_register (PC_REGNUM, read_memory_integer(fp-8, 4)); \ */ -/* OBSOLETE write_register (FP_REGNUM, read_memory_integer(fp, 4)); \ */ -/* OBSOLETE fp -= 8; \ */ -/* OBSOLETE for (regnum = 12; regnum >= 0; regnum--, regmask <<= 1) \ */ -/* OBSOLETE if (regmask & 0x1000) \ */ -/* OBSOLETE write_register (regnum, read_memory_integer (fp-=4, 4)); \ */ -/* OBSOLETE flush_cached_frames (); \ */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* This sequence of words is the instructions */ -/* OBSOLETE calls #69, @#32323232 */ -/* OBSOLETE bpt */ -/* OBSOLETE Note this is 8 bytes. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define CALL_DUMMY {0xbf699f32, 0x32323230} */ -/* OBSOLETE */ -/* OBSOLETE /* Start execution at beginning of dummy *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define CALL_DUMMY_START_OFFSET 0 */ -/* OBSOLETE */ -/* OBSOLETE /* Insert the specified number of args and function address */ -/* OBSOLETE into a call sequence of the above form stored at DUMMYNAME. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, valtype, using_gcc) \ */ -/* OBSOLETE { int temp = (int) fun; \ */ -/* OBSOLETE *((char *) dummyname + 1) = nargs; \ */ -/* OBSOLETE memcpy((char *)dummyname+3,&temp,4); } */ diff --git a/gdb/config/tahoe/xm-tahoe.h b/gdb/config/tahoe/xm-tahoe.h deleted file mode 100644 index f20dda0..0000000 --- a/gdb/config/tahoe/xm-tahoe.h +++ /dev/null @@ -1,137 +0,0 @@ -/* OBSOLETE /* Definitions to make GDB hosted on a tahoe running 4.3-Reno */ -/* OBSOLETE Copyright 1986, 1987, 1989, 1991, 1992 Free Software Foundation, Inc. */ -/* OBSOLETE Contributed by the State University of New York at Buffalo, by the */ -/* OBSOLETE Distributed Computer Systems Lab, Department of Computer Science, 1991. */ -/* OBSOLETE */ -/* OBSOLETE This file is part of GDB. */ -/* OBSOLETE */ -/* OBSOLETE This program is free software; you can redistribute it and/or modify */ -/* OBSOLETE it under the terms of the GNU General Public License as published by */ -/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */ -/* OBSOLETE (at your option) any later version. */ -/* OBSOLETE */ -/* OBSOLETE This program is distributed in the hope that it will be useful, */ -/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */ -/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ -/* OBSOLETE GNU General Public License for more details. */ -/* OBSOLETE */ -/* OBSOLETE You should have received a copy of the GNU General Public License */ -/* OBSOLETE along with this program; if not, write to the Free Software */ -/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */ -/* OBSOLETE Boston, MA 02111-1307, USA. *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* Make sure the system include files define BIG_ENDIAN, UINT_MAX, const, */ -/* OBSOLETE etc, rather than GDB's files. *x/ */ -/* OBSOLETE #include <stdio.h> */ -/* OBSOLETE #include <sys/param.h> */ -/* OBSOLETE */ -/* OBSOLETE /* Host is big-endian *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define HOST_BYTE_ORDER BIG_ENDIAN */ -/* OBSOLETE */ -/* OBSOLETE /* This is the amount to subtract from u.u_ar0 */ -/* OBSOLETE to get the offset in the core file of the register values. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define KERNEL_U_ADDR (0xc0000000 - (TARGET_UPAGES * TARGET_NBPG)) */ -/* OBSOLETE */ -/* OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \ */ -/* OBSOLETE { addr = blockend - 100 + regno * 4; \ */ -/* OBSOLETE if (regno == PC_REGNUM) addr = blockend - 8; \ */ -/* OBSOLETE if (regno == PS_REGNUM) addr = blockend - 4; \ */ -/* OBSOLETE if (regno == FP_REGNUM) addr = blockend - 40; \ */ -/* OBSOLETE if (regno == SP_REGNUM) addr = blockend - 36; \ */ -/* OBSOLETE if (regno == AL_REGNUM) addr = blockend - 20; \ */ -/* OBSOLETE if (regno == AH_REGNUM) addr = blockend - 24;} */ -/* OBSOLETE */ -/* OBSOLETE /* Interface definitions for kernel debugger KDB. *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* Map machine fault codes into signal numbers. */ -/* OBSOLETE First subtract 0, divide by 4, then index in a table. */ -/* OBSOLETE Faults for which the entry in this table is 0 */ -/* OBSOLETE are not handled by KDB; the program's own trap handler */ -/* OBSOLETE gets to handle then. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define FAULT_CODE_ORIGIN 0 */ -/* OBSOLETE #define FAULT_CODE_UNITS 4 */ -/* OBSOLETE #define FAULT_TABLE \ */ -/* OBSOLETE { 0, SIGKILL, SIGSEGV, 0, 0, 0, 0, 0, \ */ -/* OBSOLETE 0, 0, SIGTRAP, SIGTRAP, 0, 0, 0, 0, \ */ -/* OBSOLETE 0, 0, 0, 0, 0, 0, 0, 0} */ -/* OBSOLETE */ -/* OBSOLETE /* Start running with a stack stretching from BEG to END. */ -/* OBSOLETE BEG and END should be symbols meaningful to the assembler. */ -/* OBSOLETE This is used only for kdb. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define INIT_STACK(beg, end) \ */ -/* OBSOLETE { asm (".globl end"); \ */ -/* OBSOLETE asm ("movl $ end, sp"); \ */ -/* OBSOLETE asm ("clrl fp"); } */ -/* OBSOLETE */ -/* OBSOLETE /* Push the frame pointer register on the stack. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define PUSH_FRAME_PTR \ */ -/* OBSOLETE asm ("pushl fp"); */ -/* OBSOLETE */ -/* OBSOLETE /* Copy the top-of-stack to the frame pointer register. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define POP_FRAME_PTR \ */ -/* OBSOLETE asm ("movl (sp), fp"); */ -/* OBSOLETE */ -/* OBSOLETE /* After KDB is entered by a fault, push all registers */ -/* OBSOLETE that GDB thinks about (all NUM_REGS of them), */ -/* OBSOLETE so that they appear in order of ascending GDB register number. */ -/* OBSOLETE The fault code will be on the stack beyond the last register. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define PUSH_REGISTERS \ */ -/* OBSOLETE { asm ("pushl 8(sp)"); \ */ -/* OBSOLETE asm ("pushl 8(sp)"); \ */ -/* OBSOLETE asm ("pushal 0x41(sp)"); \ */ -/* OBSOLETE asm ("pushl r0" ); \ */ -/* OBSOLETE asm ("pushl r1" ); \ */ -/* OBSOLETE asm ("pushl r2" ); \ */ -/* OBSOLETE asm ("pushl r3" ); \ */ -/* OBSOLETE asm ("pushl r4" ); \ */ -/* OBSOLETE asm ("pushl r5" ); \ */ -/* OBSOLETE asm ("pushl r6" ); \ */ -/* OBSOLETE asm ("pushl r7" ); \ */ -/* OBSOLETE asm ("pushl r8" ); \ */ -/* OBSOLETE asm ("pushl r9" ); \ */ -/* OBSOLETE asm ("pushl r10" ); \ */ -/* OBSOLETE asm ("pushl r11" ); \ */ -/* OBSOLETE asm ("pushl r12" ); \ */ -/* OBSOLETE asm ("pushl fp" ); \ */ -/* OBSOLETE asm ("pushl sp" ); \ */ -/* OBSOLETE asm ("pushl pc" ); \ */ -/* OBSOLETE asm ("pushl ps" ); \ */ -/* OBSOLETE asm ("pushl aclo" ); \ */ -/* OBSOLETE asm ("pushl achi" ); \ */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Assuming the registers (including processor status) have been */ -/* OBSOLETE pushed on the stack in order of ascending GDB register number, */ -/* OBSOLETE restore them and return to the address in the saved PC register. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define POP_REGISTERS \ */ -/* OBSOLETE { \ */ -/* OBSOLETE asm ("movl (sp)+, achi"); \ */ -/* OBSOLETE asm ("movl (sp)+, aclo"); \ */ -/* OBSOLETE asm ("movl (sp)+, ps"); \ */ -/* OBSOLETE asm ("movl (sp)+, pc"); \ */ -/* OBSOLETE asm ("movl (sp)+, sp"); \ */ -/* OBSOLETE asm ("movl (sp)+, fp"); \ */ -/* OBSOLETE asm ("movl (sp)+, r12"); \ */ -/* OBSOLETE asm ("movl (sp)+, r11"); \ */ -/* OBSOLETE asm ("movl (sp)+, r10"); \ */ -/* OBSOLETE asm ("movl (sp)+, r9"); \ */ -/* OBSOLETE asm ("movl (sp)+, r8"); \ */ -/* OBSOLETE asm ("movl (sp)+, r7"); \ */ -/* OBSOLETE asm ("movl (sp)+, r6"); \ */ -/* OBSOLETE asm ("movl (sp)+, r5"); \ */ -/* OBSOLETE asm ("movl (sp)+, r4"); \ */ -/* OBSOLETE asm ("movl (sp)+, r3"); \ */ -/* OBSOLETE asm ("movl (sp)+, r2"); \ */ -/* OBSOLETE asm ("movl (sp)+, r1"); \ */ -/* OBSOLETE asm ("movl (sp)+, r0"); \ */ -/* OBSOLETE asm ("subl2 $8,(sp)"); \ */ -/* OBSOLETE asm ("movl (sp),sp"); \ */ -/* OBSOLETE asm ("rei"); } */ diff --git a/gdb/configure.host b/gdb/configure.host index 1c35df0..b968ae8 100644 --- a/gdb/configure.host +++ b/gdb/configure.host @@ -12,12 +12,10 @@ case "${host_cpu}" in alpha*) gdb_host_cpu=alpha ;; arm*) gdb_host_cpu=arm ;; -# OBSOLETE c[12]) gdb_host_cpu=convex ;; hppa*) gdb_host_cpu=pa ;; i[3456]86*) gdb_host_cpu=i386 ;; m68*) gdb_host_cpu=m68k ;; m88*) gdb_host_cpu=m88k ;; -# OBSOLETE pyramid) gdb_host_cpu=pyr ;; powerpc*) gdb_host_cpu=powerpc ;; sparc64) gdb_host_cpu=sparc ;; *) gdb_host_cpu=$host_cpu ;; @@ -39,8 +37,6 @@ alpha*-*-freebsd*) gdb_host=fbsd ;; arm*-*-linux*) gdb_host=linux ;; arm*-*-*) gdb_host=arm ;; -# OBSOLETE c[12]-*-*) gdb_host=convex ;; - hppa*-*-bsd*) gdb_host=hppabsd ;; hppa*-*-hiux*) gdb_host=hppahpux ;; hppa*-*-hpux10.20) gdb_host=hpux1020 ;; @@ -90,7 +86,6 @@ m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;; m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;; m68030-sony-*) gdb_host=news1000 ;; -# OBSOLETE m68*-altos-*) gdb_host=altos ;; m68*-apollo*-sysv*) gdb_host=apollo68v ;; m68*-apollo*-bsd*) gdb_host=apollo68b ;; m68*-att-*) gdb_host=3b1 ;; @@ -140,10 +135,6 @@ powerpcle-*-solaris*) gdb_host=solaris ;; powerpc-*-linux*) gdb_host=linux ;; powerpc-*-netbsd*) gdb_host=nbsd ;; -# OBSOLETE pn-*-*) gdb_host=pn ;; - -# OBSOLETE pyramid-*-*) gdb_host=pyramid ;; - romp-*-*) gdb_host=rtbsd ;; rs6000-*-lynxos*) gdb_host=rs6000lynx ;; @@ -164,8 +155,6 @@ sparc64-*-*) gdb_host=sun4sol2 ;; strongarm-*-*) gdb_host=arm ;; xscale-*-*) gdb_host=arm ;; -# OBSOLETE tahoe-*-*) gdb_host=tahoe ;; - vax-*-bsd*) gdb_host=vaxbsd ;; vax-*-ultrix2*) gdb_host=vaxult2 ;; vax-*-ultrix*) gdb_host=vaxult ;; diff --git a/gdb/configure.tgt b/gdb/configure.tgt index d9c073b..c876da2 100644 --- a/gdb/configure.tgt +++ b/gdb/configure.tgt @@ -14,7 +14,6 @@ case "${target_cpu}" in alpha*) gdb_target_cpu=alpha ;; arm*) gdb_target_cpu=arm ;; -# OBSOLETE c[12]) gdb_target_cpu=convex ;; hppa*) gdb_target_cpu=pa ;; i[3456]86*) gdb_target_cpu=i386 ;; m68hc11*|m6811*) gdb_target_cpu=m68hc11 ;; @@ -22,7 +21,6 @@ m68*) gdb_target_cpu=m68k ;; m88*) gdb_target_cpu=m88k ;; mips*) gdb_target_cpu=mips ;; powerpc*) gdb_target_cpu=powerpc ;; -# OBSOLETE pyramid) gdb_target_cpu=pyr ;; sparc*) gdb_target_cpu=sparc ;; thumb*) gdb_target_cpu=arm ;; strongarm*) gdb_target_cpu=arm ;; @@ -63,8 +61,6 @@ arm*-*-* | thumb*-*-* | strongarm*-*-*) xscale-*-*) gdb_target=embed configdirs="$configdirs rdi-share" ;; -# OBSOLETE c1-*-*) gdb_target=convex ;; -# OBSOLETE c2-*-*) gdb_target=convex ;; d10v-*-*) gdb_target=d10v ;; d30v-*-*) gdb_target=d30v ;; @@ -149,7 +145,6 @@ m68*-apollo*-bsd*) gdb_target=apollo68b ;; m68*-bull-sysv*) gdb_target=dpx2 ;; m68*-hp-bsd*) gdb_target=hp300bsd ;; m68*-hp-hpux*) gdb_target=hp300hpux ;; -# OBSOLETE m68*-altos-*) gdb_target=altos ;; m68*-att-*) gdb_target=3b1 ;; m68*-cisco*-*) gdb_target=cisco ;; m68*-ericsson-*) gdb_target=es1800 ;; @@ -255,8 +250,6 @@ powerpcle-*-eabi* | powerpcle-*-sysv* | powerpcle-*-elf*) powerpc-*-linux*) gdb_target=linux ;; powerpc-*-vxworks*) gdb_target=vxworks ;; -# OBSOLETE pyramid-*-*) gdb_target=pyramid ;; - rs6000-*-lynxos*) gdb_target=rs6000lynx configdirs="${configdirs} gdbserver" ;; rs6000-*-aix4*) gdb_target=aix4 ;; @@ -292,8 +285,6 @@ sparc86x-*-*) gdb_target=sparclite ;; #sparc64-*-solaris2*) gdb_target=sp64sol2 ;; sparc64-*-*) gdb_target=sp64 ;; -# OBSOLETE tahoe-*-*) gdb_target=tahoe ;; - tic80-*-*) gdb_target=tic80 configdirs="${configdirs} gdbserver" ;; diff --git a/gdb/convex-tdep.c b/gdb/convex-tdep.c deleted file mode 100644 index 5106241..0000000 --- a/gdb/convex-tdep.c +++ /dev/null @@ -1,1277 +0,0 @@ -/* OBSOLETE /* Convex stuff for GDB. */ -/* OBSOLETE Copyright (C) 1990, 1991, 1996, 2000 Free Software Foundation, Inc. */ -/* OBSOLETE */ -/* OBSOLETE This file is part of GDB. */ -/* OBSOLETE */ -/* OBSOLETE This program is free software; you can redistribute it and/or modify */ -/* OBSOLETE it under the terms of the GNU General Public License as published by */ -/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */ -/* OBSOLETE (at your option) any later version. */ -/* OBSOLETE */ -/* OBSOLETE This program is distributed in the hope that it will be useful, */ -/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */ -/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ -/* OBSOLETE GNU General Public License for more details. */ -/* OBSOLETE */ -/* OBSOLETE You should have received a copy of the GNU General Public License */ -/* OBSOLETE along with this program; if not, write to the Free Software */ -/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #include "defs.h" */ -/* OBSOLETE #include "command.h" */ -/* OBSOLETE #include "symtab.h" */ -/* OBSOLETE #include "value.h" */ -/* OBSOLETE #include "frame.h" */ -/* OBSOLETE #include "inferior.h" */ -/* OBSOLETE #include "gdb_wait.h" */ -/* OBSOLETE */ -/* OBSOLETE #include <signal.h> */ -/* OBSOLETE #include <fcntl.h> */ -/* OBSOLETE */ -/* OBSOLETE #include "gdbcore.h" */ -/* OBSOLETE #include <sys/param.h> */ -/* OBSOLETE #include <sys/dir.h> */ -/* OBSOLETE #include <sys/user.h> */ -/* OBSOLETE #include <sys/ioctl.h> */ -/* OBSOLETE #include <sys/pcntl.h> */ -/* OBSOLETE #include <sys/thread.h> */ -/* OBSOLETE #include <sys/proc.h> */ -/* OBSOLETE #include <sys/file.h> */ -/* OBSOLETE #include "gdb_stat.h" */ -/* OBSOLETE #include <sys/mman.h> */ -/* OBSOLETE */ -/* OBSOLETE #include "gdbcmd.h" */ -/* OBSOLETE */ -/* OBSOLETE CORE_ADDR */ -/* OBSOLETE convex_skip_prologue (pc) */ -/* OBSOLETE CORE_ADDR pc; */ -/* OBSOLETE { */ -/* OBSOLETE int op, ix; */ -/* OBSOLETE op = read_memory_integer (pc, 2); */ -/* OBSOLETE if ((op & 0xffc7) == 0x5ac0) */ -/* OBSOLETE pc += 2; */ -/* OBSOLETE else if (op == 0x1580) */ -/* OBSOLETE pc += 4; */ -/* OBSOLETE else if (op == 0x15c0) */ -/* OBSOLETE pc += 6; */ -/* OBSOLETE if ((read_memory_integer (pc, 2) & 0xfff8) == 0x7c40 */ -/* OBSOLETE && (read_memory_integer (pc + 2, 2) & 0xfff8) == 0x1240 */ -/* OBSOLETE && (read_memory_integer (pc + 8, 2) & 0xfff8) == 0x7c48) */ -/* OBSOLETE pc += 10; */ -/* OBSOLETE if (read_memory_integer (pc, 2) == 0x1240) */ -/* OBSOLETE pc += 6; */ -/* OBSOLETE for (;;) */ -/* OBSOLETE { */ -/* OBSOLETE op = read_memory_integer (pc, 2); */ -/* OBSOLETE ix = (op >> 3) & 7; */ -/* OBSOLETE if (ix != 6) */ -/* OBSOLETE break; */ -/* OBSOLETE if ((op & 0xfcc0) == 0x3000) */ -/* OBSOLETE pc += 4; */ -/* OBSOLETE else if ((op & 0xfcc0) == 0x3040) */ -/* OBSOLETE pc += 6; */ -/* OBSOLETE else if ((op & 0xfcc0) == 0x2800) */ -/* OBSOLETE pc += 4; */ -/* OBSOLETE else if ((op & 0xfcc0) == 0x2840) */ -/* OBSOLETE pc += 6; */ -/* OBSOLETE else */ -/* OBSOLETE break; */ -/* OBSOLETE } */ -/* OBSOLETE return pc; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE int */ -/* OBSOLETE convex_frameless_function_invocation (fi) */ -/* OBSOLETE struct frame_info *fi; */ -/* OBSOLETE { */ -/* OBSOLETE int frameless; */ -/* OBSOLETE extern CORE_ADDR text_start, text_end; */ -/* OBSOLETE CORE_ADDR call_addr = SAVED_PC_AFTER_CALL (FI); */ -/* OBSOLETE frameless = (call_addr >= text_start && call_addr < text_end */ -/* OBSOLETE && read_memory_integer (call_addr - 6, 1) == 0x22); */ -/* OBSOLETE return frameless; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE int */ -/* OBSOLETE convex_frame_num_args (fi) */ -/* OBSOLETE struct frame_info *fi; */ -/* OBSOLETE { */ -/* OBSOLETE int numargs = read_memory_integer (FRAME_ARGS_ADDRESS (fi) - 4, 4); */ -/* OBSOLETE if (numargs < 0 || numargs >= 256) */ -/* OBSOLETE numargs = -1; */ -/* OBSOLETE return numargs; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE exec_file_command (filename, from_tty) */ -/* OBSOLETE char *filename; */ -/* OBSOLETE int from_tty; */ -/* OBSOLETE { */ -/* OBSOLETE int val; */ -/* OBSOLETE int n; */ -/* OBSOLETE struct stat st_exec; */ -/* OBSOLETE */ -/* OBSOLETE /* Eliminate all traces of old exec file. */ -/* OBSOLETE Mark text segment as empty. *x/ */ -/* OBSOLETE */ -/* OBSOLETE if (execfile) */ -/* OBSOLETE xfree (execfile); */ -/* OBSOLETE execfile = 0; */ -/* OBSOLETE data_start = 0; */ -/* OBSOLETE data_end = 0; */ -/* OBSOLETE text_start = 0; */ -/* OBSOLETE text_end = 0; */ -/* OBSOLETE exec_data_start = 0; */ -/* OBSOLETE exec_data_end = 0; */ -/* OBSOLETE if (execchan >= 0) */ -/* OBSOLETE close (execchan); */ -/* OBSOLETE execchan = -1; */ -/* OBSOLETE */ -/* OBSOLETE n_exec = 0; */ -/* OBSOLETE */ -/* OBSOLETE /* Now open and digest the file the user requested, if any. *x/ */ -/* OBSOLETE */ -/* OBSOLETE if (filename) */ -/* OBSOLETE { */ -/* OBSOLETE filename = tilde_expand (filename); */ -/* OBSOLETE make_cleanup (xfree, filename); */ -/* OBSOLETE */ -/* OBSOLETE execchan = openp (getenv ("PATH"), 1, filename, O_RDONLY, 0, */ -/* OBSOLETE &execfile); */ -/* OBSOLETE if (execchan < 0) */ -/* OBSOLETE perror_with_name (filename); */ -/* OBSOLETE */ -/* OBSOLETE if (myread (execchan, &filehdr, sizeof filehdr) < 0) */ -/* OBSOLETE perror_with_name (filename); */ -/* OBSOLETE */ -/* OBSOLETE if (! IS_SOFF_MAGIC (filehdr.h_magic)) */ -/* OBSOLETE error ("%s: not an executable file.", filename); */ -/* OBSOLETE */ -/* OBSOLETE if (myread (execchan, &opthdr, filehdr.h_opthdr) <= 0) */ -/* OBSOLETE perror_with_name (filename); */ -/* OBSOLETE */ -/* OBSOLETE /* Read through the section headers. */ -/* OBSOLETE For text, data, etc, record an entry in the exec file map. */ -/* OBSOLETE Record text_start and text_end. *x/ */ -/* OBSOLETE */ -/* OBSOLETE lseek (execchan, (long) filehdr.h_scnptr, 0); */ -/* OBSOLETE */ -/* OBSOLETE for (n = 0; n < filehdr.h_nscns; n++) */ -/* OBSOLETE { */ -/* OBSOLETE if (myread (execchan, &scnhdr, sizeof scnhdr) < 0) */ -/* OBSOLETE perror_with_name (filename); */ -/* OBSOLETE */ -/* OBSOLETE if ((scnhdr.s_flags & S_TYPMASK) >= S_TEXT */ -/* OBSOLETE && (scnhdr.s_flags & S_TYPMASK) <= S_COMON) */ -/* OBSOLETE { */ -/* OBSOLETE exec_map[n_exec].mem_addr = scnhdr.s_vaddr; */ -/* OBSOLETE exec_map[n_exec].mem_end = scnhdr.s_vaddr + scnhdr.s_size; */ -/* OBSOLETE exec_map[n_exec].file_addr = scnhdr.s_scnptr; */ -/* OBSOLETE exec_map[n_exec].type = scnhdr.s_flags & S_TYPMASK; */ -/* OBSOLETE n_exec++; */ -/* OBSOLETE */ -/* OBSOLETE if ((scnhdr.s_flags & S_TYPMASK) == S_TEXT) */ -/* OBSOLETE { */ -/* OBSOLETE text_start = scnhdr.s_vaddr; */ -/* OBSOLETE text_end = scnhdr.s_vaddr + scnhdr.s_size; */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE fstat (execchan, &st_exec); */ -/* OBSOLETE exec_mtime = st_exec.st_mtime; */ -/* OBSOLETE */ -/* OBSOLETE validate_files (); */ -/* OBSOLETE } */ -/* OBSOLETE else if (from_tty) */ -/* OBSOLETE printf_filtered ("No executable file now.\n"); */ -/* OBSOLETE */ -/* OBSOLETE /* Tell display code (if any) about the changed file name. *x/ */ -/* OBSOLETE if (exec_file_display_hook) */ -/* OBSOLETE (*exec_file_display_hook) (filename); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE #if 0 */ -/* OBSOLETE /* Read data from SOFF exec or core file. */ -/* OBSOLETE Return 0 on success, EIO if address out of bounds. *x/ */ -/* OBSOLETE */ -/* OBSOLETE int */ -/* OBSOLETE xfer_core_file (memaddr, myaddr, len) */ -/* OBSOLETE CORE_ADDR memaddr; */ -/* OBSOLETE char *myaddr; */ -/* OBSOLETE int len; */ -/* OBSOLETE { */ -/* OBSOLETE register int i; */ -/* OBSOLETE register int n; */ -/* OBSOLETE register int val; */ -/* OBSOLETE int xferchan; */ -/* OBSOLETE char **xferfile; */ -/* OBSOLETE int fileptr; */ -/* OBSOLETE int returnval = 0; */ -/* OBSOLETE */ -/* OBSOLETE while (len > 0) */ -/* OBSOLETE { */ -/* OBSOLETE xferfile = 0; */ -/* OBSOLETE xferchan = 0; */ -/* OBSOLETE */ -/* OBSOLETE /* Determine which file the next bunch of addresses reside in, */ -/* OBSOLETE and where in the file. Set the file's read/write pointer */ -/* OBSOLETE to point at the proper place for the desired address */ -/* OBSOLETE and set xferfile and xferchan for the correct file. */ -/* OBSOLETE If desired address is nonexistent, leave them zero. */ -/* OBSOLETE i is set to the number of bytes that can be handled */ -/* OBSOLETE along with the next address. *x/ */ -/* OBSOLETE */ -/* OBSOLETE i = len; */ -/* OBSOLETE */ -/* OBSOLETE for (n = 0; n < n_core; n++) */ -/* OBSOLETE { */ -/* OBSOLETE if (memaddr >= core_map[n].mem_addr && memaddr < core_map[n].mem_end */ -/* OBSOLETE && (core_map[n].thread == -1 */ -/* OBSOLETE || core_map[n].thread == inferior_thread)) */ -/* OBSOLETE { */ -/* OBSOLETE i = min (len, core_map[n].mem_end - memaddr); */ -/* OBSOLETE fileptr = core_map[n].file_addr + memaddr - core_map[n].mem_addr; */ -/* OBSOLETE if (core_map[n].file_addr) */ -/* OBSOLETE { */ -/* OBSOLETE xferfile = &corefile; */ -/* OBSOLETE xferchan = corechan; */ -/* OBSOLETE } */ -/* OBSOLETE break; */ -/* OBSOLETE } */ -/* OBSOLETE else if (core_map[n].mem_addr >= memaddr */ -/* OBSOLETE && core_map[n].mem_addr < memaddr + i) */ -/* OBSOLETE i = core_map[n].mem_addr - memaddr; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE if (!xferfile) */ -/* OBSOLETE for (n = 0; n < n_exec; n++) */ -/* OBSOLETE { */ -/* OBSOLETE if (memaddr >= exec_map[n].mem_addr */ -/* OBSOLETE && memaddr < exec_map[n].mem_end) */ -/* OBSOLETE { */ -/* OBSOLETE i = min (len, exec_map[n].mem_end - memaddr); */ -/* OBSOLETE fileptr = exec_map[n].file_addr + memaddr */ -/* OBSOLETE - exec_map[n].mem_addr; */ -/* OBSOLETE if (exec_map[n].file_addr) */ -/* OBSOLETE { */ -/* OBSOLETE xferfile = &execfile; */ -/* OBSOLETE xferchan = execchan; */ -/* OBSOLETE } */ -/* OBSOLETE break; */ -/* OBSOLETE } */ -/* OBSOLETE else if (exec_map[n].mem_addr >= memaddr */ -/* OBSOLETE && exec_map[n].mem_addr < memaddr + i) */ -/* OBSOLETE i = exec_map[n].mem_addr - memaddr; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Now we know which file to use. */ -/* OBSOLETE Set up its pointer and transfer the data. *x/ */ -/* OBSOLETE if (xferfile) */ -/* OBSOLETE { */ -/* OBSOLETE if (*xferfile == 0) */ -/* OBSOLETE if (xferfile == &execfile) */ -/* OBSOLETE error ("No program file to examine."); */ -/* OBSOLETE else */ -/* OBSOLETE error ("No core dump file or running program to examine."); */ -/* OBSOLETE val = lseek (xferchan, fileptr, 0); */ -/* OBSOLETE if (val < 0) */ -/* OBSOLETE perror_with_name (*xferfile); */ -/* OBSOLETE val = myread (xferchan, myaddr, i); */ -/* OBSOLETE if (val < 0) */ -/* OBSOLETE perror_with_name (*xferfile); */ -/* OBSOLETE } */ -/* OBSOLETE /* If this address is for nonexistent memory, */ -/* OBSOLETE read zeros if reading, or do nothing if writing. *x/ */ -/* OBSOLETE else */ -/* OBSOLETE { */ -/* OBSOLETE memset (myaddr, '\0', i); */ -/* OBSOLETE returnval = EIO; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE memaddr += i; */ -/* OBSOLETE myaddr += i; */ -/* OBSOLETE len -= i; */ -/* OBSOLETE } */ -/* OBSOLETE return returnval; */ -/* OBSOLETE } */ -/* OBSOLETE #endif */ -/* OBSOLETE */ -/* OBSOLETE /* Here from info files command to print an address map. *x/ */ -/* OBSOLETE */ -/* OBSOLETE print_maps () */ -/* OBSOLETE { */ -/* OBSOLETE struct pmap ptrs[200]; */ -/* OBSOLETE int n; */ -/* OBSOLETE */ -/* OBSOLETE /* ID strings for core and executable file sections *x/ */ -/* OBSOLETE */ -/* OBSOLETE static char *idstr[] = */ -/* OBSOLETE { */ -/* OBSOLETE "0", "text", "data", "tdata", "bss", "tbss", */ -/* OBSOLETE "common", "ttext", "ctx", "tctx", "10", "11", "12", */ -/* OBSOLETE }; */ -/* OBSOLETE */ -/* OBSOLETE for (n = 0; n < n_core; n++) */ -/* OBSOLETE { */ -/* OBSOLETE core_map[n].which = 0; */ -/* OBSOLETE ptrs[n] = core_map[n]; */ -/* OBSOLETE } */ -/* OBSOLETE for (n = 0; n < n_exec; n++) */ -/* OBSOLETE { */ -/* OBSOLETE exec_map[n].which = 1; */ -/* OBSOLETE ptrs[n_core+n] = exec_map[n]; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE qsort (ptrs, n_core + n_exec, sizeof *ptrs, ptr_cmp); */ -/* OBSOLETE */ -/* OBSOLETE for (n = 0; n < n_core + n_exec; n++) */ -/* OBSOLETE { */ -/* OBSOLETE struct pmap *p = &ptrs[n]; */ -/* OBSOLETE if (n > 0) */ -/* OBSOLETE { */ -/* OBSOLETE if (p->mem_addr < ptrs[n-1].mem_end) */ -/* OBSOLETE p->mem_addr = ptrs[n-1].mem_end; */ -/* OBSOLETE if (p->mem_addr >= p->mem_end) */ -/* OBSOLETE continue; */ -/* OBSOLETE } */ -/* OBSOLETE printf_filtered ("%08x .. %08x %-6s %s\n", */ -/* OBSOLETE p->mem_addr, p->mem_end, idstr[p->type], */ -/* OBSOLETE p->which ? execfile : corefile); */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Compare routine to put file sections in order. */ -/* OBSOLETE Sort into increasing order on address, and put core file sections */ -/* OBSOLETE before exec file sections if both files contain the same addresses. *x/ */ -/* OBSOLETE */ -/* OBSOLETE static ptr_cmp (a, b) */ -/* OBSOLETE struct pmap *a, *b; */ -/* OBSOLETE { */ -/* OBSOLETE if (a->mem_addr != b->mem_addr) return a->mem_addr - b->mem_addr; */ -/* OBSOLETE return a->which - b->which; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Trapped internal variables are used to handle special registers. */ -/* OBSOLETE A trapped i.v. calls a hook here every time it is dereferenced, */ -/* OBSOLETE to provide a new value for the variable, and it calls a hook here */ -/* OBSOLETE when a new value is assigned, to do something with the value. */ -/* OBSOLETE */ -/* OBSOLETE The vector registers are $vl, $vs, $vm, $vN, $VN (N in 0..7). */ -/* OBSOLETE The communication registers are $cN, $CN (N in 0..63). */ -/* OBSOLETE They not handled as regular registers because it's expensive to */ -/* OBSOLETE read them, and their size varies, and they have too many names. *x/ */ -/* OBSOLETE */ -/* OBSOLETE */ -/* OBSOLETE /* Return 1 if NAME is a trapped internal variable, else 0. *x/ */ -/* OBSOLETE */ -/* OBSOLETE int */ -/* OBSOLETE is_trapped_internalvar (name) */ -/* OBSOLETE char *name; */ -/* OBSOLETE { */ -/* OBSOLETE if ((name[0] == 'c' || name[0] == 'C') */ -/* OBSOLETE && name[1] >= '0' && name[1] <= '9' */ -/* OBSOLETE && (name[2] == '\0' */ -/* OBSOLETE || (name[2] >= '0' && name[2] <= '9' */ -/* OBSOLETE && name[3] == '\0' && name[1] != '0')) */ -/* OBSOLETE && atoi (&name[1]) < 64) return 1; */ -/* OBSOLETE */ -/* OBSOLETE if ((name[0] == 'v' || name[0] == 'V') */ -/* OBSOLETE && (((name[1] & -8) == '0' && name[2] == '\0') */ -/* OBSOLETE || STREQ (name, "vl") */ -/* OBSOLETE || STREQ (name, "vs") */ -/* OBSOLETE || STREQ (name, "vm"))) */ -/* OBSOLETE return 1; */ -/* OBSOLETE else return 0; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Return the value of trapped internal variable VAR *x/ */ -/* OBSOLETE */ -/* OBSOLETE value */ -/* OBSOLETE value_of_trapped_internalvar (var) */ -/* OBSOLETE struct internalvar *var; */ -/* OBSOLETE { */ -/* OBSOLETE char *name = var->name; */ -/* OBSOLETE value val; */ -/* OBSOLETE struct type *type; */ -/* OBSOLETE struct type *range_type; */ -/* OBSOLETE long len = *read_vector_register (VL_REGNUM); */ -/* OBSOLETE if (len <= 0 || len > 128) len = 128; */ -/* OBSOLETE */ -/* OBSOLETE if (STREQ (name, "vl")) */ -/* OBSOLETE { */ -/* OBSOLETE val = value_from_longest (builtin_type_int, */ -/* OBSOLETE (LONGEST) *read_vector_register_1 (VL_REGNUM)); */ -/* OBSOLETE } */ -/* OBSOLETE else if (STREQ (name, "vs")) */ -/* OBSOLETE { */ -/* OBSOLETE val = value_from_longest (builtin_type_int, */ -/* OBSOLETE (LONGEST) *read_vector_register_1 (VS_REGNUM)); */ -/* OBSOLETE } */ -/* OBSOLETE else if (STREQ (name, "vm")) */ -/* OBSOLETE { */ -/* OBSOLETE long vm[4]; */ -/* OBSOLETE long i, *p; */ -/* OBSOLETE memcpy (vm, read_vector_register_1 (VM_REGNUM), sizeof vm); */ -/* OBSOLETE range_type = */ -/* OBSOLETE create_range_type ((struct type *) NULL, builtin_type_int, 0, len - 1); */ -/* OBSOLETE type = */ -/* OBSOLETE create_array_type ((struct type *) NULL, builtin_type_int, range_type); */ -/* OBSOLETE val = allocate_value (type); */ -/* OBSOLETE p = (long *) VALUE_CONTENTS (val); */ -/* OBSOLETE for (i = 0; i < len; i++) */ -/* OBSOLETE *p++ = !! (vm[3 - (i >> 5)] & (1 << (i & 037))); */ -/* OBSOLETE } */ -/* OBSOLETE else if (name[0] == 'V') */ -/* OBSOLETE { */ -/* OBSOLETE range_type = */ -/* OBSOLETE create_range_type ((struct type *) NULL, builtin_type_int 0, len - 1); */ -/* OBSOLETE type = */ -/* OBSOLETE create_array_type ((struct type *) NULL, builtin_type_long_long, */ -/* OBSOLETE range_type); */ -/* OBSOLETE val = allocate_value (type); */ -/* OBSOLETE memcpy (VALUE_CONTENTS (val), */ -/* OBSOLETE read_vector_register_1 (name[1] - '0'), */ -/* OBSOLETE TYPE_LENGTH (type)); */ -/* OBSOLETE } */ -/* OBSOLETE else if (name[0] == 'v') */ -/* OBSOLETE { */ -/* OBSOLETE long *p1, *p2; */ -/* OBSOLETE range_type = */ -/* OBSOLETE create_range_type ((struct type *) NULL, builtin_type_int 0, len - 1); */ -/* OBSOLETE type = */ -/* OBSOLETE create_array_type ((struct type *) NULL, builtin_type_long, */ -/* OBSOLETE range_type); */ -/* OBSOLETE val = allocate_value (type); */ -/* OBSOLETE p1 = read_vector_register_1 (name[1] - '0'); */ -/* OBSOLETE p2 = (long *) VALUE_CONTENTS (val); */ -/* OBSOLETE while (--len >= 0) {p1++; *p2++ = *p1++;} */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE else if (name[0] == 'c') */ -/* OBSOLETE val = value_from_longest (builtin_type_int, */ -/* OBSOLETE read_comm_register (atoi (&name[1]))); */ -/* OBSOLETE else if (name[0] == 'C') */ -/* OBSOLETE val = value_from_longest (builtin_type_long_long, */ -/* OBSOLETE read_comm_register (atoi (&name[1]))); */ -/* OBSOLETE */ -/* OBSOLETE VALUE_LVAL (val) = lval_internalvar; */ -/* OBSOLETE VALUE_INTERNALVAR (val) = var; */ -/* OBSOLETE return val; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Handle a new value assigned to a trapped internal variable *x/ */ -/* OBSOLETE */ -/* OBSOLETE void */ -/* OBSOLETE set_trapped_internalvar (var, val, bitpos, bitsize, offset) */ -/* OBSOLETE struct internalvar *var; */ -/* OBSOLETE value val; */ -/* OBSOLETE int bitpos, bitsize, offset; */ -/* OBSOLETE { */ -/* OBSOLETE char *name = var->name; */ -/* OBSOLETE long long newval = value_as_long (val); */ -/* OBSOLETE */ -/* OBSOLETE if (STREQ (name, "vl")) */ -/* OBSOLETE write_vector_register (VL_REGNUM, 0, newval); */ -/* OBSOLETE else if (STREQ (name, "vs")) */ -/* OBSOLETE write_vector_register (VS_REGNUM, 0, newval); */ -/* OBSOLETE else if (name[0] == 'c' || name[0] == 'C') */ -/* OBSOLETE write_comm_register (atoi (&name[1]), newval); */ -/* OBSOLETE else if (STREQ (name, "vm")) */ -/* OBSOLETE error ("can't assign to $vm"); */ -/* OBSOLETE else */ -/* OBSOLETE { */ -/* OBSOLETE offset /= bitsize / 8; */ -/* OBSOLETE write_vector_register (name[1] - '0', offset, newval); */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Print an integer value when no format was specified. gdb normally */ -/* OBSOLETE prints these values in decimal, but the the leading 0x80000000 of */ -/* OBSOLETE pointers produces intolerable 10-digit negative numbers. */ -/* OBSOLETE If it looks like an address, print it in hex instead. *x/ */ -/* OBSOLETE */ -/* OBSOLETE decout (stream, type, val) */ -/* OBSOLETE struct ui_file *stream; */ -/* OBSOLETE struct type *type; */ -/* OBSOLETE LONGEST val; */ -/* OBSOLETE { */ -/* OBSOLETE long lv = val; */ -/* OBSOLETE */ -/* OBSOLETE switch (output_radix) */ -/* OBSOLETE { */ -/* OBSOLETE case 0: */ -/* OBSOLETE if ((lv == val || (unsigned) lv == val) */ -/* OBSOLETE && ((lv & 0xf0000000) == 0x80000000 */ -/* OBSOLETE || ((lv & 0xf0000000) == 0xf0000000 && lv < STACK_END_ADDR))) */ -/* OBSOLETE { */ -/* OBSOLETE print_longest (stream, "x", 0, val); */ -/* OBSOLETE return; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE case 10: */ -/* OBSOLETE print_longest (stream, TYPE_UNSIGNED (type) ? "u" : "d", 0, val); */ -/* OBSOLETE return; */ -/* OBSOLETE */ -/* OBSOLETE case 8: */ -/* OBSOLETE print_longest (stream, "o", 0, val); */ -/* OBSOLETE return; */ -/* OBSOLETE */ -/* OBSOLETE case 16: */ -/* OBSOLETE print_longest (stream, "x", 0, val); */ -/* OBSOLETE return; */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Change the default output radix to 10 or 16, or set it to 0 (heuristic). */ -/* OBSOLETE This command is mostly obsolete now that the print command allows */ -/* OBSOLETE formats to apply to aggregates, but is still handy occasionally. *x/ */ -/* OBSOLETE */ -/* OBSOLETE static void */ -/* OBSOLETE set_base_command (arg) */ -/* OBSOLETE char *arg; */ -/* OBSOLETE { */ -/* OBSOLETE int new_radix; */ -/* OBSOLETE */ -/* OBSOLETE if (!arg) */ -/* OBSOLETE output_radix = 0; */ -/* OBSOLETE else */ -/* OBSOLETE { */ -/* OBSOLETE new_radix = atoi (arg); */ -/* OBSOLETE if (new_radix != 10 && new_radix != 16 && new_radix != 8) */ -/* OBSOLETE error ("base must be 8, 10 or 16, or null"); */ -/* OBSOLETE else output_radix = new_radix; */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Turn pipelining on or off in the inferior. *x/ */ -/* OBSOLETE */ -/* OBSOLETE static void */ -/* OBSOLETE set_pipelining_command (arg) */ -/* OBSOLETE char *arg; */ -/* OBSOLETE { */ -/* OBSOLETE if (!arg) */ -/* OBSOLETE { */ -/* OBSOLETE sequential = !sequential; */ -/* OBSOLETE printf_filtered ("%s\n", sequential ? "off" : "on"); */ -/* OBSOLETE } */ -/* OBSOLETE else if (STREQ (arg, "on")) */ -/* OBSOLETE sequential = 0; */ -/* OBSOLETE else if (STREQ (arg, "off")) */ -/* OBSOLETE sequential = 1; */ -/* OBSOLETE else error ("valid args are `on', to allow instructions to overlap, or\n\ */ -/* OBSOLETE `off', to prevent it and thereby pinpoint exceptions."); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Enable, disable, or force parallel execution in the inferior. *x/ */ -/* OBSOLETE */ -/* OBSOLETE static void */ -/* OBSOLETE set_parallel_command (arg) */ -/* OBSOLETE char *arg; */ -/* OBSOLETE { */ -/* OBSOLETE struct rlimit rl; */ -/* OBSOLETE int prevparallel = parallel; */ -/* OBSOLETE */ -/* OBSOLETE if (!strncmp (arg, "fixed", strlen (arg))) */ -/* OBSOLETE parallel = 2; */ -/* OBSOLETE else if (STREQ (arg, "on")) */ -/* OBSOLETE parallel = 1; */ -/* OBSOLETE else if (STREQ (arg, "off")) */ -/* OBSOLETE parallel = 0; */ -/* OBSOLETE else error ("valid args are `on', to allow multiple threads, or\n\ */ -/* OBSOLETE `fixed', to force multiple threads, or\n\ */ -/* OBSOLETE `off', to run with one thread only."); */ -/* OBSOLETE */ -/* OBSOLETE if ((prevparallel == 0) != (parallel == 0) && inferior_pid) */ -/* OBSOLETE printf_filtered ("will take effect at next run.\n"); */ -/* OBSOLETE */ -/* OBSOLETE getrlimit (RLIMIT_CONCUR, &rl); */ -/* OBSOLETE rl.rlim_cur = parallel ? rl.rlim_max : 1; */ -/* OBSOLETE setrlimit (RLIMIT_CONCUR, &rl); */ -/* OBSOLETE */ -/* OBSOLETE if (inferior_pid) */ -/* OBSOLETE set_fixed_scheduling (inferior_pid, parallel == 2); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Add a new name for an existing command. *x/ */ -/* OBSOLETE */ -/* OBSOLETE static void */ -/* OBSOLETE alias_command (arg) */ -/* OBSOLETE char *arg; */ -/* OBSOLETE { */ -/* OBSOLETE static char *aliaserr = "usage is `alias NEW OLD', no args allowed"; */ -/* OBSOLETE char *newname = arg; */ -/* OBSOLETE struct cmd_list_element *new, *old; */ -/* OBSOLETE */ -/* OBSOLETE if (!arg) */ -/* OBSOLETE error_no_arg ("newname oldname"); */ -/* OBSOLETE */ -/* OBSOLETE new = lookup_cmd (&arg, cmdlist, "", -1); */ -/* OBSOLETE if (new && !strncmp (newname, new->name, strlen (new->name))) */ -/* OBSOLETE { */ -/* OBSOLETE newname = new->name; */ -/* OBSOLETE if (!(*arg == '-' */ -/* OBSOLETE || (*arg >= 'a' && *arg <= 'z') */ -/* OBSOLETE || (*arg >= 'A' && *arg <= 'Z') */ -/* OBSOLETE || (*arg >= '0' && *arg <= '9'))) */ -/* OBSOLETE error (aliaserr); */ -/* OBSOLETE } */ -/* OBSOLETE else */ -/* OBSOLETE { */ -/* OBSOLETE arg = newname; */ -/* OBSOLETE while (*arg == '-' */ -/* OBSOLETE || (*arg >= 'a' && *arg <= 'z') */ -/* OBSOLETE || (*arg >= 'A' && *arg <= 'Z') */ -/* OBSOLETE || (*arg >= '0' && *arg <= '9')) */ -/* OBSOLETE arg++; */ -/* OBSOLETE if (*arg != ' ' && *arg != '\t') */ -/* OBSOLETE error (aliaserr); */ -/* OBSOLETE *arg = '\0'; */ -/* OBSOLETE arg++; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE old = lookup_cmd (&arg, cmdlist, "", 0); */ -/* OBSOLETE */ -/* OBSOLETE if (*arg != '\0') */ -/* OBSOLETE error (aliaserr); */ -/* OBSOLETE */ -/* OBSOLETE if (new && !strncmp (newname, new->name, strlen (new->name))) */ -/* OBSOLETE { */ -/* OBSOLETE char *tem; */ -/* OBSOLETE if (new->class == (int) class_user || new->class == (int) class_alias) */ -/* OBSOLETE tem = "Redefine command \"%s\"? "; */ -/* OBSOLETE else */ -/* OBSOLETE tem = "Really redefine built-in command \"%s\"? "; */ -/* OBSOLETE if (!query (tem, new->name)) */ -/* OBSOLETE error ("Command \"%s\" not redefined.", new->name); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE add_com (newname, class_alias, old->function, old->doc); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE */ -/* OBSOLETE */ -/* OBSOLETE /* Print the current thread number, and any threads with signals in the */ -/* OBSOLETE queue. *x/ */ -/* OBSOLETE */ -/* OBSOLETE thread_info () */ -/* OBSOLETE { */ -/* OBSOLETE struct threadpid *p; */ -/* OBSOLETE */ -/* OBSOLETE if (have_inferior_p ()) */ -/* OBSOLETE { */ -/* OBSOLETE ps.pi_buffer = (char *) &comm_registers; */ -/* OBSOLETE ps.pi_nbytes = sizeof comm_registers; */ -/* OBSOLETE ps.pi_offset = 0; */ -/* OBSOLETE ps.pi_thread = inferior_thread; */ -/* OBSOLETE ioctl (inferior_fd, PIXRDCREGS, &ps); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* FIXME: stop_signal is from target.h but stop_sigcode is a */ -/* OBSOLETE convex-specific thing. *x/ */ -/* OBSOLETE printf_filtered ("Current thread %d stopped with signal %d.%d (%s).\n", */ -/* OBSOLETE inferior_thread, stop_signal, stop_sigcode, */ -/* OBSOLETE subsig_name (stop_signal, stop_sigcode)); */ -/* OBSOLETE */ -/* OBSOLETE for (p = signal_stack; p->pid; p--) */ -/* OBSOLETE printf_filtered ("Thread %d stopped with signal %d.%d (%s).\n", */ -/* OBSOLETE p->thread, p->signo, p->subsig, */ -/* OBSOLETE subsig_name (p->signo, p->subsig)); */ -/* OBSOLETE */ -/* OBSOLETE if (iscrlbit (comm_registers.crctl.lbits.cc, 64+13)) */ -/* OBSOLETE printf_filtered ("New thread start pc %#x\n", */ -/* OBSOLETE (long) (comm_registers.crreg.pcpsw >> 32)); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Return string describing a signal.subcode number *x/ */ -/* OBSOLETE */ -/* OBSOLETE static char * */ -/* OBSOLETE subsig_name (signo, subcode) */ -/* OBSOLETE int signo, subcode; */ -/* OBSOLETE { */ -/* OBSOLETE static char *subsig4[] = { */ -/* OBSOLETE "error exit", "privileged instruction", "unknown", */ -/* OBSOLETE "unknown", "undefined opcode", */ -/* OBSOLETE 0}; */ -/* OBSOLETE static char *subsig5[] = {0, */ -/* OBSOLETE "breakpoint", "single step", "fork trap", "exec trap", "pfork trap", */ -/* OBSOLETE "join trap", "idle trap", "last thread", "wfork trap", */ -/* OBSOLETE "process breakpoint", "trap instruction", */ -/* OBSOLETE 0}; */ -/* OBSOLETE static char *subsig8[] = {0, */ -/* OBSOLETE "int overflow", "int divide check", "float overflow", */ -/* OBSOLETE "float divide check", "float underflow", "reserved operand", */ -/* OBSOLETE "sqrt error", "exp error", "ln error", "sin error", "cos error", */ -/* OBSOLETE 0}; */ -/* OBSOLETE static char *subsig10[] = {0, */ -/* OBSOLETE "invalid inward ring address", "invalid outward ring call", */ -/* OBSOLETE "invalid inward ring return", "invalid syscall gate", */ -/* OBSOLETE "invalid rtn frame length", "invalid comm reg address", */ -/* OBSOLETE "invalid trap gate", */ -/* OBSOLETE 0}; */ -/* OBSOLETE static char *subsig11[] = {0, */ -/* OBSOLETE "read access denied", "write access denied", "execute access denied", */ -/* OBSOLETE "segment descriptor fault", "page table fault", "data reference fault", */ -/* OBSOLETE "i/o access denied", "levt pte invalid", */ -/* OBSOLETE 0}; */ -/* OBSOLETE */ -/* OBSOLETE static char **subsig_list[] = */ -/* OBSOLETE {0, 0, 0, 0, subsig4, subsig5, 0, 0, subsig8, 0, subsig10, subsig11, 0}; */ -/* OBSOLETE */ -/* OBSOLETE int i; */ -/* OBSOLETE char *p; */ -/* OBSOLETE */ -/* OBSOLETE if ((p = strsignal (signo)) == NULL) */ -/* OBSOLETE p = "unknown"; */ -/* OBSOLETE if (signo >= (sizeof subsig_list / sizeof *subsig_list) */ -/* OBSOLETE || !subsig_list[signo]) */ -/* OBSOLETE return p; */ -/* OBSOLETE for (i = 1; subsig_list[signo][i]; i++) */ -/* OBSOLETE if (i == subcode) */ -/* OBSOLETE return subsig_list[signo][subcode]; */ -/* OBSOLETE return p; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE */ -/* OBSOLETE /* Print a compact display of thread status, essentially x/i $pc */ -/* OBSOLETE for all active threads. *x/ */ -/* OBSOLETE */ -/* OBSOLETE static void */ -/* OBSOLETE threadstat () */ -/* OBSOLETE { */ -/* OBSOLETE int t; */ -/* OBSOLETE */ -/* OBSOLETE for (t = 0; t < n_threads; t++) */ -/* OBSOLETE if (thread_state[t] == PI_TALIVE) */ -/* OBSOLETE { */ -/* OBSOLETE printf_filtered ("%d%c %08x%c %d.%d ", t, */ -/* OBSOLETE (t == inferior_thread ? '*' : ' '), thread_pc[t], */ -/* OBSOLETE (thread_is_in_kernel[t] ? '#' : ' '), */ -/* OBSOLETE thread_signal[t], thread_sigcode[t]); */ -/* OBSOLETE print_insn (thread_pc[t], stdout); */ -/* OBSOLETE printf_filtered ("\n"); */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Change the current thread to ARG. *x/ */ -/* OBSOLETE */ -/* OBSOLETE set_thread_command (arg) */ -/* OBSOLETE char *arg; */ -/* OBSOLETE { */ -/* OBSOLETE int thread; */ -/* OBSOLETE */ -/* OBSOLETE if (!arg) */ -/* OBSOLETE { */ -/* OBSOLETE threadstat (); */ -/* OBSOLETE return; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE thread = parse_and_eval_address (arg); */ -/* OBSOLETE */ -/* OBSOLETE if (thread < 0 || thread > n_threads || thread_state[thread] != PI_TALIVE) */ -/* OBSOLETE error ("no such thread."); */ -/* OBSOLETE */ -/* OBSOLETE select_thread (thread); */ -/* OBSOLETE */ -/* OBSOLETE stop_pc = read_pc (); */ -/* OBSOLETE flush_cached_frames (); */ -/* OBSOLETE select_frame (get_current_frame (), 0); */ -/* OBSOLETE print_stack_frame (selected_frame, selected_frame_level, -1); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Here on CONT command; gdb's dispatch address is changed to come here. */ -/* OBSOLETE Set global variable ALL_CONTINUE to tell resume() that it should */ -/* OBSOLETE start up all threads, and that a thread switch will not blow gdb's */ -/* OBSOLETE mind. *x/ */ -/* OBSOLETE */ -/* OBSOLETE static void */ -/* OBSOLETE convex_cont_command (proc_count_exp, from_tty) */ -/* OBSOLETE char *proc_count_exp; */ -/* OBSOLETE int from_tty; */ -/* OBSOLETE { */ -/* OBSOLETE all_continue = 1; */ -/* OBSOLETE cont_command (proc_count_exp, from_tty); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Here on 1CONT command. Resume only the current thread. *x/ */ -/* OBSOLETE */ -/* OBSOLETE one_cont_command (proc_count_exp, from_tty) */ -/* OBSOLETE char *proc_count_exp; */ -/* OBSOLETE int from_tty; */ -/* OBSOLETE { */ -/* OBSOLETE cont_command (proc_count_exp, from_tty); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Print the contents and lock bits of all communication registers, */ -/* OBSOLETE or just register ARG if ARG is a communication register, */ -/* OBSOLETE or the 3-word resource structure in memory at address ARG. *x/ */ -/* OBSOLETE */ -/* OBSOLETE comm_registers_info (arg) */ -/* OBSOLETE char *arg; */ -/* OBSOLETE { */ -/* OBSOLETE int i, regnum; */ -/* OBSOLETE */ -/* OBSOLETE if (arg) */ -/* OBSOLETE { */ -/* OBSOLETE if (sscanf (arg, "$c%d", ®num) == 1) { */ -/* OBSOLETE ; */ -/* OBSOLETE } else if (sscanf (arg, "$C%d", ®num) == 1) { */ -/* OBSOLETE ; */ -/* OBSOLETE } else { */ -/* OBSOLETE regnum = parse_and_eval_address (arg); */ -/* OBSOLETE if (regnum > 0) */ -/* OBSOLETE regnum &= ~0x8000; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE if (regnum >= 64) */ -/* OBSOLETE error ("%s: invalid register name.", arg); */ -/* OBSOLETE */ -/* OBSOLETE /* if we got a (user) address, examine the resource struct there *x/ */ -/* OBSOLETE */ -/* OBSOLETE if (regnum < 0) */ -/* OBSOLETE { */ -/* OBSOLETE static int buf[3]; */ -/* OBSOLETE read_memory (regnum, buf, sizeof buf); */ -/* OBSOLETE printf_filtered ("%08x %08x%08x%s\n", regnum, buf[1], buf[2], */ -/* OBSOLETE buf[0] & 0xff ? " locked" : ""); */ -/* OBSOLETE return; */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE ps.pi_buffer = (char *) &comm_registers; */ -/* OBSOLETE ps.pi_nbytes = sizeof comm_registers; */ -/* OBSOLETE ps.pi_offset = 0; */ -/* OBSOLETE ps.pi_thread = inferior_thread; */ -/* OBSOLETE ioctl (inferior_fd, PIXRDCREGS, &ps); */ -/* OBSOLETE */ -/* OBSOLETE for (i = 0; i < 64; i++) */ -/* OBSOLETE if (!arg || i == regnum) */ -/* OBSOLETE printf_filtered ("%2d 0x8%03x %016llx%s\n", i, i, */ -/* OBSOLETE comm_registers.crreg.r4[i], */ -/* OBSOLETE (iscrlbit (comm_registers.crctl.lbits.cc, i) */ -/* OBSOLETE ? " locked" : "")); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Print the psw *x/ */ -/* OBSOLETE */ -/* OBSOLETE static void */ -/* OBSOLETE psw_info (arg) */ -/* OBSOLETE char *arg; */ -/* OBSOLETE { */ -/* OBSOLETE struct pswbit */ -/* OBSOLETE { */ -/* OBSOLETE int bit; */ -/* OBSOLETE int pos; */ -/* OBSOLETE char *text; */ -/* OBSOLETE }; */ -/* OBSOLETE */ -/* OBSOLETE static struct pswbit pswbit[] = */ -/* OBSOLETE { */ -/* OBSOLETE { 0x80000000, -1, "A carry" }, */ -/* OBSOLETE { 0x40000000, -1, "A integer overflow" }, */ -/* OBSOLETE { 0x20000000, -1, "A zero divide" }, */ -/* OBSOLETE { 0x10000000, -1, "Integer overflow enable" }, */ -/* OBSOLETE { 0x08000000, -1, "Trace" }, */ -/* OBSOLETE { 0x06000000, 25, "Frame length" }, */ -/* OBSOLETE { 0x01000000, -1, "Sequential" }, */ -/* OBSOLETE { 0x00800000, -1, "S carry" }, */ -/* OBSOLETE { 0x00400000, -1, "S integer overflow" }, */ -/* OBSOLETE { 0x00200000, -1, "S zero divide" }, */ -/* OBSOLETE { 0x00100000, -1, "Zero divide enable" }, */ -/* OBSOLETE { 0x00080000, -1, "Floating underflow" }, */ -/* OBSOLETE { 0x00040000, -1, "Floating overflow" }, */ -/* OBSOLETE { 0x00020000, -1, "Floating reserved operand" }, */ -/* OBSOLETE { 0x00010000, -1, "Floating zero divide" }, */ -/* OBSOLETE { 0x00008000, -1, "Floating error enable" }, */ -/* OBSOLETE { 0x00004000, -1, "Floating underflow enable" }, */ -/* OBSOLETE { 0x00002000, -1, "IEEE" }, */ -/* OBSOLETE { 0x00001000, -1, "Sequential stores" }, */ -/* OBSOLETE { 0x00000800, -1, "Intrinsic error" }, */ -/* OBSOLETE { 0x00000400, -1, "Intrinsic error enable" }, */ -/* OBSOLETE { 0x00000200, -1, "Trace thread creates" }, */ -/* OBSOLETE { 0x00000100, -1, "Thread init trap" }, */ -/* OBSOLETE { 0x000000e0, 5, "Reserved" }, */ -/* OBSOLETE { 0x0000001f, 0, "Intrinsic error code" }, */ -/* OBSOLETE {0, 0, 0}, */ -/* OBSOLETE }; */ -/* OBSOLETE */ -/* OBSOLETE long psw; */ -/* OBSOLETE struct pswbit *p; */ -/* OBSOLETE */ -/* OBSOLETE if (arg) */ -/* OBSOLETE psw = parse_and_eval_address (arg); */ -/* OBSOLETE else */ -/* OBSOLETE psw = read_register (PS_REGNUM); */ -/* OBSOLETE */ -/* OBSOLETE for (p = pswbit; p->bit; p++) */ -/* OBSOLETE { */ -/* OBSOLETE if (p->pos < 0) */ -/* OBSOLETE printf_filtered ("%08x %s %s\n", p->bit, */ -/* OBSOLETE (psw & p->bit) ? "yes" : "no ", p->text); */ -/* OBSOLETE else */ -/* OBSOLETE printf_filtered ("%08x %3d %s\n", p->bit, */ -/* OBSOLETE (psw & p->bit) >> p->pos, p->text); */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE #include "symtab.h" */ -/* OBSOLETE */ -/* OBSOLETE /* reg (fmt_field, inst_field) -- */ -/* OBSOLETE the {first,second,third} operand of instruction as fmt_field = [ijk] */ -/* OBSOLETE gets the value of the field from the [ijk] position of the instruction *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define reg(a,b) ((char (*)[3])(op[fmt->a]))[inst.f0.b] */ -/* OBSOLETE */ -/* OBSOLETE /* lit (fmt_field) -- field [ijk] is a literal (PSW, VL, eg) *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define lit(i) op[fmt->i] */ -/* OBSOLETE */ -/* OBSOLETE /* aj[j] -- name for A register j *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define aj ((char (*)[3])(op[A])) */ -/* OBSOLETE */ -/* OBSOLETE union inst { */ -/* OBSOLETE struct { */ -/* OBSOLETE unsigned : 7; */ -/* OBSOLETE unsigned i : 3; */ -/* OBSOLETE unsigned j : 3; */ -/* OBSOLETE unsigned k : 3; */ -/* OBSOLETE unsigned : 16; */ -/* OBSOLETE unsigned : 32; */ -/* OBSOLETE } f0; */ -/* OBSOLETE struct { */ -/* OBSOLETE unsigned : 8; */ -/* OBSOLETE unsigned indir : 1; */ -/* OBSOLETE unsigned len : 1; */ -/* OBSOLETE unsigned j : 3; */ -/* OBSOLETE unsigned k : 3; */ -/* OBSOLETE unsigned : 16; */ -/* OBSOLETE unsigned : 32; */ -/* OBSOLETE } f1; */ -/* OBSOLETE unsigned char byte[8]; */ -/* OBSOLETE unsigned short half[4]; */ -/* OBSOLETE char signed_byte[8]; */ -/* OBSOLETE short signed_half[4]; */ -/* OBSOLETE }; */ -/* OBSOLETE */ -/* OBSOLETE struct opform { */ -/* OBSOLETE int mask; /* opcode mask *x/ */ -/* OBSOLETE int shift; /* opcode align *x/ */ -/* OBSOLETE struct formstr *formstr[3]; /* ST, E0, E1 *x/ */ -/* OBSOLETE }; */ -/* OBSOLETE */ -/* OBSOLETE struct formstr { */ -/* OBSOLETE unsigned lop:8, rop:5; /* opcode *x/ */ -/* OBSOLETE unsigned fmt:5; /* inst format *x/ */ -/* OBSOLETE unsigned i:5, j:5, k:2; /* operand formats *x/ */ -/* OBSOLETE }; */ -/* OBSOLETE */ -/* OBSOLETE #include "opcode/convex.h" */ -/* OBSOLETE */ -/* OBSOLETE CONST unsigned char formdecode [] = { */ -/* OBSOLETE 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, */ -/* OBSOLETE 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, */ -/* OBSOLETE 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, */ -/* OBSOLETE 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, */ -/* OBSOLETE 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, */ -/* OBSOLETE 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, */ -/* OBSOLETE 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, */ -/* OBSOLETE 4,4,4,4,4,4,4,4,5,5,5,5,6,6,7,8, */ -/* OBSOLETE 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, */ -/* OBSOLETE 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, */ -/* OBSOLETE 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, */ -/* OBSOLETE 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, */ -/* OBSOLETE 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, */ -/* OBSOLETE 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, */ -/* OBSOLETE 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, */ -/* OBSOLETE 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, */ -/* OBSOLETE }; */ -/* OBSOLETE */ -/* OBSOLETE CONST struct opform opdecode[] = { */ -/* OBSOLETE 0x7e00, 9, format0, e0_format0, e1_format0, */ -/* OBSOLETE 0x3f00, 8, format1, e0_format1, e1_format1, */ -/* OBSOLETE 0x1fc0, 6, format2, e0_format2, e1_format2, */ -/* OBSOLETE 0x0fc0, 6, format3, e0_format3, e1_format3, */ -/* OBSOLETE 0x0700, 8, format4, e0_format4, e1_format4, */ -/* OBSOLETE 0x03c0, 6, format5, e0_format5, e1_format5, */ -/* OBSOLETE 0x01f8, 3, format6, e0_format6, e1_format6, */ -/* OBSOLETE 0x00f8, 3, format7, e0_format7, e1_format7, */ -/* OBSOLETE 0x0000, 0, formatx, formatx, formatx, */ -/* OBSOLETE 0x0f80, 7, formatx, formatx, formatx, */ -/* OBSOLETE 0x0f80, 7, formatx, formatx, formatx, */ -/* OBSOLETE }; */ -/* OBSOLETE */ -/* OBSOLETE /* Print the instruction at address MEMADDR in debugged memory, */ -/* OBSOLETE on STREAM. Returns length of the instruction, in bytes. *x/ */ -/* OBSOLETE */ -/* OBSOLETE int */ -/* OBSOLETE convex_print_insn (memaddr, stream) */ -/* OBSOLETE CORE_ADDR memaddr; */ -/* OBSOLETE FILE *stream; */ -/* OBSOLETE { */ -/* OBSOLETE union inst inst; */ -/* OBSOLETE struct formstr *fmt; */ -/* OBSOLETE register int format, op1, pfx; */ -/* OBSOLETE int l; */ -/* OBSOLETE */ -/* OBSOLETE read_memory (memaddr, &inst, sizeof inst); */ -/* OBSOLETE */ -/* OBSOLETE /* Remove and note prefix, if present *x/ */ -/* OBSOLETE */ -/* OBSOLETE pfx = inst.half[0]; */ -/* OBSOLETE if ((pfx & 0xfff0) == 0x7ef0) */ -/* OBSOLETE { */ -/* OBSOLETE pfx = ((pfx >> 3) & 1) + 1; */ -/* OBSOLETE *(long long *) &inst = *(long long *) &inst.half[1]; */ -/* OBSOLETE } */ -/* OBSOLETE else pfx = 0; */ -/* OBSOLETE */ -/* OBSOLETE /* Split opcode into format.op1 and look up in appropriate table *x/ */ -/* OBSOLETE */ -/* OBSOLETE format = formdecode[inst.byte[0]]; */ -/* OBSOLETE op1 = (inst.half[0] & opdecode[format].mask) >> opdecode[format].shift; */ -/* OBSOLETE if (format == 9) */ -/* OBSOLETE { */ -/* OBSOLETE if (pfx) */ -/* OBSOLETE fmt = formatx; */ -/* OBSOLETE else if (inst.f1.j == 0) */ -/* OBSOLETE fmt = &format1a[op1]; */ -/* OBSOLETE else if (inst.f1.j == 1) */ -/* OBSOLETE fmt = &format1b[op1]; */ -/* OBSOLETE else */ -/* OBSOLETE fmt = formatx; */ -/* OBSOLETE } */ -/* OBSOLETE else */ -/* OBSOLETE fmt = &opdecode[format].formstr[pfx][op1]; */ -/* OBSOLETE */ -/* OBSOLETE /* Print it *x/ */ -/* OBSOLETE */ -/* OBSOLETE if (fmt->fmt == xxx) */ -/* OBSOLETE { */ -/* OBSOLETE /* noninstruction *x/ */ -/* OBSOLETE fprintf (stream, "0x%04x", pfx ? pfx : inst.half[0]); */ -/* OBSOLETE return 2; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE if (pfx) */ -/* OBSOLETE pfx = 2; */ -/* OBSOLETE */ -/* OBSOLETE fprintf (stream, "%s%s%s", lop[fmt->lop], rop[fmt->rop], */ -/* OBSOLETE &" "[strlen(lop[fmt->lop]) + strlen(rop[fmt->rop])]); */ -/* OBSOLETE */ -/* OBSOLETE switch (fmt->fmt) */ -/* OBSOLETE { */ -/* OBSOLETE case rrr: /* three register *x/ */ -/* OBSOLETE fprintf (stream, "%s,%s,%s", reg(i,i), reg(j,j), reg(k,k)); */ -/* OBSOLETE return pfx + 2; */ -/* OBSOLETE */ -/* OBSOLETE case rr: /* two register *x/ */ -/* OBSOLETE fprintf (stream, "%s,%s", reg(i,j), reg(j,k)); */ -/* OBSOLETE return pfx + 2; */ -/* OBSOLETE */ -/* OBSOLETE case rxr: /* two register, reversed i and j fields *x/ */ -/* OBSOLETE fprintf (stream, "%s,%s", reg(i,k), reg(j,j)); */ -/* OBSOLETE return pfx + 2; */ -/* OBSOLETE */ -/* OBSOLETE case r: /* one register *x/ */ -/* OBSOLETE fprintf (stream, "%s", reg(i,k)); */ -/* OBSOLETE return pfx + 2; */ -/* OBSOLETE */ -/* OBSOLETE case nops: /* no operands *x/ */ -/* OBSOLETE return pfx + 2; */ -/* OBSOLETE */ -/* OBSOLETE case nr: /* short immediate, one register *x/ */ -/* OBSOLETE fprintf (stream, "#%d,%s", inst.f0.j, reg(i,k)); */ -/* OBSOLETE return pfx + 2; */ -/* OBSOLETE */ -/* OBSOLETE case pcrel: /* pc relative *x/ */ -/* OBSOLETE print_address (memaddr + 2 * inst.signed_byte[1], stream); */ -/* OBSOLETE return pfx + 2; */ -/* OBSOLETE */ -/* OBSOLETE case lr: /* literal, one register *x/ */ -/* OBSOLETE fprintf (stream, "%s,%s", lit(i), reg(j,k)); */ -/* OBSOLETE return pfx + 2; */ -/* OBSOLETE */ -/* OBSOLETE case rxl: /* one register, literal *x/ */ -/* OBSOLETE fprintf (stream, "%s,%s", reg(i,k), lit(j)); */ -/* OBSOLETE return pfx + 2; */ -/* OBSOLETE */ -/* OBSOLETE case rlr: /* register, literal, register *x/ */ -/* OBSOLETE fprintf (stream, "%s,%s,%s", reg(i,j), lit(j), reg(k,k)); */ -/* OBSOLETE return pfx + 2; */ -/* OBSOLETE */ -/* OBSOLETE case rrl: /* register, register, literal *x/ */ -/* OBSOLETE fprintf (stream, "%s,%s,%s", reg(i,j), reg(j,k), lit(k)); */ -/* OBSOLETE return pfx + 2; */ -/* OBSOLETE */ -/* OBSOLETE case iml: /* immediate, literal *x/ */ -/* OBSOLETE if (inst.f1.len) */ -/* OBSOLETE { */ -/* OBSOLETE fprintf (stream, "#%#x,%s", */ -/* OBSOLETE (inst.signed_half[1] << 16) + inst.half[2], lit(i)); */ -/* OBSOLETE return pfx + 6; */ -/* OBSOLETE } */ -/* OBSOLETE else */ -/* OBSOLETE { */ -/* OBSOLETE fprintf (stream, "#%d,%s", inst.signed_half[1], lit(i)); */ -/* OBSOLETE return pfx + 4; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE case imr: /* immediate, register *x/ */ -/* OBSOLETE if (inst.f1.len) */ -/* OBSOLETE { */ -/* OBSOLETE fprintf (stream, "#%#x,%s", */ -/* OBSOLETE (inst.signed_half[1] << 16) + inst.half[2], reg(i,k)); */ -/* OBSOLETE return pfx + 6; */ -/* OBSOLETE } */ -/* OBSOLETE else */ -/* OBSOLETE { */ -/* OBSOLETE fprintf (stream, "#%d,%s", inst.signed_half[1], reg(i,k)); */ -/* OBSOLETE return pfx + 4; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE case a1r: /* memory, register *x/ */ -/* OBSOLETE l = print_effa (inst, stream); */ -/* OBSOLETE fprintf (stream, ",%s", reg(i,k)); */ -/* OBSOLETE return pfx + l; */ -/* OBSOLETE */ -/* OBSOLETE case a1l: /* memory, literal *x/ */ -/* OBSOLETE l = print_effa (inst, stream); */ -/* OBSOLETE fprintf (stream, ",%s", lit(i)); */ -/* OBSOLETE return pfx + l; */ -/* OBSOLETE */ -/* OBSOLETE case a2r: /* register, memory *x/ */ -/* OBSOLETE fprintf (stream, "%s,", reg(i,k)); */ -/* OBSOLETE return pfx + print_effa (inst, stream); */ -/* OBSOLETE */ -/* OBSOLETE case a2l: /* literal, memory *x/ */ -/* OBSOLETE fprintf (stream, "%s,", lit(i)); */ -/* OBSOLETE return pfx + print_effa (inst, stream); */ -/* OBSOLETE */ -/* OBSOLETE case a3: /* memory *x/ */ -/* OBSOLETE return pfx + print_effa (inst, stream); */ -/* OBSOLETE */ -/* OBSOLETE case a4: /* system call *x/ */ -/* OBSOLETE l = 29; goto a4a5; */ -/* OBSOLETE case a5: /* trap *x/ */ -/* OBSOLETE l = 27; */ -/* OBSOLETE a4a5: */ -/* OBSOLETE if (inst.f1.len) */ -/* OBSOLETE { */ -/* OBSOLETE unsigned int m = (inst.signed_half[1] << 16) + inst.half[2]; */ -/* OBSOLETE fprintf (stream, "#%d,#%d", m >> l, m & (-1 >> (32-l))); */ -/* OBSOLETE return pfx + 6; */ -/* OBSOLETE } */ -/* OBSOLETE else */ -/* OBSOLETE { */ -/* OBSOLETE unsigned int m = inst.signed_half[1]; */ -/* OBSOLETE fprintf (stream, "#%d,#%d", m >> l, m & (-1 >> (32-l))); */ -/* OBSOLETE return pfx + 4; */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE */ -/* OBSOLETE /* print effective address @nnn(aj), return instruction length *x/ */ -/* OBSOLETE */ -/* OBSOLETE int print_effa (inst, stream) */ -/* OBSOLETE union inst inst; */ -/* OBSOLETE FILE *stream; */ -/* OBSOLETE { */ -/* OBSOLETE int n, l; */ -/* OBSOLETE */ -/* OBSOLETE if (inst.f1.len) */ -/* OBSOLETE { */ -/* OBSOLETE n = (inst.signed_half[1] << 16) + inst.half[2]; */ -/* OBSOLETE l = 6; */ -/* OBSOLETE } */ -/* OBSOLETE else */ -/* OBSOLETE { */ -/* OBSOLETE n = inst.signed_half[1]; */ -/* OBSOLETE l = 4; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE if (inst.f1.indir) */ -/* OBSOLETE printf ("@"); */ -/* OBSOLETE */ -/* OBSOLETE if (!inst.f1.j) */ -/* OBSOLETE { */ -/* OBSOLETE print_address (n, stream); */ -/* OBSOLETE return l; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE fprintf (stream, (n & 0xf0000000) == 0x80000000 ? "%#x(%s)" : "%d(%s)", */ -/* OBSOLETE n, aj[inst.f1.j]); */ -/* OBSOLETE */ -/* OBSOLETE return l; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE */ -/* OBSOLETE void */ -/* OBSOLETE _initialize_convex_dep () */ -/* OBSOLETE { */ -/* OBSOLETE add_com ("alias", class_support, alias_command, */ -/* OBSOLETE "Add a new name for an existing command."); */ -/* OBSOLETE */ -/* OBSOLETE add_cmd ("base", class_vars, set_base_command, */ -/* OBSOLETE "Change the integer output radix to 8, 10 or 16\n\ */ -/* OBSOLETE or use just `set base' with no args to return to the ad-hoc default,\n\ */ -/* OBSOLETE which is 16 for integers that look like addresses, 10 otherwise.", */ -/* OBSOLETE &setlist); */ -/* OBSOLETE */ -/* OBSOLETE add_cmd ("pipeline", class_run, set_pipelining_command, */ -/* OBSOLETE "Enable or disable overlapped execution of instructions.\n\ */ -/* OBSOLETE With `set pipe off', exceptions are reported with\n\ */ -/* OBSOLETE $pc pointing at the instruction after the faulting one.\n\ */ -/* OBSOLETE The default is `set pipe on', which runs faster.", */ -/* OBSOLETE &setlist); */ -/* OBSOLETE */ -/* OBSOLETE add_cmd ("parallel", class_run, set_parallel_command, */ -/* OBSOLETE "Enable or disable multi-threaded execution of parallel code.\n\ */ -/* OBSOLETE `set parallel off' means run the program on a single CPU.\n\ */ -/* OBSOLETE `set parallel fixed' means run the program with all CPUs assigned to it.\n\ */ -/* OBSOLETE `set parallel on' means run the program on any CPUs that are available.", */ -/* OBSOLETE &setlist); */ -/* OBSOLETE */ -/* OBSOLETE add_com ("1cont", class_run, one_cont_command, */ -/* OBSOLETE "Continue the program, activating only the current thread.\n\ */ -/* OBSOLETE Args are the same as the `cont' command."); */ -/* OBSOLETE */ -/* OBSOLETE add_com ("thread", class_run, set_thread_command, */ -/* OBSOLETE "Change the current thread, the one under scrutiny and control.\n\ */ -/* OBSOLETE With no arg, show the active threads, the current one marked with *."); */ -/* OBSOLETE */ -/* OBSOLETE add_info ("threads", thread_info, */ -/* OBSOLETE "List status of active threads."); */ -/* OBSOLETE */ -/* OBSOLETE add_info ("comm-registers", comm_registers_info, */ -/* OBSOLETE "List communication registers and their contents.\n\ */ -/* OBSOLETE A communication register name as argument means describe only that register.\n\ */ -/* OBSOLETE An address as argument means describe the resource structure at that address.\n\ */ -/* OBSOLETE `Locked' means that the register has been sent to but not yet received from."); */ -/* OBSOLETE */ -/* OBSOLETE add_info ("psw", psw_info, */ -/* OBSOLETE "Display $ps, the processor status word, bit by bit.\n\ */ -/* OBSOLETE An argument means display that value's interpretation as a psw."); */ -/* OBSOLETE */ -/* OBSOLETE add_cmd ("convex", no_class, 0, "Convex-specific commands.\n\ */ -/* OBSOLETE 32-bit registers $pc $ps $sp $ap $fp $a1-5 $s0-7 $v0-7 $vl $vs $vm $c0-63\n\ */ -/* OBSOLETE 64-bit registers $S0-7 $V0-7 $C0-63\n\ */ -/* OBSOLETE \n\ */ -/* OBSOLETE info threads display info on stopped threads waiting to signal\n\ */ -/* OBSOLETE thread display list of active threads\n\ */ -/* OBSOLETE thread N select thread N (its registers, stack, memory, etc.)\n\ */ -/* OBSOLETE step, next, etc step selected thread only\n\ */ -/* OBSOLETE 1cont continue selected thread only\n\ */ -/* OBSOLETE cont continue all threads\n\ */ -/* OBSOLETE info comm-registers display contents of comm register(s) or a resource struct\n\ */ -/* OBSOLETE info psw display processor status word $ps\n\ */ -/* OBSOLETE set base N change integer radix used by `print' without a format\n\ */ -/* OBSOLETE set pipeline off exceptions are precise, $pc points after the faulting insn\n\ */ -/* OBSOLETE set pipeline on normal mode, $pc is somewhere ahead of faulting insn\n\ */ -/* OBSOLETE set parallel off program runs on a single CPU\n\ */ -/* OBSOLETE set parallel fixed all CPUs are assigned to the program\n\ */ -/* OBSOLETE set parallel on normal mode, parallel execution on random available CPUs\n\ */ -/* OBSOLETE ", */ -/* OBSOLETE &cmdlist); */ -/* OBSOLETE */ -/* OBSOLETE } */ diff --git a/gdb/convex-xdep.c b/gdb/convex-xdep.c deleted file mode 100644 index ea9fcd5..0000000 --- a/gdb/convex-xdep.c +++ /dev/null @@ -1,963 +0,0 @@ -/* OBSOLETE /* Convex host-dependent code for GDB. */ -/* OBSOLETE Copyright 1990, 1991, 1992 Free Software Foundation, Inc. */ -/* OBSOLETE */ -/* OBSOLETE This file is part of GDB. */ -/* OBSOLETE */ -/* OBSOLETE This program is free software; you can redistribute it and/or modify */ -/* OBSOLETE it under the terms of the GNU General Public License as published by */ -/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */ -/* OBSOLETE (at your option) any later version. */ -/* OBSOLETE */ -/* OBSOLETE This program is distributed in the hope that it will be useful, */ -/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */ -/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ -/* OBSOLETE GNU General Public License for more details. */ -/* OBSOLETE */ -/* OBSOLETE You should have received a copy of the GNU General Public License */ -/* OBSOLETE along with this program; if not, write to the Free Software */ -/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #include "defs.h" */ -/* OBSOLETE #include "command.h" */ -/* OBSOLETE #include "symtab.h" */ -/* OBSOLETE #include "value.h" */ -/* OBSOLETE #include "frame.h" */ -/* OBSOLETE #include "inferior.h" */ -/* OBSOLETE #include "gdb_wait.h" */ -/* OBSOLETE */ -/* OBSOLETE #include <signal.h> */ -/* OBSOLETE #include <fcntl.h> */ -/* OBSOLETE #include "gdbcore.h" */ -/* OBSOLETE */ -/* OBSOLETE #include <sys/param.h> */ -/* OBSOLETE #include <sys/dir.h> */ -/* OBSOLETE #include <sys/user.h> */ -/* OBSOLETE #include <sys/ioctl.h> */ -/* OBSOLETE #include <sys/pcntl.h> */ -/* OBSOLETE #include <sys/thread.h> */ -/* OBSOLETE #include <sys/proc.h> */ -/* OBSOLETE #include <sys/file.h> */ -/* OBSOLETE #include "gdb_stat.h" */ -/* OBSOLETE #include <sys/mman.h> */ -/* OBSOLETE */ -/* OBSOLETE #include <convex/vmparam.h> */ -/* OBSOLETE #include <convex/filehdr.h> */ -/* OBSOLETE #include <convex/opthdr.h> */ -/* OBSOLETE #include <convex/scnhdr.h> */ -/* OBSOLETE #include <convex/core.h> */ -/* OBSOLETE */ -/* OBSOLETE /* Per-thread data, read from the inferior at each stop and written */ -/* OBSOLETE back at each resume. *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* Number of active threads. */ -/* OBSOLETE Tables are valid for thread numbers less than this. *x/ */ -/* OBSOLETE */ -/* OBSOLETE static int n_threads; */ -/* OBSOLETE */ -/* OBSOLETE #define MAXTHREADS 8 */ -/* OBSOLETE */ -/* OBSOLETE /* Thread state. The remaining data is valid only if this is PI_TALIVE. *x/ */ -/* OBSOLETE */ -/* OBSOLETE static int thread_state[MAXTHREADS]; */ -/* OBSOLETE */ -/* OBSOLETE /* Stop pc, signal, signal subcode *x/ */ -/* OBSOLETE */ -/* OBSOLETE static int thread_pc[MAXTHREADS]; */ -/* OBSOLETE static int thread_signal[MAXTHREADS]; */ -/* OBSOLETE static int thread_sigcode[MAXTHREADS]; */ -/* OBSOLETE */ -/* OBSOLETE /* Thread registers. */ -/* OBSOLETE If thread is selected, the regs are in registers[] instead. *x/ */ -/* OBSOLETE */ -/* OBSOLETE static char thread_regs[MAXTHREADS][REGISTER_BYTES]; */ -/* OBSOLETE */ -/* OBSOLETE /* 1 if the top frame on the thread's stack was a context frame, */ -/* OBSOLETE meaning that the kernel is up to something and we should not */ -/* OBSOLETE touch the thread at all except to resume it. *x/ */ -/* OBSOLETE */ -/* OBSOLETE static char thread_is_in_kernel[MAXTHREADS]; */ -/* OBSOLETE */ -/* OBSOLETE /* The currently selected thread's number. *x/ */ -/* OBSOLETE */ -/* OBSOLETE static int inferior_thread; */ -/* OBSOLETE */ -/* OBSOLETE /* Inferior process's file handle and a process control block */ -/* OBSOLETE to feed args to ioctl with. *x/ */ -/* OBSOLETE */ -/* OBSOLETE static int inferior_fd; */ -/* OBSOLETE static struct pcntl ps; */ -/* OBSOLETE */ -/* OBSOLETE /* SOFF file headers for exec or core file. *x/ */ -/* OBSOLETE */ -/* OBSOLETE static FILEHDR filehdr; */ -/* OBSOLETE static OPTHDR opthdr; */ -/* OBSOLETE static SCNHDR scnhdr; */ -/* OBSOLETE */ -/* OBSOLETE /* Address maps constructed from section headers of exec and core files. */ -/* OBSOLETE Defines process address -> file address translation. *x/ */ -/* OBSOLETE */ -/* OBSOLETE struct pmap */ -/* OBSOLETE { */ -/* OBSOLETE long mem_addr; /* process start address *x/ */ -/* OBSOLETE long mem_end; /* process end+1 address *x/ */ -/* OBSOLETE long file_addr; /* file start address *x/ */ -/* OBSOLETE long thread; /* -1 shared; 0,1,... thread-local *x/ */ -/* OBSOLETE long type; /* S_TEXT S_DATA S_BSS S_TBSS etc *x/ */ -/* OBSOLETE long which; /* used to sort map for info files *x/ */ -/* OBSOLETE }; */ -/* OBSOLETE */ -/* OBSOLETE static int n_exec, n_core; */ -/* OBSOLETE static struct pmap exec_map[100]; */ -/* OBSOLETE static struct pmap core_map[100]; */ -/* OBSOLETE */ -/* OBSOLETE /* Offsets in the core file of core_context and core_tcontext blocks. *x/ */ -/* OBSOLETE */ -/* OBSOLETE static int context_offset; */ -/* OBSOLETE static int tcontext_offset[MAXTHREADS]; */ -/* OBSOLETE */ -/* OBSOLETE /* Core file control blocks. *x/ */ -/* OBSOLETE */ -/* OBSOLETE static struct core_context_v70 c; */ -/* OBSOLETE static struct core_tcontext_v70 tc; */ -/* OBSOLETE static struct user u; */ -/* OBSOLETE static thread_t th; */ -/* OBSOLETE static proc_t pr; */ -/* OBSOLETE */ -/* OBSOLETE */ -/* OBSOLETE /* Vector and communication registers from core dump or from inferior. */ -/* OBSOLETE These are read on demand, ie, not normally valid. *x/ */ -/* OBSOLETE */ -/* OBSOLETE static struct vecst vector_registers; */ -/* OBSOLETE static struct creg_ctx comm_registers; */ -/* OBSOLETE */ -/* OBSOLETE /* Flag, set on a vanilla CONT command and cleared when the inferior */ -/* OBSOLETE is continued. *x/ */ -/* OBSOLETE */ -/* OBSOLETE static int all_continue; */ -/* OBSOLETE */ -/* OBSOLETE /* Flag, set when the inferior is continued by a vanilla CONT command, */ -/* OBSOLETE cleared if it is continued for any other purpose. *x/ */ -/* OBSOLETE */ -/* OBSOLETE static int thread_switch_ok; */ -/* OBSOLETE */ -/* OBSOLETE /* Stack of signals recieved from threads but not yet delivered to gdb. *x/ */ -/* OBSOLETE */ -/* OBSOLETE struct threadpid */ -/* OBSOLETE { */ -/* OBSOLETE int pid; */ -/* OBSOLETE int thread; */ -/* OBSOLETE int signo; */ -/* OBSOLETE int subsig; */ -/* OBSOLETE int pc; */ -/* OBSOLETE }; */ -/* OBSOLETE */ -/* OBSOLETE static struct threadpid signal_stack_bot[100]; */ -/* OBSOLETE static struct threadpid *signal_stack = signal_stack_bot; */ -/* OBSOLETE */ -/* OBSOLETE /* How to detect empty stack -- bottom frame is all zero. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define signal_stack_is_empty() (signal_stack->pid == 0) */ -/* OBSOLETE */ -/* OBSOLETE /* Mode controlled by SET PIPE command, controls the psw SEQ bit */ -/* OBSOLETE which forces each instruction to complete before the next one starts. *x/ */ -/* OBSOLETE */ -/* OBSOLETE static int sequential = 0; */ -/* OBSOLETE */ -/* OBSOLETE /* Mode controlled by the SET PARALLEL command. Values are: */ -/* OBSOLETE 0 concurrency limit 1 thread, dynamic scheduling */ -/* OBSOLETE 1 no concurrency limit, dynamic scheduling */ -/* OBSOLETE 2 no concurrency limit, fixed scheduling *x/ */ -/* OBSOLETE */ -/* OBSOLETE static int parallel = 1; */ -/* OBSOLETE */ -/* OBSOLETE /* Mode controlled by SET BASE command, output radix for unformatted */ -/* OBSOLETE integer typeout, as in argument lists, aggregates, and so on. */ -/* OBSOLETE Zero means guess whether it's an address (hex) or not (decimal). *x/ */ -/* OBSOLETE */ -/* OBSOLETE static int output_radix = 0; */ -/* OBSOLETE */ -/* OBSOLETE /* Signal subcode at last thread stop. *x/ */ -/* OBSOLETE */ -/* OBSOLETE static int stop_sigcode; */ -/* OBSOLETE */ -/* OBSOLETE /* Hack, see wait() below. *x/ */ -/* OBSOLETE */ -/* OBSOLETE static int exec_trap_timer; */ -/* OBSOLETE */ -/* OBSOLETE #include "gdbcmd.h" */ -/* OBSOLETE */ -/* OBSOLETE static struct type *vector_type (); */ -/* OBSOLETE static long *read_vector_register (); */ -/* OBSOLETE static long *read_vector_register_1 (); */ -/* OBSOLETE static void write_vector_register (); */ -/* OBSOLETE static ULONGEST read_comm_register (); */ -/* OBSOLETE static void write_comm_register (); */ -/* OBSOLETE static void convex_cont_command (); */ -/* OBSOLETE static void thread_continue (); */ -/* OBSOLETE static void select_thread (); */ -/* OBSOLETE static void scan_stack (); */ -/* OBSOLETE static void set_fixed_scheduling (); */ -/* OBSOLETE static char *subsig_name (); */ -/* OBSOLETE static void psw_info (); */ -/* OBSOLETE static sig_noop (); */ -/* OBSOLETE static ptr_cmp (); */ -/* OBSOLETE */ -/* OBSOLETE */ -/* OBSOLETE /* Execute ptrace. Convex V7 replaced ptrace with pattach. */ -/* OBSOLETE Allow ptrace (0) as a no-op. *x/ */ -/* OBSOLETE */ -/* OBSOLETE int */ -/* OBSOLETE call_ptrace (request, pid, procaddr, buf) */ -/* OBSOLETE int request, pid; */ -/* OBSOLETE PTRACE_ARG3_TYPE procaddr; */ -/* OBSOLETE int buf; */ -/* OBSOLETE { */ -/* OBSOLETE if (request == 0) */ -/* OBSOLETE return; */ -/* OBSOLETE error ("no ptrace"); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Replacement for system execle routine. */ -/* OBSOLETE Convert it to an equivalent exect, which pattach insists on. *x/ */ -/* OBSOLETE */ -/* OBSOLETE execle (name, argv) */ -/* OBSOLETE char *name, *argv; */ -/* OBSOLETE { */ -/* OBSOLETE char ***envp = (char ***) &argv; */ -/* OBSOLETE while (*envp++) ; */ -/* OBSOLETE */ -/* OBSOLETE signal (SIGTRAP, sig_noop); */ -/* OBSOLETE exect (name, &argv, *envp); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Stupid handler for stupid trace trap that otherwise causes */ -/* OBSOLETE startup to stupidly hang. *x/ */ -/* OBSOLETE */ -/* OBSOLETE static sig_noop () */ -/* OBSOLETE {} */ -/* OBSOLETE */ -/* OBSOLETE /* Read registers from inferior into registers[] array. */ -/* OBSOLETE For convex, they are already there, read in when the inferior stops. *x/ */ -/* OBSOLETE */ -/* OBSOLETE void */ -/* OBSOLETE fetch_inferior_registers (regno) */ -/* OBSOLETE int regno; */ -/* OBSOLETE { */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Store our register values back into the inferior. */ -/* OBSOLETE For Convex, do this only once, right before resuming inferior. *x/ */ -/* OBSOLETE */ -/* OBSOLETE void */ -/* OBSOLETE store_inferior_registers (regno) */ -/* OBSOLETE int regno; */ -/* OBSOLETE { */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Copy LEN bytes from inferior's memory starting at MEMADDR */ -/* OBSOLETE to debugger memory starting at MYADDR. */ -/* OBSOLETE On failure (cannot read from inferior, usually because address is out */ -/* OBSOLETE of bounds) returns the value of errno. *x/ */ -/* OBSOLETE */ -/* OBSOLETE int */ -/* OBSOLETE read_inferior_memory (memaddr, myaddr, len) */ -/* OBSOLETE CORE_ADDR memaddr; */ -/* OBSOLETE char *myaddr; */ -/* OBSOLETE int len; */ -/* OBSOLETE { */ -/* OBSOLETE errno = 0; */ -/* OBSOLETE while (len > 0) */ -/* OBSOLETE { */ -/* OBSOLETE /* little-known undocumented max request size *x/ */ -/* OBSOLETE int i = (len < 12288) ? len : 12288; */ -/* OBSOLETE */ -/* OBSOLETE lseek (inferior_fd, memaddr, 0); */ -/* OBSOLETE read (inferior_fd, myaddr, i); */ -/* OBSOLETE */ -/* OBSOLETE memaddr += i; */ -/* OBSOLETE myaddr += i; */ -/* OBSOLETE len -= i; */ -/* OBSOLETE } */ -/* OBSOLETE if (errno) */ -/* OBSOLETE memset (myaddr, '\0', len); */ -/* OBSOLETE return errno; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Copy LEN bytes of data from debugger memory at MYADDR */ -/* OBSOLETE to inferior's memory at MEMADDR. */ -/* OBSOLETE Returns errno on failure (cannot write the inferior) *x/ */ -/* OBSOLETE */ -/* OBSOLETE int */ -/* OBSOLETE write_inferior_memory (memaddr, myaddr, len) */ -/* OBSOLETE CORE_ADDR memaddr; */ -/* OBSOLETE char *myaddr; */ -/* OBSOLETE int len; */ -/* OBSOLETE { */ -/* OBSOLETE errno = 0; */ -/* OBSOLETE lseek (inferior_fd, memaddr, 0); */ -/* OBSOLETE write (inferior_fd, myaddr, len); */ -/* OBSOLETE return errno; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Here from create_inferior when the inferior process has been created */ -/* OBSOLETE and started up. We must do a pattach to grab it for debugging. */ -/* OBSOLETE */ -/* OBSOLETE Also, intercept the CONT command by altering its dispatch address. *x/ */ -/* OBSOLETE /* FIXME: This used to be called from a macro CREATE_INFERIOR_HOOK. */ -/* OBSOLETE But now init_trace_fun is in the same place. So re-write this to */ -/* OBSOLETE use the init_trace_fun (making convex a debugging target). *x/ */ -/* OBSOLETE */ -/* OBSOLETE create_inferior_hook (pid) */ -/* OBSOLETE int pid; */ -/* OBSOLETE { */ -/* OBSOLETE static char cont[] = "cont"; */ -/* OBSOLETE static char cont1[] = "c"; */ -/* OBSOLETE char *linep = cont; */ -/* OBSOLETE char *linep1 = cont1; */ -/* OBSOLETE char **line = &linep; */ -/* OBSOLETE char **line1 = &linep1; */ -/* OBSOLETE struct cmd_list_element *c; */ -/* OBSOLETE */ -/* OBSOLETE c = lookup_cmd (line, cmdlist, "", 0); */ -/* OBSOLETE c->function = convex_cont_command; */ -/* OBSOLETE c = lookup_cmd (line1, cmdlist, "", 0); */ -/* OBSOLETE c->function = convex_cont_command; */ -/* OBSOLETE */ -/* OBSOLETE inferior_fd = pattach (pid, O_EXCL); */ -/* OBSOLETE if (inferior_fd < 0) */ -/* OBSOLETE perror_with_name ("pattach"); */ -/* OBSOLETE inferior_thread = 0; */ -/* OBSOLETE set_fixed_scheduling (pid, parallel == 2); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Attach process PID for debugging. *x/ */ -/* OBSOLETE */ -/* OBSOLETE attach (pid) */ -/* OBSOLETE int pid; */ -/* OBSOLETE { */ -/* OBSOLETE int fd = pattach (pid, O_EXCL); */ -/* OBSOLETE if (fd < 0) */ -/* OBSOLETE perror_with_name ("pattach"); */ -/* OBSOLETE attach_flag = 1; */ -/* OBSOLETE /* wait for strange kernel reverberations to go away *x/ */ -/* OBSOLETE sleep (1); */ -/* OBSOLETE */ -/* OBSOLETE setpgrp (pid, pid); */ -/* OBSOLETE */ -/* OBSOLETE inferior_fd = fd; */ -/* OBSOLETE inferior_thread = 0; */ -/* OBSOLETE return pid; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Stop debugging the process whose number is PID */ -/* OBSOLETE and continue it with signal number SIGNAL. */ -/* OBSOLETE SIGNAL = 0 means just continue it. *x/ */ -/* OBSOLETE */ -/* OBSOLETE void */ -/* OBSOLETE detach (signal) */ -/* OBSOLETE int signal; */ -/* OBSOLETE { */ -/* OBSOLETE signal_stack = signal_stack_bot; */ -/* OBSOLETE thread_continue (-1, 0, signal); */ -/* OBSOLETE ioctl (inferior_fd, PIXDETACH, &ps); */ -/* OBSOLETE close (inferior_fd); */ -/* OBSOLETE inferior_fd = 0; */ -/* OBSOLETE attach_flag = 0; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Kill off the inferior process. *x/ */ -/* OBSOLETE */ -/* OBSOLETE kill_inferior () */ -/* OBSOLETE { */ -/* OBSOLETE if (inferior_pid == 0) */ -/* OBSOLETE return; */ -/* OBSOLETE ioctl (inferior_fd, PIXTERMINATE, 0); */ -/* OBSOLETE wait (0); */ -/* OBSOLETE target_mourn_inferior (); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Read vector register REG, and return a pointer to the value. *x/ */ -/* OBSOLETE */ -/* OBSOLETE static long * */ -/* OBSOLETE read_vector_register (reg) */ -/* OBSOLETE int reg; */ -/* OBSOLETE { */ -/* OBSOLETE if (have_inferior_p ()) */ -/* OBSOLETE { */ -/* OBSOLETE errno = 0; */ -/* OBSOLETE ps.pi_buffer = (char *) &vector_registers; */ -/* OBSOLETE ps.pi_nbytes = sizeof vector_registers; */ -/* OBSOLETE ps.pi_offset = 0; */ -/* OBSOLETE ps.pi_thread = inferior_thread; */ -/* OBSOLETE ioctl (inferior_fd, PIXRDVREGS, &ps); */ -/* OBSOLETE if (errno) */ -/* OBSOLETE memset (&vector_registers, '\0', sizeof vector_registers); */ -/* OBSOLETE } */ -/* OBSOLETE else if (corechan >= 0) */ -/* OBSOLETE { */ -/* OBSOLETE lseek (corechan, tcontext_offset[inferior_thread], 0); */ -/* OBSOLETE if (myread (corechan, &tc, sizeof tc) < 0) */ -/* OBSOLETE perror_with_name (corefile); */ -/* OBSOLETE lseek (corechan, tc.core_thread_p, 0); */ -/* OBSOLETE if (myread (corechan, &th, sizeof th) < 0) */ -/* OBSOLETE perror_with_name (corefile); */ -/* OBSOLETE lseek (corechan, tc.core_vregs_p, 0); */ -/* OBSOLETE if (myread (corechan, &vector_registers, 16*128) < 0) */ -/* OBSOLETE perror_with_name (corefile); */ -/* OBSOLETE vector_registers.vm[0] = th.t_vect_ctx.vc_vm[0]; */ -/* OBSOLETE vector_registers.vm[1] = th.t_vect_ctx.vc_vm[1]; */ -/* OBSOLETE vector_registers.vls = th.t_vect_ctx.vc_vls; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE return read_vector_register_1 (reg); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Return a pointer to vector register REG, which must already have been */ -/* OBSOLETE fetched from the inferior or core file. *x/ */ -/* OBSOLETE */ -/* OBSOLETE static long * */ -/* OBSOLETE read_vector_register_1 (reg) */ -/* OBSOLETE int reg; */ -/* OBSOLETE { */ -/* OBSOLETE switch (reg) */ -/* OBSOLETE { */ -/* OBSOLETE case VM_REGNUM: */ -/* OBSOLETE return (long *) vector_registers.vm; */ -/* OBSOLETE case VS_REGNUM: */ -/* OBSOLETE return (long *) &vector_registers.vls; */ -/* OBSOLETE case VL_REGNUM: */ -/* OBSOLETE return 1 + (long *) &vector_registers.vls; */ -/* OBSOLETE default: */ -/* OBSOLETE return (long *) &vector_registers.vr[reg]; */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Write vector register REG, element ELEMENT, new value VAL. */ -/* OBSOLETE NB: must use read-modify-write on the entire vector state, */ -/* OBSOLETE since pattach does not do offsetted writes correctly. *x/ */ -/* OBSOLETE */ -/* OBSOLETE static void */ -/* OBSOLETE write_vector_register (reg, element, val) */ -/* OBSOLETE int reg, element; */ -/* OBSOLETE ULONGEST val; */ -/* OBSOLETE { */ -/* OBSOLETE if (have_inferior_p ()) */ -/* OBSOLETE { */ -/* OBSOLETE errno = 0; */ -/* OBSOLETE ps.pi_thread = inferior_thread; */ -/* OBSOLETE ps.pi_offset = 0; */ -/* OBSOLETE ps.pi_buffer = (char *) &vector_registers; */ -/* OBSOLETE ps.pi_nbytes = sizeof vector_registers; */ -/* OBSOLETE */ -/* OBSOLETE ioctl (inferior_fd, PIXRDVREGS, &ps); */ -/* OBSOLETE */ -/* OBSOLETE switch (reg) */ -/* OBSOLETE { */ -/* OBSOLETE case VL_REGNUM: */ -/* OBSOLETE vector_registers.vls = */ -/* OBSOLETE (vector_registers.vls & 0xffffffff00000000LL) */ -/* OBSOLETE + (unsigned long) val; */ -/* OBSOLETE break; */ -/* OBSOLETE */ -/* OBSOLETE case VS_REGNUM: */ -/* OBSOLETE vector_registers.vls = */ -/* OBSOLETE (val << 32) + (unsigned long) vector_registers.vls; */ -/* OBSOLETE break; */ -/* OBSOLETE */ -/* OBSOLETE default: */ -/* OBSOLETE vector_registers.vr[reg].el[element] = val; */ -/* OBSOLETE break; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE ioctl (inferior_fd, PIXWRVREGS, &ps); */ -/* OBSOLETE */ -/* OBSOLETE if (errno) */ -/* OBSOLETE perror_with_name ("writing vector register"); */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Return the contents of communication register NUM. *x/ */ -/* OBSOLETE */ -/* OBSOLETE static ULONGEST */ -/* OBSOLETE read_comm_register (num) */ -/* OBSOLETE int num; */ -/* OBSOLETE { */ -/* OBSOLETE if (have_inferior_p ()) */ -/* OBSOLETE { */ -/* OBSOLETE ps.pi_buffer = (char *) &comm_registers; */ -/* OBSOLETE ps.pi_nbytes = sizeof comm_registers; */ -/* OBSOLETE ps.pi_offset = 0; */ -/* OBSOLETE ps.pi_thread = inferior_thread; */ -/* OBSOLETE ioctl (inferior_fd, PIXRDCREGS, &ps); */ -/* OBSOLETE } */ -/* OBSOLETE return comm_registers.crreg.r4[num]; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Store a new value VAL into communication register NUM. */ -/* OBSOLETE NB: Must use read-modify-write on the whole comm register set */ -/* OBSOLETE since pattach does not do offsetted writes correctly. *x/ */ -/* OBSOLETE */ -/* OBSOLETE static void */ -/* OBSOLETE write_comm_register (num, val) */ -/* OBSOLETE int num; */ -/* OBSOLETE ULONGEST val; */ -/* OBSOLETE { */ -/* OBSOLETE if (have_inferior_p ()) */ -/* OBSOLETE { */ -/* OBSOLETE ps.pi_buffer = (char *) &comm_registers; */ -/* OBSOLETE ps.pi_nbytes = sizeof comm_registers; */ -/* OBSOLETE ps.pi_offset = 0; */ -/* OBSOLETE ps.pi_thread = inferior_thread; */ -/* OBSOLETE ioctl (inferior_fd, PIXRDCREGS, &ps); */ -/* OBSOLETE comm_registers.crreg.r4[num] = val; */ -/* OBSOLETE ioctl (inferior_fd, PIXWRCREGS, &ps); */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Resume execution of the inferior process. */ -/* OBSOLETE If STEP is nonzero, single-step it. */ -/* OBSOLETE If SIGNAL is nonzero, give it that signal. *x/ */ -/* OBSOLETE */ -/* OBSOLETE void */ -/* OBSOLETE resume (step, signal) */ -/* OBSOLETE int step; */ -/* OBSOLETE int signal; */ -/* OBSOLETE { */ -/* OBSOLETE errno = 0; */ -/* OBSOLETE if (step || signal) */ -/* OBSOLETE thread_continue (inferior_thread, step, signal); */ -/* OBSOLETE else */ -/* OBSOLETE thread_continue (-1, 0, 0); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Maybe resume some threads. */ -/* OBSOLETE THREAD is which thread to resume, or -1 to resume them all. */ -/* OBSOLETE STEP and SIGNAL are as in resume. */ -/* OBSOLETE */ -/* OBSOLETE Global variable ALL_CONTINUE is set when we are here to do a */ -/* OBSOLETE `cont' command; otherwise we may be doing `finish' or a call or */ -/* OBSOLETE something else that will not tolerate an automatic thread switch. */ -/* OBSOLETE */ -/* OBSOLETE If there are stopped threads waiting to deliver signals, and */ -/* OBSOLETE ALL_CONTINUE, do not actually resume anything. gdb will do a wait */ -/* OBSOLETE and see one of the stopped threads in the queue. *x/ */ -/* OBSOLETE */ -/* OBSOLETE static void */ -/* OBSOLETE thread_continue (thread, step, signal) */ -/* OBSOLETE int thread, step, signal; */ -/* OBSOLETE { */ -/* OBSOLETE int n; */ -/* OBSOLETE */ -/* OBSOLETE /* If we are to continue all threads, but not for the CONTINUE command, */ -/* OBSOLETE pay no attention and continue only the selected thread. *x/ */ -/* OBSOLETE */ -/* OBSOLETE if (thread < 0 && ! all_continue) */ -/* OBSOLETE thread = inferior_thread; */ -/* OBSOLETE */ -/* OBSOLETE /* If we are not stepping, we have now executed the continue part */ -/* OBSOLETE of a CONTINUE command. *x/ */ -/* OBSOLETE */ -/* OBSOLETE if (! step) */ -/* OBSOLETE all_continue = 0; */ -/* OBSOLETE */ -/* OBSOLETE /* Allow wait() to switch threads if this is an all-out continue. *x/ */ -/* OBSOLETE */ -/* OBSOLETE thread_switch_ok = thread < 0; */ -/* OBSOLETE */ -/* OBSOLETE /* If there are threads queued up, don't resume. *x/ */ -/* OBSOLETE */ -/* OBSOLETE if (thread_switch_ok && ! signal_stack_is_empty ()) */ -/* OBSOLETE return; */ -/* OBSOLETE */ -/* OBSOLETE /* OK, do it. *x/ */ -/* OBSOLETE */ -/* OBSOLETE for (n = 0; n < n_threads; n++) */ -/* OBSOLETE if (thread_state[n] == PI_TALIVE) */ -/* OBSOLETE { */ -/* OBSOLETE select_thread (n); */ -/* OBSOLETE */ -/* OBSOLETE if ((thread < 0 || n == thread) && ! thread_is_in_kernel[n]) */ -/* OBSOLETE { */ -/* OBSOLETE /* Blam the trace bits in the stack's saved psws to match */ -/* OBSOLETE the desired step mode. This is required so that */ -/* OBSOLETE single-stepping a return doesn't restore a psw with a */ -/* OBSOLETE clear trace bit and fly away, and conversely, */ -/* OBSOLETE proceeding through a return in a routine that was */ -/* OBSOLETE stepped into doesn't cause a phantom break by restoring */ -/* OBSOLETE a psw with the trace bit set. *x/ */ -/* OBSOLETE scan_stack (PSW_T_BIT, step); */ -/* OBSOLETE scan_stack (PSW_S_BIT, sequential); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE ps.pi_buffer = registers; */ -/* OBSOLETE ps.pi_nbytes = REGISTER_BYTES; */ -/* OBSOLETE ps.pi_offset = 0; */ -/* OBSOLETE ps.pi_thread = n; */ -/* OBSOLETE if (! thread_is_in_kernel[n]) */ -/* OBSOLETE if (ioctl (inferior_fd, PIXWRREGS, &ps)) */ -/* OBSOLETE perror_with_name ("PIXWRREGS"); */ -/* OBSOLETE */ -/* OBSOLETE if (thread < 0 || n == thread) */ -/* OBSOLETE { */ -/* OBSOLETE ps.pi_pc = 1; */ -/* OBSOLETE ps.pi_signo = signal; */ -/* OBSOLETE if (ioctl (inferior_fd, step ? PIXSTEP : PIXCONTINUE, &ps) < 0) */ -/* OBSOLETE perror_with_name ("PIXCONTINUE"); */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE if (ioctl (inferior_fd, PIXRUN, &ps) < 0) */ -/* OBSOLETE perror_with_name ("PIXRUN"); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Replacement for system wait routine. */ -/* OBSOLETE */ -/* OBSOLETE The system wait returns with one or more threads stopped by */ -/* OBSOLETE signals. Put stopped threads on a stack and return them one by */ -/* OBSOLETE one, so that it appears that wait returns one thread at a time. */ -/* OBSOLETE */ -/* OBSOLETE Global variable THREAD_SWITCH_OK is set when gdb can tolerate wait */ -/* OBSOLETE returning a new thread. If it is false, then only one thread is */ -/* OBSOLETE running; we will do a real wait, the thread will do something, and */ -/* OBSOLETE we will return that. *x/ */ -/* OBSOLETE */ -/* OBSOLETE pid_t */ -/* OBSOLETE wait (w) */ -/* OBSOLETE union wait *w; */ -/* OBSOLETE { */ -/* OBSOLETE int pid; */ -/* OBSOLETE */ -/* OBSOLETE if (!w) */ -/* OBSOLETE return wait3 (0, 0, 0); */ -/* OBSOLETE */ -/* OBSOLETE /* Do a real wait if we were told to, or if there are no queued threads. *x/ */ -/* OBSOLETE */ -/* OBSOLETE if (! thread_switch_ok || signal_stack_is_empty ()) */ -/* OBSOLETE { */ -/* OBSOLETE int thread; */ -/* OBSOLETE */ -/* OBSOLETE pid = wait3 (w, 0, 0); */ -/* OBSOLETE */ -/* OBSOLETE if (!WIFSTOPPED (*w) || pid != inferior_pid) */ -/* OBSOLETE return pid; */ -/* OBSOLETE */ -/* OBSOLETE /* The inferior has done something and stopped. Read in all the */ -/* OBSOLETE threads' registers, and queue up any signals that happened. *x/ */ -/* OBSOLETE */ -/* OBSOLETE if (ioctl (inferior_fd, PIXGETTHCOUNT, &ps) < 0) */ -/* OBSOLETE perror_with_name ("PIXGETTHCOUNT"); */ -/* OBSOLETE */ -/* OBSOLETE n_threads = ps.pi_othdcnt; */ -/* OBSOLETE for (thread = 0; thread < n_threads; thread++) */ -/* OBSOLETE { */ -/* OBSOLETE ps.pi_thread = thread; */ -/* OBSOLETE if (ioctl (inferior_fd, PIXGETSUBCODE, &ps) < 0) */ -/* OBSOLETE perror_with_name ("PIXGETSUBCODE"); */ -/* OBSOLETE thread_state[thread] = ps.pi_otstate; */ -/* OBSOLETE */ -/* OBSOLETE if (ps.pi_otstate == PI_TALIVE) */ -/* OBSOLETE { */ -/* OBSOLETE select_thread (thread); */ -/* OBSOLETE ps.pi_buffer = registers; */ -/* OBSOLETE ps.pi_nbytes = REGISTER_BYTES; */ -/* OBSOLETE ps.pi_offset = 0; */ -/* OBSOLETE ps.pi_thread = thread; */ -/* OBSOLETE if (ioctl (inferior_fd, PIXRDREGS, &ps) < 0) */ -/* OBSOLETE perror_with_name ("PIXRDREGS"); */ -/* OBSOLETE */ -/* OBSOLETE registers_fetched (); */ -/* OBSOLETE */ -/* OBSOLETE thread_pc[thread] = read_pc (); */ -/* OBSOLETE thread_signal[thread] = ps.pi_osigno; */ -/* OBSOLETE thread_sigcode[thread] = ps.pi_osigcode; */ -/* OBSOLETE */ -/* OBSOLETE /* If the thread's stack has a context frame */ -/* OBSOLETE on top, something fucked is going on. I do not */ -/* OBSOLETE know what, but do I know this: the only thing you */ -/* OBSOLETE can do with such a thread is continue it. *x/ */ -/* OBSOLETE */ -/* OBSOLETE thread_is_in_kernel[thread] = */ -/* OBSOLETE ((read_register (PS_REGNUM) >> 25) & 3) == 0; */ -/* OBSOLETE */ -/* OBSOLETE /* Signals push an extended frame and then fault */ -/* OBSOLETE with a ridiculous pc. Pop the frame. *x/ */ -/* OBSOLETE */ -/* OBSOLETE if (thread_pc[thread] > STACK_END_ADDR) */ -/* OBSOLETE { */ -/* OBSOLETE POP_FRAME; */ -/* OBSOLETE if (is_break_pc (thread_pc[thread])) */ -/* OBSOLETE thread_pc[thread] = read_pc () - 2; */ -/* OBSOLETE else */ -/* OBSOLETE thread_pc[thread] = read_pc (); */ -/* OBSOLETE write_register (PC_REGNUM, thread_pc[thread]); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE if (ps.pi_osigno || ps.pi_osigcode) */ -/* OBSOLETE { */ -/* OBSOLETE signal_stack++; */ -/* OBSOLETE signal_stack->pid = pid; */ -/* OBSOLETE signal_stack->thread = thread; */ -/* OBSOLETE signal_stack->signo = thread_signal[thread]; */ -/* OBSOLETE signal_stack->subsig = thread_sigcode[thread]; */ -/* OBSOLETE signal_stack->pc = thread_pc[thread]; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* The following hackery is caused by a unix 7.1 feature: */ -/* OBSOLETE the inferior's fixed scheduling mode is cleared when */ -/* OBSOLETE it execs the shell (since the shell is not a parallel */ -/* OBSOLETE program). So, note the 5.4 trap we get when */ -/* OBSOLETE the shell does its exec, then catch the 5.0 trap */ -/* OBSOLETE that occurs when the debuggee starts, and set fixed */ -/* OBSOLETE scheduling mode properly. *x/ */ -/* OBSOLETE */ -/* OBSOLETE if (ps.pi_osigno == 5 && ps.pi_osigcode == 4) */ -/* OBSOLETE exec_trap_timer = 1; */ -/* OBSOLETE else */ -/* OBSOLETE exec_trap_timer--; */ -/* OBSOLETE */ -/* OBSOLETE if (ps.pi_osigno == 5 && exec_trap_timer == 0) */ -/* OBSOLETE set_fixed_scheduling (pid, parallel == 2); */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE if (signal_stack_is_empty ()) */ -/* OBSOLETE error ("no active threads?!"); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Select the thread that stopped, and return *w saying why. *x/ */ -/* OBSOLETE */ -/* OBSOLETE select_thread (signal_stack->thread); */ -/* OBSOLETE */ -/* OBSOLETE FIXME: need to convert from host sig. */ -/* OBSOLETE stop_signal = signal_stack->signo; */ -/* OBSOLETE stop_sigcode = signal_stack->subsig; */ -/* OBSOLETE */ -/* OBSOLETE WSETSTOP (*w, signal_stack->signo); */ -/* OBSOLETE w->w_thread = signal_stack->thread; */ -/* OBSOLETE return (signal_stack--)->pid; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Select thread THREAD -- its registers, stack, per-thread memory. */ -/* OBSOLETE This is the only routine that may assign to inferior_thread */ -/* OBSOLETE or thread_regs[]. *x/ */ -/* OBSOLETE */ -/* OBSOLETE static void */ -/* OBSOLETE select_thread (thread) */ -/* OBSOLETE int thread; */ -/* OBSOLETE { */ -/* OBSOLETE if (thread == inferior_thread) */ -/* OBSOLETE return; */ -/* OBSOLETE */ -/* OBSOLETE memcpy (thread_regs[inferior_thread], registers, REGISTER_BYTES); */ -/* OBSOLETE ps.pi_thread = inferior_thread = thread; */ -/* OBSOLETE if (have_inferior_p ()) */ -/* OBSOLETE ioctl (inferior_fd, PISETRWTID, &ps); */ -/* OBSOLETE memcpy (registers, thread_regs[thread], REGISTER_BYTES); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Routine to set or clear a psw bit in the psw and also all psws */ -/* OBSOLETE saved on the stack. Quits when we get to a frame in which the */ -/* OBSOLETE saved psw is correct. *x/ */ -/* OBSOLETE */ -/* OBSOLETE static void */ -/* OBSOLETE scan_stack (bit, val) */ -/* OBSOLETE long bit, val; */ -/* OBSOLETE { */ -/* OBSOLETE long ps = read_register (PS_REGNUM); */ -/* OBSOLETE long fp; */ -/* OBSOLETE if (val ? !(ps & bit) : (ps & bit)) */ -/* OBSOLETE { */ -/* OBSOLETE ps ^= bit; */ -/* OBSOLETE write_register (PS_REGNUM, ps); */ -/* OBSOLETE */ -/* OBSOLETE fp = read_register (FP_REGNUM); */ -/* OBSOLETE while (fp & 0x80000000) */ -/* OBSOLETE { */ -/* OBSOLETE ps = read_memory_integer (fp + 4, 4); */ -/* OBSOLETE if (val ? (ps & bit) : !(ps & bit)) */ -/* OBSOLETE break; */ -/* OBSOLETE ps ^= bit; */ -/* OBSOLETE write_memory (fp + 4, &ps, 4); */ -/* OBSOLETE fp = read_memory_integer (fp + 8, 4); */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Set fixed scheduling (alliant mode) of process PID to ARG (0 or 1). *x/ */ -/* OBSOLETE */ -/* OBSOLETE static void */ -/* OBSOLETE set_fixed_scheduling (pid, arg) */ -/* OBSOLETE int arg; */ -/* OBSOLETE { */ -/* OBSOLETE struct pattributes pattr; */ -/* OBSOLETE getpattr (pid, &pattr); */ -/* OBSOLETE pattr.pattr_pfixed = arg; */ -/* OBSOLETE setpattr (pid, &pattr); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE void */ -/* OBSOLETE core_file_command (filename, from_tty) */ -/* OBSOLETE char *filename; */ -/* OBSOLETE int from_tty; */ -/* OBSOLETE { */ -/* OBSOLETE int n; */ -/* OBSOLETE */ -/* OBSOLETE /* Discard all vestiges of any previous core file */ -/* OBSOLETE and mark data and stack spaces as empty. *x/ */ -/* OBSOLETE */ -/* OBSOLETE if (corefile) */ -/* OBSOLETE xfree (corefile); */ -/* OBSOLETE corefile = 0; */ -/* OBSOLETE */ -/* OBSOLETE if (corechan >= 0) */ -/* OBSOLETE close (corechan); */ -/* OBSOLETE corechan = -1; */ -/* OBSOLETE */ -/* OBSOLETE data_start = 0; */ -/* OBSOLETE data_end = 0; */ -/* OBSOLETE stack_start = STACK_END_ADDR; */ -/* OBSOLETE stack_end = STACK_END_ADDR; */ -/* OBSOLETE n_core = 0; */ -/* OBSOLETE */ -/* OBSOLETE /* Now, if a new core file was specified, open it and digest it. *x/ */ -/* OBSOLETE */ -/* OBSOLETE if (filename) */ -/* OBSOLETE { */ -/* OBSOLETE filename = tilde_expand (filename); */ -/* OBSOLETE make_cleanup (xfree, filename); */ -/* OBSOLETE */ -/* OBSOLETE if (have_inferior_p ()) */ -/* OBSOLETE error ("To look at a core file, you must kill the program with \"kill\"."); */ -/* OBSOLETE corechan = open (filename, O_RDONLY, 0); */ -/* OBSOLETE if (corechan < 0) */ -/* OBSOLETE perror_with_name (filename); */ -/* OBSOLETE */ -/* OBSOLETE if (myread (corechan, &filehdr, sizeof filehdr) < 0) */ -/* OBSOLETE perror_with_name (filename); */ -/* OBSOLETE */ -/* OBSOLETE if (!IS_CORE_SOFF_MAGIC (filehdr.h_magic)) */ -/* OBSOLETE error ("%s: not a core file.\n", filename); */ -/* OBSOLETE */ -/* OBSOLETE if (myread (corechan, &opthdr, filehdr.h_opthdr) < 0) */ -/* OBSOLETE perror_with_name (filename); */ -/* OBSOLETE */ -/* OBSOLETE /* Read through the section headers. */ -/* OBSOLETE For text, data, etc, record an entry in the core file map. */ -/* OBSOLETE For context and tcontext, record the file address of */ -/* OBSOLETE the context blocks. *x/ */ -/* OBSOLETE */ -/* OBSOLETE lseek (corechan, (long) filehdr.h_scnptr, 0); */ -/* OBSOLETE */ -/* OBSOLETE n_threads = 0; */ -/* OBSOLETE for (n = 0; n < filehdr.h_nscns; n++) */ -/* OBSOLETE { */ -/* OBSOLETE if (myread (corechan, &scnhdr, sizeof scnhdr) < 0) */ -/* OBSOLETE perror_with_name (filename); */ -/* OBSOLETE if ((scnhdr.s_flags & S_TYPMASK) >= S_TEXT */ -/* OBSOLETE && (scnhdr.s_flags & S_TYPMASK) <= S_COMON) */ -/* OBSOLETE { */ -/* OBSOLETE core_map[n_core].mem_addr = scnhdr.s_vaddr; */ -/* OBSOLETE core_map[n_core].mem_end = scnhdr.s_vaddr + scnhdr.s_size; */ -/* OBSOLETE core_map[n_core].file_addr = scnhdr.s_scnptr; */ -/* OBSOLETE core_map[n_core].type = scnhdr.s_flags & S_TYPMASK; */ -/* OBSOLETE if (core_map[n_core].type != S_TBSS */ -/* OBSOLETE && core_map[n_core].type != S_TDATA */ -/* OBSOLETE && core_map[n_core].type != S_TTEXT) */ -/* OBSOLETE core_map[n_core].thread = -1; */ -/* OBSOLETE else if (n_core == 0 */ -/* OBSOLETE || core_map[n_core-1].mem_addr != scnhdr.s_vaddr) */ -/* OBSOLETE core_map[n_core].thread = 0; */ -/* OBSOLETE else */ -/* OBSOLETE core_map[n_core].thread = core_map[n_core-1].thread + 1; */ -/* OBSOLETE n_core++; */ -/* OBSOLETE } */ -/* OBSOLETE else if ((scnhdr.s_flags & S_TYPMASK) == S_CONTEXT) */ -/* OBSOLETE context_offset = scnhdr.s_scnptr; */ -/* OBSOLETE else if ((scnhdr.s_flags & S_TYPMASK) == S_TCONTEXT) */ -/* OBSOLETE tcontext_offset[n_threads++] = scnhdr.s_scnptr; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Read the context block, struct user, struct proc, */ -/* OBSOLETE and the comm regs. *x/ */ -/* OBSOLETE */ -/* OBSOLETE lseek (corechan, context_offset, 0); */ -/* OBSOLETE if (myread (corechan, &c, sizeof c) < 0) */ -/* OBSOLETE perror_with_name (filename); */ -/* OBSOLETE lseek (corechan, c.core_user_p, 0); */ -/* OBSOLETE if (myread (corechan, &u, sizeof u) < 0) */ -/* OBSOLETE perror_with_name (filename); */ -/* OBSOLETE lseek (corechan, c.core_proc_p, 0); */ -/* OBSOLETE if (myread (corechan, &pr, sizeof pr) < 0) */ -/* OBSOLETE perror_with_name (filename); */ -/* OBSOLETE comm_registers = pr.p_creg; */ -/* OBSOLETE */ -/* OBSOLETE /* Core file apparently is really there. Make it really exist */ -/* OBSOLETE for xfer_core_file so we can do read_memory on it. *x/ */ -/* OBSOLETE */ -/* OBSOLETE if (filename[0] == '/') */ -/* OBSOLETE corefile = savestring (filename, strlen (filename)); */ -/* OBSOLETE else */ -/* OBSOLETE corefile = concat (current_directory, "/", filename, NULL); */ -/* OBSOLETE */ -/* OBSOLETE printf_filtered ("Program %s ", u.u_comm); */ -/* OBSOLETE */ -/* OBSOLETE /* Read the thread registers and fill in the thread_xxx[] data. *x/ */ -/* OBSOLETE */ -/* OBSOLETE for (n = 0; n < n_threads; n++) */ -/* OBSOLETE { */ -/* OBSOLETE select_thread (n); */ -/* OBSOLETE */ -/* OBSOLETE lseek (corechan, tcontext_offset[n], 0); */ -/* OBSOLETE if (myread (corechan, &tc, sizeof tc) < 0) */ -/* OBSOLETE perror_with_name (corefile); */ -/* OBSOLETE lseek (corechan, tc.core_thread_p, 0); */ -/* OBSOLETE if (myread (corechan, &th, sizeof th) < 0) */ -/* OBSOLETE perror_with_name (corefile); */ -/* OBSOLETE */ -/* OBSOLETE lseek (corechan, tc.core_syscall_context_p, 0); */ -/* OBSOLETE if (myread (corechan, registers, REGISTER_BYTES) < 0) */ -/* OBSOLETE perror_with_name (corefile); */ -/* OBSOLETE */ -/* OBSOLETE thread_signal[n] = th.t_cursig; */ -/* OBSOLETE thread_sigcode[n] = th.t_code; */ -/* OBSOLETE thread_state[n] = th.t_state; */ -/* OBSOLETE thread_pc[n] = read_pc (); */ -/* OBSOLETE */ -/* OBSOLETE if (thread_pc[n] > STACK_END_ADDR) */ -/* OBSOLETE { */ -/* OBSOLETE POP_FRAME; */ -/* OBSOLETE if (is_break_pc (thread_pc[n])) */ -/* OBSOLETE thread_pc[n] = read_pc () - 2; */ -/* OBSOLETE else */ -/* OBSOLETE thread_pc[n] = read_pc (); */ -/* OBSOLETE write_register (PC_REGNUM, thread_pc[n]); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE printf_filtered ("thread %d received signal %d, %s\n", */ -/* OBSOLETE n, thread_signal[n], */ -/* OBSOLETE safe_strsignal (thread_signal[n])); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Select an interesting thread -- also-rans died with SIGKILL, */ -/* OBSOLETE so find one that didn't. *x/ */ -/* OBSOLETE */ -/* OBSOLETE for (n = 0; n < n_threads; n++) */ -/* OBSOLETE if (thread_signal[n] != 0 && thread_signal[n] != SIGKILL) */ -/* OBSOLETE { */ -/* OBSOLETE select_thread (n); */ -/* OBSOLETE stop_signal = thread_signal[n]; */ -/* OBSOLETE stop_sigcode = thread_sigcode[n]; */ -/* OBSOLETE break; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE core_aouthdr.a_magic = 0; */ -/* OBSOLETE */ -/* OBSOLETE flush_cached_frames (); */ -/* OBSOLETE select_frame (get_current_frame (), 0); */ -/* OBSOLETE validate_files (); */ -/* OBSOLETE */ -/* OBSOLETE print_stack_frame (selected_frame, selected_frame_level, -1); */ -/* OBSOLETE } */ -/* OBSOLETE else if (from_tty) */ -/* OBSOLETE printf_filtered ("No core file now.\n"); */ -/* OBSOLETE } */ diff --git a/gdb/pyr-tdep.c b/gdb/pyr-tdep.c deleted file mode 100644 index 0cc355e..0000000 --- a/gdb/pyr-tdep.c +++ /dev/null @@ -1,452 +0,0 @@ -/* OBSOLETE /* Pyramid target-dependent code for GDB. */ -/* OBSOLETE Copyright (C) 1988, 1989, 1991, 2000 Free Software Foundation, Inc. */ -/* OBSOLETE */ -/* OBSOLETE This file is part of GDB. */ -/* OBSOLETE */ -/* OBSOLETE This program is free software; you can redistribute it and/or modify */ -/* OBSOLETE it under the terms of the GNU General Public License as published by */ -/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */ -/* OBSOLETE (at your option) any later version. */ -/* OBSOLETE */ -/* OBSOLETE This program is distributed in the hope that it will be useful, */ -/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */ -/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ -/* OBSOLETE GNU General Public License for more details. */ -/* OBSOLETE */ -/* OBSOLETE You should have received a copy of the GNU General Public License */ -/* OBSOLETE along with this program; if not, write to the Free Software */ -/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #include "defs.h" */ -/* OBSOLETE */ -/* OBSOLETE /*** Prettier register printing. ***x/ */ -/* OBSOLETE */ -/* OBSOLETE /* Print registers in the same format as pyramid's dbx, adb, sdb. *x/ */ -/* OBSOLETE pyr_print_registers(reg_buf, regnum) */ -/* OBSOLETE long *reg_buf[]; */ -/* OBSOLETE { */ -/* OBSOLETE register int regno; */ -/* OBSOLETE int usp, ksp; */ -/* OBSOLETE struct user u; */ -/* OBSOLETE */ -/* OBSOLETE for (regno = 0; regno < 16; regno++) { */ -/* OBSOLETE printf_unfiltered/*_filtered*x/ ("%6.6s: %8x %6.6s: %8x %6s: %8x %6s: %8x\n", */ -/* OBSOLETE REGISTER_NAME (regno), reg_buf[regno], */ -/* OBSOLETE REGISTER_NAME (regno+16), reg_buf[regno+16], */ -/* OBSOLETE REGISTER_NAME (regno+32), reg_buf[regno+32], */ -/* OBSOLETE REGISTER_NAME (regno+48), reg_buf[regno+48]); */ -/* OBSOLETE } */ -/* OBSOLETE usp = ptrace (3, inferior_pid, */ -/* OBSOLETE (PTRACE_ARG3_TYPE) ((char *)&u.u_pcb.pcb_usp) - */ -/* OBSOLETE ((char *)&u), 0); */ -/* OBSOLETE ksp = ptrace (3, inferior_pid, */ -/* OBSOLETE (PTRACE_ARG3_TYPE) ((char *)&u.u_pcb.pcb_ksp) - */ -/* OBSOLETE ((char *)&u), 0); */ -/* OBSOLETE printf_unfiltered/*_filtered*x/ ("\n%6.6s: %8x %6.6s: %8x (%08x) %6.6s %8x\n", */ -/* OBSOLETE REGISTER_NAME (CSP_REGNUM),reg_buf[CSP_REGNUM], */ -/* OBSOLETE REGISTER_NAME (KSP_REGNUM), reg_buf[KSP_REGNUM], ksp, */ -/* OBSOLETE "usp", usp); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Print the register regnum, or all registers if regnum is -1. */ -/* OBSOLETE fpregs is currently ignored. *x/ */ -/* OBSOLETE */ -/* OBSOLETE pyr_do_registers_info (regnum, fpregs) */ -/* OBSOLETE int regnum; */ -/* OBSOLETE int fpregs; */ -/* OBSOLETE { */ -/* OBSOLETE /* On a pyr, we know a virtual register can always fit in an long. */ -/* OBSOLETE Here (and elsewhere) we take advantage of that. Yuk. *x/ */ -/* OBSOLETE long raw_regs[MAX_REGISTER_RAW_SIZE*NUM_REGS]; */ -/* OBSOLETE register int i; */ -/* OBSOLETE */ -/* OBSOLETE for (i = 0 ; i < 64 ; i++) { */ -/* OBSOLETE read_relative_register_raw_bytes(i, raw_regs+i); */ -/* OBSOLETE } */ -/* OBSOLETE if (regnum == -1) */ -/* OBSOLETE pyr_print_registers (raw_regs, regnum); */ -/* OBSOLETE else */ -/* OBSOLETE for (i = 0; i < NUM_REGS; i++) */ -/* OBSOLETE if (i == regnum) { */ -/* OBSOLETE long val = raw_regs[i]; */ -/* OBSOLETE */ -/* OBSOLETE fputs_filtered (REGISTER_NAME (i), gdb_stdout); */ -/* OBSOLETE printf_filtered(":"); */ -/* OBSOLETE print_spaces_filtered (6 - strlen (REGISTER_NAME (i)), gdb_stdout); */ -/* OBSOLETE if (val == 0) */ -/* OBSOLETE printf_filtered ("0"); */ -/* OBSOLETE else */ -/* OBSOLETE printf_filtered ("%s %d", local_hex_string_custom(val,"08"), val); */ -/* OBSOLETE printf_filtered("\n"); */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /*** Debugging editions of various macros from m-pyr.h ****x/ */ -/* OBSOLETE */ -/* OBSOLETE CORE_ADDR frame_locals_address (frame) */ -/* OBSOLETE struct frame_info *frame; */ -/* OBSOLETE { */ -/* OBSOLETE register int addr = find_saved_register (frame,CFP_REGNUM); */ -/* OBSOLETE register int result = read_memory_integer (addr, 4); */ -/* OBSOLETE #ifdef PYRAMID_CONTROL_FRAME_DEBUGGING */ -/* OBSOLETE fprintf_unfiltered (gdb_stderr, */ -/* OBSOLETE "\t[[..frame_locals:%8x, %s= %x @%x fcfp= %x foo= %x\n\t gr13=%x pr13=%x tr13=%x @%x]]\n", */ -/* OBSOLETE frame->frame, */ -/* OBSOLETE REGISTER_NAME (CFP_REGNUM), */ -/* OBSOLETE result, addr, */ -/* OBSOLETE frame->frame_cfp, (CFP_REGNUM), */ -/* OBSOLETE */ -/* OBSOLETE */ -/* OBSOLETE read_register(13), read_register(29), read_register(61), */ -/* OBSOLETE find_saved_register(frame, 61)); */ -/* OBSOLETE #endif /* PYRAMID_CONTROL_FRAME_DEBUGGING *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* FIXME: I thought read_register (CFP_REGNUM) should be the right answer; */ -/* OBSOLETE or at least CFP_REGNUM relative to FRAME (ie, result). */ -/* OBSOLETE There seems to be a bug in the way the innermost frame is set up. *x/ */ -/* OBSOLETE */ -/* OBSOLETE return ((frame->next) ? result: frame->frame_cfp); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE CORE_ADDR frame_args_addr (frame) */ -/* OBSOLETE struct frame_info *frame; */ -/* OBSOLETE { */ -/* OBSOLETE register int addr = find_saved_register (frame,CFP_REGNUM); */ -/* OBSOLETE register int result = read_memory_integer (addr, 4); */ -/* OBSOLETE */ -/* OBSOLETE #ifdef PYRAMID_CONTROL_FRAME_DEBUGGING */ -/* OBSOLETE fprintf_unfiltered (gdb_stderr, */ -/* OBSOLETE "\t[[..frame_args:%8x, %s= %x @%x fcfp= %x r_r= %x\n\t gr13=%x pr13=%x tr13=%x @%x]]\n", */ -/* OBSOLETE frame->frame, */ -/* OBSOLETE REGISTER_NAME (CFP_REGNUM), */ -/* OBSOLETE result, addr, */ -/* OBSOLETE frame->frame_cfp, read_register(CFP_REGNUM), */ -/* OBSOLETE */ -/* OBSOLETE read_register(13), read_register(29), read_register(61), */ -/* OBSOLETE find_saved_register(frame, 61)); */ -/* OBSOLETE #endif /* PYRAMID_CONTROL_FRAME_DEBUGGING *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* FIXME: I thought read_register (CFP_REGNUM) should be the right answer; */ -/* OBSOLETE or at least CFP_REGNUM relative to FRAME (ie, result). */ -/* OBSOLETE There seems to be a bug in the way the innermost frame is set up. *x/ */ -/* OBSOLETE return ((frame->next) ? result: frame->frame_cfp); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE #include "symtab.h" */ -/* OBSOLETE #include "opcode/pyr.h" */ -/* OBSOLETE #include "gdbcore.h" */ -/* OBSOLETE */ -/* OBSOLETE */ -/* OBSOLETE /* A couple of functions used for debugging frame-handling on */ -/* OBSOLETE Pyramids. (The Pyramid-dependent handling of register values for */ -/* OBSOLETE windowed registers is known to be buggy.) */ -/* OBSOLETE */ -/* OBSOLETE When debugging, these functions can supplant the normal definitions of some */ -/* OBSOLETE of the macros in tm-pyramid.h The quantity of information produced */ -/* OBSOLETE when these functions are used makes the gdb unusable as a */ -/* OBSOLETE debugger for user programs. *x/ */ -/* OBSOLETE */ -/* OBSOLETE extern unsigned pyr_saved_pc(), pyr_frame_chain(); */ -/* OBSOLETE */ -/* OBSOLETE CORE_ADDR pyr_frame_chain(frame) */ -/* OBSOLETE CORE_ADDR frame; */ -/* OBSOLETE { */ -/* OBSOLETE int foo=frame - CONTROL_STACK_FRAME_SIZE; */ -/* OBSOLETE /* printf_unfiltered ("...following chain from %x: got %x\n", frame, foo);*x/ */ -/* OBSOLETE return foo; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE CORE_ADDR pyr_saved_pc(frame) */ -/* OBSOLETE CORE_ADDR frame; */ -/* OBSOLETE { */ -/* OBSOLETE int foo=0; */ -/* OBSOLETE foo = read_memory_integer (((CORE_ADDR)(frame))+60, 4); */ -/* OBSOLETE printf_unfiltered ("..reading pc from frame 0x%0x+%d regs: got %0x\n", */ -/* OBSOLETE frame, 60/4, foo); */ -/* OBSOLETE return foo; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Pyramid instructions are never longer than this many bytes. *x/ */ -/* OBSOLETE #define MAXLEN 24 */ -/* OBSOLETE */ -/* OBSOLETE /* Number of elements in the opcode table. *x/ */ -/* OBSOLETE /*const*x/ static int nopcodes = (sizeof (pyr_opcodes) / sizeof( pyr_opcodes[0])); */ -/* OBSOLETE #define NOPCODES (nopcodes) */ -/* OBSOLETE */ -/* OBSOLETE /* Let's be byte-independent so we can use this as a cross-assembler. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #define NEXTLONG(p) \ */ -/* OBSOLETE (p += 4, (((((p[-4] << 8) + p[-3]) << 8) + p[-2]) << 8) + p[-1]) */ -/* OBSOLETE */ -/* OBSOLETE /* Print one instruction at address MEMADDR in debugged memory, */ -/* OBSOLETE on STREAM. Returns length of the instruction, in bytes. *x/ */ -/* OBSOLETE */ -/* OBSOLETE int */ -/* OBSOLETE pyr_print_insn (memaddr, stream) */ -/* OBSOLETE CORE_ADDR memaddr; */ -/* OBSOLETE struct ui_file *stream; */ -/* OBSOLETE { */ -/* OBSOLETE unsigned char buffer[MAXLEN]; */ -/* OBSOLETE register int i, nargs, insn_size =4; */ -/* OBSOLETE register unsigned char *p; */ -/* OBSOLETE register char *d; */ -/* OBSOLETE register int insn_opcode, operand_mode; */ -/* OBSOLETE register int index_multiplier, index_reg_regno, op_1_regno, op_2_regno ; */ -/* OBSOLETE long insn; /* first word of the insn, not broken down. *x/ */ -/* OBSOLETE pyr_insn_format insn_decode; /* the same, broken out into op{code,erands} *x/ */ -/* OBSOLETE long extra_1, extra_2; */ -/* OBSOLETE */ -/* OBSOLETE read_memory (memaddr, buffer, MAXLEN); */ -/* OBSOLETE insn_decode = *((pyr_insn_format *) buffer); */ -/* OBSOLETE insn = * ((int *) buffer); */ -/* OBSOLETE insn_opcode = insn_decode.operator; */ -/* OBSOLETE operand_mode = insn_decode.mode; */ -/* OBSOLETE index_multiplier = insn_decode.index_scale; */ -/* OBSOLETE index_reg_regno = insn_decode.index_reg; */ -/* OBSOLETE op_1_regno = insn_decode.operand_1; */ -/* OBSOLETE op_2_regno = insn_decode.operand_2; */ -/* OBSOLETE */ -/* OBSOLETE */ -/* OBSOLETE if (*((int *)buffer) == 0x0) { */ -/* OBSOLETE /* "halt" looks just like an invalid "jump" to the insn decoder, */ -/* OBSOLETE so is dealt with as a special case *x/ */ -/* OBSOLETE fprintf_unfiltered (stream, "halt"); */ -/* OBSOLETE return (4); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE for (i = 0; i < NOPCODES; i++) */ -/* OBSOLETE if (pyr_opcodes[i].datum.code == insn_opcode) */ -/* OBSOLETE break; */ -/* OBSOLETE */ -/* OBSOLETE if (i == NOPCODES) */ -/* OBSOLETE /* FIXME: Handle unrecognised instructions better. *x/ */ -/* OBSOLETE fprintf_unfiltered (stream, "???\t#%08x\t(op=%x mode =%x)", */ -/* OBSOLETE insn, insn_decode.operator, insn_decode.mode); */ -/* OBSOLETE else */ -/* OBSOLETE { */ -/* OBSOLETE /* Print the mnemonic for the instruction. Pyramid insn operands */ -/* OBSOLETE are so regular that we can deal with almost all of them */ -/* OBSOLETE separately. */ -/* OBSOLETE Unconditional branches are an exception: they are encoded as */ -/* OBSOLETE conditional branches (branch if false condition, I think) */ -/* OBSOLETE with no condition specified. The average user will not be */ -/* OBSOLETE aware of this. To maintain their illusion that an */ -/* OBSOLETE unconditional branch insn exists, we will have to FIXME to */ -/* OBSOLETE treat the insn mnemnonic of all branch instructions here as a */ -/* OBSOLETE special case: check the operands of branch insn and print an */ -/* OBSOLETE appropriate mnemonic. *x/ */ -/* OBSOLETE */ -/* OBSOLETE fprintf_unfiltered (stream, "%s\t", pyr_opcodes[i].name); */ -/* OBSOLETE */ -/* OBSOLETE /* Print the operands of the insn (as specified in */ -/* OBSOLETE insn.operand_mode). */ -/* OBSOLETE Branch operands of branches are a special case: they are a word */ -/* OBSOLETE offset, not a byte offset. *x/ */ -/* OBSOLETE */ -/* OBSOLETE if (insn_decode.operator == 0x01 || insn_decode.operator == 0x02) { */ -/* OBSOLETE register int bit_codes=(insn >> 16)&0xf; */ -/* OBSOLETE register int i; */ -/* OBSOLETE register int displacement = (insn & 0x0000ffff) << 2; */ -/* OBSOLETE */ -/* OBSOLETE static char cc_bit_names[] = "cvzn"; /* z,n,c,v: strange order? *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* Is bfc and no bits specified an unconditional branch?*x/ */ -/* OBSOLETE for (i=0;i<4;i++) { */ -/* OBSOLETE if ((bit_codes) & 0x1) */ -/* OBSOLETE fputc_unfiltered (cc_bit_names[i], stream); */ -/* OBSOLETE bit_codes >>= 1; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE fprintf_unfiltered (stream, ",%0x", */ -/* OBSOLETE displacement + memaddr); */ -/* OBSOLETE return (insn_size); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE switch (operand_mode) { */ -/* OBSOLETE case 0: */ -/* OBSOLETE fprintf_unfiltered (stream, "%s,%s", */ -/* OBSOLETE REGISTER_NAME (op_1_regno), */ -/* OBSOLETE REGISTER_NAME (op_2_regno)); */ -/* OBSOLETE break; */ -/* OBSOLETE */ -/* OBSOLETE case 1: */ -/* OBSOLETE fprintf_unfiltered (stream, " 0x%0x,%s", */ -/* OBSOLETE op_1_regno, */ -/* OBSOLETE REGISTER_NAME (op_2_regno)); */ -/* OBSOLETE break; */ -/* OBSOLETE */ -/* OBSOLETE case 2: */ -/* OBSOLETE read_memory (memaddr+4, buffer, MAXLEN); */ -/* OBSOLETE insn_size += 4; */ -/* OBSOLETE extra_1 = * ((int *) buffer); */ -/* OBSOLETE fprintf_unfiltered (stream, " $0x%0x,%s", */ -/* OBSOLETE extra_1, */ -/* OBSOLETE REGISTER_NAME (op_2_regno)); */ -/* OBSOLETE break; */ -/* OBSOLETE case 3: */ -/* OBSOLETE fprintf_unfiltered (stream, " (%s),%s", */ -/* OBSOLETE REGISTER_NAME (op_1_regno), */ -/* OBSOLETE REGISTER_NAME (op_2_regno)); */ -/* OBSOLETE break; */ -/* OBSOLETE */ -/* OBSOLETE case 4: */ -/* OBSOLETE read_memory (memaddr+4, buffer, MAXLEN); */ -/* OBSOLETE insn_size += 4; */ -/* OBSOLETE extra_1 = * ((int *) buffer); */ -/* OBSOLETE fprintf_unfiltered (stream, " 0x%0x(%s),%s", */ -/* OBSOLETE extra_1, */ -/* OBSOLETE REGISTER_NAME (op_1_regno), */ -/* OBSOLETE REGISTER_NAME (op_2_regno)); */ -/* OBSOLETE break; */ -/* OBSOLETE */ -/* OBSOLETE /* S1 destination mode *x/ */ -/* OBSOLETE case 5: */ -/* OBSOLETE fprintf_unfiltered (stream, */ -/* OBSOLETE ((index_reg_regno) ? "%s,(%s)[%s*%1d]" : "%s,(%s)"), */ -/* OBSOLETE REGISTER_NAME (op_1_regno), */ -/* OBSOLETE REGISTER_NAME (op_2_regno), */ -/* OBSOLETE REGISTER_NAME (index_reg_regno), */ -/* OBSOLETE index_multiplier); */ -/* OBSOLETE break; */ -/* OBSOLETE */ -/* OBSOLETE case 6: */ -/* OBSOLETE fprintf_unfiltered (stream, */ -/* OBSOLETE ((index_reg_regno) ? " $%#0x,(%s)[%s*%1d]" */ -/* OBSOLETE : " $%#0x,(%s)"), */ -/* OBSOLETE op_1_regno, */ -/* OBSOLETE REGISTER_NAME (op_2_regno), */ -/* OBSOLETE REGISTER_NAME (index_reg_regno), */ -/* OBSOLETE index_multiplier); */ -/* OBSOLETE break; */ -/* OBSOLETE */ -/* OBSOLETE case 7: */ -/* OBSOLETE read_memory (memaddr+4, buffer, MAXLEN); */ -/* OBSOLETE insn_size += 4; */ -/* OBSOLETE extra_1 = * ((int *) buffer); */ -/* OBSOLETE fprintf_unfiltered (stream, */ -/* OBSOLETE ((index_reg_regno) ? " $%#0x,(%s)[%s*%1d]" */ -/* OBSOLETE : " $%#0x,(%s)"), */ -/* OBSOLETE extra_1, */ -/* OBSOLETE REGISTER_NAME (op_2_regno), */ -/* OBSOLETE REGISTER_NAME (index_reg_regno), */ -/* OBSOLETE index_multiplier); */ -/* OBSOLETE break; */ -/* OBSOLETE */ -/* OBSOLETE case 8: */ -/* OBSOLETE fprintf_unfiltered (stream, */ -/* OBSOLETE ((index_reg_regno) ? " (%s),(%s)[%s*%1d]" : " (%s),(%s)"), */ -/* OBSOLETE REGISTER_NAME (op_1_regno), */ -/* OBSOLETE REGISTER_NAME (op_2_regno), */ -/* OBSOLETE REGISTER_NAME (index_reg_regno), */ -/* OBSOLETE index_multiplier); */ -/* OBSOLETE break; */ -/* OBSOLETE */ -/* OBSOLETE case 9: */ -/* OBSOLETE read_memory (memaddr+4, buffer, MAXLEN); */ -/* OBSOLETE insn_size += 4; */ -/* OBSOLETE extra_1 = * ((int *) buffer); */ -/* OBSOLETE fprintf_unfiltered (stream, */ -/* OBSOLETE ((index_reg_regno) */ -/* OBSOLETE ? "%#0x(%s),(%s)[%s*%1d]" */ -/* OBSOLETE : "%#0x(%s),(%s)"), */ -/* OBSOLETE extra_1, */ -/* OBSOLETE REGISTER_NAME (op_1_regno), */ -/* OBSOLETE REGISTER_NAME (op_2_regno), */ -/* OBSOLETE REGISTER_NAME (index_reg_regno), */ -/* OBSOLETE index_multiplier); */ -/* OBSOLETE break; */ -/* OBSOLETE */ -/* OBSOLETE /* S2 destination mode *x/ */ -/* OBSOLETE case 10: */ -/* OBSOLETE read_memory (memaddr+4, buffer, MAXLEN); */ -/* OBSOLETE insn_size += 4; */ -/* OBSOLETE extra_1 = * ((int *) buffer); */ -/* OBSOLETE fprintf_unfiltered (stream, */ -/* OBSOLETE ((index_reg_regno) ? "%s,%#0x(%s)[%s*%1d]" : "%s,%#0x(%s)"), */ -/* OBSOLETE REGISTER_NAME (op_1_regno), */ -/* OBSOLETE extra_1, */ -/* OBSOLETE REGISTER_NAME (op_2_regno), */ -/* OBSOLETE REGISTER_NAME (index_reg_regno), */ -/* OBSOLETE index_multiplier); */ -/* OBSOLETE break; */ -/* OBSOLETE case 11: */ -/* OBSOLETE read_memory (memaddr+4, buffer, MAXLEN); */ -/* OBSOLETE insn_size += 4; */ -/* OBSOLETE extra_1 = * ((int *) buffer); */ -/* OBSOLETE fprintf_unfiltered (stream, */ -/* OBSOLETE ((index_reg_regno) ? */ -/* OBSOLETE " $%#0x,%#0x(%s)[%s*%1d]" : " $%#0x,%#0x(%s)"), */ -/* OBSOLETE op_1_regno, */ -/* OBSOLETE extra_1, */ -/* OBSOLETE REGISTER_NAME (op_2_regno), */ -/* OBSOLETE REGISTER_NAME (index_reg_regno), */ -/* OBSOLETE index_multiplier); */ -/* OBSOLETE break; */ -/* OBSOLETE case 12: */ -/* OBSOLETE read_memory (memaddr+4, buffer, MAXLEN); */ -/* OBSOLETE insn_size += 4; */ -/* OBSOLETE extra_1 = * ((int *) buffer); */ -/* OBSOLETE read_memory (memaddr+8, buffer, MAXLEN); */ -/* OBSOLETE insn_size += 4; */ -/* OBSOLETE extra_2 = * ((int *) buffer); */ -/* OBSOLETE fprintf_unfiltered (stream, */ -/* OBSOLETE ((index_reg_regno) ? */ -/* OBSOLETE " $%#0x,%#0x(%s)[%s*%1d]" : " $%#0x,%#0x(%s)"), */ -/* OBSOLETE extra_1, */ -/* OBSOLETE extra_2, */ -/* OBSOLETE REGISTER_NAME (op_2_regno), */ -/* OBSOLETE REGISTER_NAME (index_reg_regno), */ -/* OBSOLETE index_multiplier); */ -/* OBSOLETE break; */ -/* OBSOLETE */ -/* OBSOLETE case 13: */ -/* OBSOLETE read_memory (memaddr+4, buffer, MAXLEN); */ -/* OBSOLETE insn_size += 4; */ -/* OBSOLETE extra_1 = * ((int *) buffer); */ -/* OBSOLETE fprintf_unfiltered (stream, */ -/* OBSOLETE ((index_reg_regno) */ -/* OBSOLETE ? " (%s),%#0x(%s)[%s*%1d]" */ -/* OBSOLETE : " (%s),%#0x(%s)"), */ -/* OBSOLETE REGISTER_NAME (op_1_regno), */ -/* OBSOLETE extra_1, */ -/* OBSOLETE REGISTER_NAME (op_2_regno), */ -/* OBSOLETE REGISTER_NAME (index_reg_regno), */ -/* OBSOLETE index_multiplier); */ -/* OBSOLETE break; */ -/* OBSOLETE case 14: */ -/* OBSOLETE read_memory (memaddr+4, buffer, MAXLEN); */ -/* OBSOLETE insn_size += 4; */ -/* OBSOLETE extra_1 = * ((int *) buffer); */ -/* OBSOLETE read_memory (memaddr+8, buffer, MAXLEN); */ -/* OBSOLETE insn_size += 4; */ -/* OBSOLETE extra_2 = * ((int *) buffer); */ -/* OBSOLETE fprintf_unfiltered (stream, */ -/* OBSOLETE ((index_reg_regno) ? "%#0x(%s),%#0x(%s)[%s*%1d]" */ -/* OBSOLETE : "%#0x(%s),%#0x(%s) "), */ -/* OBSOLETE extra_1, */ -/* OBSOLETE REGISTER_NAME (op_1_regno), */ -/* OBSOLETE extra_2, */ -/* OBSOLETE REGISTER_NAME (op_2_regno), */ -/* OBSOLETE REGISTER_NAME (index_reg_regno), */ -/* OBSOLETE index_multiplier); */ -/* OBSOLETE break; */ -/* OBSOLETE */ -/* OBSOLETE default: */ -/* OBSOLETE fprintf_unfiltered (stream, */ -/* OBSOLETE ((index_reg_regno) ? "%s,%s [%s*%1d]" : "%s,%s"), */ -/* OBSOLETE REGISTER_NAME (op_1_regno), */ -/* OBSOLETE REGISTER_NAME (op_2_regno), */ -/* OBSOLETE REGISTER_NAME (index_reg_regno), */ -/* OBSOLETE index_multiplier); */ -/* OBSOLETE fprintf_unfiltered (stream, */ -/* OBSOLETE "\t\t# unknown mode in %08x", */ -/* OBSOLETE insn); */ -/* OBSOLETE break; */ -/* OBSOLETE } /* switch *x/ */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE { */ -/* OBSOLETE return insn_size; */ -/* OBSOLETE } */ -/* OBSOLETE abort (); */ -/* OBSOLETE } */ diff --git a/gdb/pyr-xdep.c b/gdb/pyr-xdep.c deleted file mode 100644 index dd0ba1c..0000000 --- a/gdb/pyr-xdep.c +++ /dev/null @@ -1,369 +0,0 @@ -/* OBSOLETE /* Low level Pyramid interface to ptrace, for GDB when running under Unix. */ -/* OBSOLETE Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc. */ -/* OBSOLETE */ -/* OBSOLETE This file is part of GDB. */ -/* OBSOLETE */ -/* OBSOLETE This program is free software; you can redistribute it and/or modify */ -/* OBSOLETE it under the terms of the GNU General Public License as published by */ -/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */ -/* OBSOLETE (at your option) any later version. */ -/* OBSOLETE */ -/* OBSOLETE This program is distributed in the hope that it will be useful, */ -/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */ -/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ -/* OBSOLETE GNU General Public License for more details. */ -/* OBSOLETE */ -/* OBSOLETE You should have received a copy of the GNU General Public License */ -/* OBSOLETE along with this program; if not, write to the Free Software */ -/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #include "defs.h" */ -/* OBSOLETE #include "frame.h" */ -/* OBSOLETE #include "inferior.h" */ -/* OBSOLETE */ -/* OBSOLETE #include <sys/param.h> */ -/* OBSOLETE #include <sys/dir.h> */ -/* OBSOLETE #include <signal.h> */ -/* OBSOLETE #include <sys/ioctl.h> */ -/* OBSOLETE /* #include <fcntl.h> Can we live without this? *x/ */ -/* OBSOLETE */ -/* OBSOLETE #include "gdbcore.h" */ -/* OBSOLETE #include <sys/user.h> /* After a.out.h *x/ */ -/* OBSOLETE #include <sys/file.h> */ -/* OBSOLETE #include "gdb_stat.h" */ -/* OBSOLETE */ -/* OBSOLETE */ -/* OBSOLETE void */ -/* OBSOLETE fetch_inferior_registers (regno) */ -/* OBSOLETE int regno; */ -/* OBSOLETE { */ -/* OBSOLETE register int datum; */ -/* OBSOLETE register unsigned int regaddr; */ -/* OBSOLETE int reg_buf[NUM_REGS+1]; */ -/* OBSOLETE struct user u; */ -/* OBSOLETE register int skipped_frames = 0; */ -/* OBSOLETE */ -/* OBSOLETE registers_fetched (); */ -/* OBSOLETE */ -/* OBSOLETE for (regno = 0; regno < 64; regno++) { */ -/* OBSOLETE reg_buf[regno] = ptrace (3, inferior_pid, (PTRACE_ARG3_TYPE) regno, 0); */ -/* OBSOLETE */ -/* OBSOLETE #if defined(PYRAMID_CONTROL_FRAME_DEBUGGING) */ -/* OBSOLETE printf_unfiltered ("Fetching register %s, got %0x\n", */ -/* OBSOLETE REGISTER_NAME (regno), */ -/* OBSOLETE reg_buf[regno]); */ -/* OBSOLETE #endif /* PYRAMID_CONTROL_FRAME_DEBUGGING *x/ */ -/* OBSOLETE */ -/* OBSOLETE if (reg_buf[regno] == -1 && errno == EIO) { */ -/* OBSOLETE printf_unfiltered("fetch_interior_registers: fetching register %s\n", */ -/* OBSOLETE REGISTER_NAME (regno)); */ -/* OBSOLETE errno = 0; */ -/* OBSOLETE } */ -/* OBSOLETE supply_register (regno, reg_buf+regno); */ -/* OBSOLETE } */ -/* OBSOLETE /* that leaves regs 64, 65, and 66 *x/ */ -/* OBSOLETE datum = ptrace (3, inferior_pid, */ -/* OBSOLETE (PTRACE_ARG3_TYPE) (((char *)&u.u_pcb.pcb_csp) - */ -/* OBSOLETE ((char *)&u)), 0); */ -/* OBSOLETE */ -/* OBSOLETE */ -/* OBSOLETE */ -/* OBSOLETE /* FIXME: Find the Current Frame Pointer (CFP). CFP is a global */ -/* OBSOLETE register (ie, NOT windowed), that gets saved in a frame iff */ -/* OBSOLETE the code for that frame has a prologue (ie, "adsf N"). If */ -/* OBSOLETE there is a prologue, the adsf insn saves the old cfp in */ -/* OBSOLETE pr13, cfp is set to sp, and N bytes of locals are allocated */ -/* OBSOLETE (sp is decremented by n). */ -/* OBSOLETE This makes finding CFP hard. I guess the right way to do it */ -/* OBSOLETE is: */ -/* OBSOLETE - If this is the innermost frame, believe ptrace() or */ -/* OBSOLETE the core area. */ -/* OBSOLETE - Otherwise: */ -/* OBSOLETE Find the first insn of the current frame. */ -/* OBSOLETE - find the saved pc; */ -/* OBSOLETE - find the call insn that saved it; */ -/* OBSOLETE - figure out where the call is to; */ -/* OBSOLETE - if the first insn is an adsf, we got a frame */ -/* OBSOLETE pointer. *x/ */ -/* OBSOLETE */ -/* OBSOLETE */ -/* OBSOLETE /* Normal processors have separate stack pointers for user and */ -/* OBSOLETE kernel mode. Getting the last user mode frame on such */ -/* OBSOLETE machines is easy: the kernel context of the ptrace()'d */ -/* OBSOLETE process is on the kernel stack, and the USP points to what */ -/* OBSOLETE we want. But Pyramids only have a single cfp for both user and */ -/* OBSOLETE kernel mode. And processes being ptrace()'d have some */ -/* OBSOLETE kernel-context control frames on their stack. */ -/* OBSOLETE To avoid tracing back into the kernel context of an inferior, */ -/* OBSOLETE we skip 0 or more contiguous control frames where the pc is */ -/* OBSOLETE in the kernel. *x/ */ -/* OBSOLETE */ -/* OBSOLETE while (1) { */ -/* OBSOLETE register int inferior_saved_pc; */ -/* OBSOLETE inferior_saved_pc = ptrace (1, inferior_pid, */ -/* OBSOLETE (PTRACE_ARG3_TYPE) (datum+((32+15)*4)), 0); */ -/* OBSOLETE if (inferior_saved_pc > 0) break; */ -/* OBSOLETE #if defined(PYRAMID_CONTROL_FRAME_DEBUGGING) */ -/* OBSOLETE printf_unfiltered("skipping kernel frame %08x, pc=%08x\n", datum, */ -/* OBSOLETE inferior_saved_pc); */ -/* OBSOLETE #endif /* PYRAMID_CONTROL_FRAME_DEBUGGING *x/ */ -/* OBSOLETE skipped_frames++; */ -/* OBSOLETE datum -= CONTROL_STACK_FRAME_SIZE; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE reg_buf[CSP_REGNUM] = datum; */ -/* OBSOLETE supply_register(CSP_REGNUM, reg_buf+CSP_REGNUM); */ -/* OBSOLETE #ifdef PYRAMID_CONTROL_FRAME_DEBUGGING */ -/* OBSOLETE if (skipped_frames) { */ -/* OBSOLETE fprintf_unfiltered (gdb_stderr, */ -/* OBSOLETE "skipped %d frames from %x to %x; cfp was %x, now %x\n", */ -/* OBSOLETE skipped_frames, reg_buf[CSP_REGNUM]); */ -/* OBSOLETE } */ -/* OBSOLETE #endif /* PYRAMID_CONTROL_FRAME_DEBUGGING *x/ */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Store our register values back into the inferior. */ -/* OBSOLETE If REGNO is -1, do this for all registers. */ -/* OBSOLETE Otherwise, REGNO specifies which register (so we can save time). *x/ */ -/* OBSOLETE */ -/* OBSOLETE void */ -/* OBSOLETE store_inferior_registers (regno) */ -/* OBSOLETE int regno; */ -/* OBSOLETE { */ -/* OBSOLETE register unsigned int regaddr; */ -/* OBSOLETE char buf[80]; */ -/* OBSOLETE */ -/* OBSOLETE if (regno >= 0) */ -/* OBSOLETE { */ -/* OBSOLETE if ((0 <= regno) && (regno < 64)) { */ -/* OBSOLETE /*regaddr = register_addr (regno, offset);*x/ */ -/* OBSOLETE regaddr = regno; */ -/* OBSOLETE errno = 0; */ -/* OBSOLETE ptrace (6, inferior_pid, (PTRACE_ARG3_TYPE) regaddr, */ -/* OBSOLETE read_register (regno)); */ -/* OBSOLETE if (errno != 0) */ -/* OBSOLETE { */ -/* OBSOLETE sprintf (buf, "writing register number %d", regno); */ -/* OBSOLETE perror_with_name (buf); */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE else */ -/* OBSOLETE { */ -/* OBSOLETE for (regno = 0; regno < NUM_REGS; regno++) */ -/* OBSOLETE { */ -/* OBSOLETE /*regaddr = register_addr (regno, offset);*x/ */ -/* OBSOLETE regaddr = regno; */ -/* OBSOLETE errno = 0; */ -/* OBSOLETE ptrace (6, inferior_pid, (PTRACE_ARG3_TYPE) regaddr, */ -/* OBSOLETE read_register (regno)); */ -/* OBSOLETE if (errno != 0) */ -/* OBSOLETE { */ -/* OBSOLETE sprintf (buf, "writing all regs, number %d", regno); */ -/* OBSOLETE perror_with_name (buf); */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /*** Extensions to core and dump files, for GDB. *x/ */ -/* OBSOLETE */ -/* OBSOLETE extern unsigned int last_frame_offset; */ -/* OBSOLETE */ -/* OBSOLETE #ifdef PYRAMID_CORE */ -/* OBSOLETE */ -/* OBSOLETE /* Can't make definitions here static, since corefile.c needs them */ -/* OBSOLETE to do bounds checking on the core-file areas. O well. *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* have two stacks: one for data, one for register windows. *x/ */ -/* OBSOLETE extern CORE_ADDR reg_stack_start; */ -/* OBSOLETE extern CORE_ADDR reg_stack_end; */ -/* OBSOLETE */ -/* OBSOLETE /* need this so we can find the global registers: they never get saved. *x/ */ -/* OBSOLETE CORE_ADDR global_reg_offset; */ -/* OBSOLETE static CORE_ADDR last_frame_address; */ -/* OBSOLETE CORE_ADDR last_frame_offset; */ -/* OBSOLETE */ -/* OBSOLETE */ -/* OBSOLETE /* Address in core file of start of register window stack area. */ -/* OBSOLETE Don't know if is this any of meaningful, useful or necessary. *x/ */ -/* OBSOLETE extern int reg_stack_offset; */ -/* OBSOLETE */ -/* OBSOLETE #endif /* PYRAMID_CORE *x/ */ -/* OBSOLETE */ -/* OBSOLETE */ -/* OBSOLETE /* Work with core dump and executable files, for GDB. */ -/* OBSOLETE This code would be in corefile.c if it weren't machine-dependent. *x/ */ -/* OBSOLETE */ -/* OBSOLETE void */ -/* OBSOLETE core_file_command (filename, from_tty) */ -/* OBSOLETE char *filename; */ -/* OBSOLETE int from_tty; */ -/* OBSOLETE { */ -/* OBSOLETE int val; */ -/* OBSOLETE */ -/* OBSOLETE /* Discard all vestiges of any previous core file */ -/* OBSOLETE and mark data and stack spaces as empty. *x/ */ -/* OBSOLETE */ -/* OBSOLETE if (corefile) */ -/* OBSOLETE xfree (corefile); */ -/* OBSOLETE corefile = 0; */ -/* OBSOLETE */ -/* OBSOLETE if (corechan >= 0) */ -/* OBSOLETE close (corechan); */ -/* OBSOLETE corechan = -1; */ -/* OBSOLETE */ -/* OBSOLETE data_start = 0; */ -/* OBSOLETE data_end = 0; */ -/* OBSOLETE stack_start = STACK_END_ADDR; */ -/* OBSOLETE stack_end = STACK_END_ADDR; */ -/* OBSOLETE */ -/* OBSOLETE #ifdef PYRAMID_CORE */ -/* OBSOLETE reg_stack_start = CONTROL_STACK_ADDR; */ -/* OBSOLETE reg_stack_end = CONTROL_STACK_ADDR; /* this isn't strictly true...*x/ */ -/* OBSOLETE #endif /* PYRAMID_CORE *x/ */ -/* OBSOLETE */ -/* OBSOLETE /* Now, if a new core file was specified, open it and digest it. *x/ */ -/* OBSOLETE */ -/* OBSOLETE if (filename) */ -/* OBSOLETE { */ -/* OBSOLETE filename = tilde_expand (filename); */ -/* OBSOLETE make_cleanup (xfree, filename); */ -/* OBSOLETE */ -/* OBSOLETE if (have_inferior_p ()) */ -/* OBSOLETE error ("To look at a core file, you must kill the program with \"kill\"."); */ -/* OBSOLETE corechan = open (filename, O_RDONLY, 0); */ -/* OBSOLETE if (corechan < 0) */ -/* OBSOLETE perror_with_name (filename); */ -/* OBSOLETE /* 4.2-style (and perhaps also sysV-style) core dump file. *x/ */ -/* OBSOLETE { */ -/* OBSOLETE struct user u; */ -/* OBSOLETE */ -/* OBSOLETE unsigned int reg_offset; */ -/* OBSOLETE */ -/* OBSOLETE val = myread (corechan, &u, sizeof u); */ -/* OBSOLETE if (val < 0) */ -/* OBSOLETE perror_with_name ("Not a core file: reading upage"); */ -/* OBSOLETE if (val != sizeof u) */ -/* OBSOLETE error ("Not a core file: could only read %d bytes", val); */ -/* OBSOLETE data_start = exec_data_start; */ -/* OBSOLETE */ -/* OBSOLETE data_end = data_start + NBPG * u.u_dsize; */ -/* OBSOLETE data_offset = NBPG * UPAGES; */ -/* OBSOLETE stack_offset = NBPG * (UPAGES + u.u_dsize); */ -/* OBSOLETE */ -/* OBSOLETE /* find registers in core file *x/ */ -/* OBSOLETE #ifdef PYRAMID_PTRACE */ -/* OBSOLETE stack_start = stack_end - NBPG * u.u_ussize; */ -/* OBSOLETE reg_stack_offset = stack_offset + (NBPG *u.u_ussize); */ -/* OBSOLETE reg_stack_end = reg_stack_start + NBPG * u.u_cssize; */ -/* OBSOLETE */ -/* OBSOLETE last_frame_address = ((int) u.u_pcb.pcb_csp); */ -/* OBSOLETE last_frame_offset = reg_stack_offset + last_frame_address */ -/* OBSOLETE - CONTROL_STACK_ADDR ; */ -/* OBSOLETE global_reg_offset = (char *)&u - (char *)&u.u_pcb.pcb_gr0 ; */ -/* OBSOLETE */ -/* OBSOLETE /* skip any control-stack frames that were executed in the */ -/* OBSOLETE kernel. *x/ */ -/* OBSOLETE */ -/* OBSOLETE while (1) { */ -/* OBSOLETE char buf[4]; */ -/* OBSOLETE val = lseek (corechan, last_frame_offset+(47*4), 0); */ -/* OBSOLETE if (val < 0) */ -/* OBSOLETE perror_with_name (filename); */ -/* OBSOLETE val = myread (corechan, buf, sizeof buf); */ -/* OBSOLETE if (val < 0) */ -/* OBSOLETE perror_with_name (filename); */ -/* OBSOLETE */ -/* OBSOLETE if (*(int *)buf >= 0) */ -/* OBSOLETE break; */ -/* OBSOLETE printf_unfiltered ("skipping frame %s\n", local_hex_string (last_frame_address)); */ -/* OBSOLETE last_frame_offset -= CONTROL_STACK_FRAME_SIZE; */ -/* OBSOLETE last_frame_address -= CONTROL_STACK_FRAME_SIZE; */ -/* OBSOLETE } */ -/* OBSOLETE reg_offset = last_frame_offset; */ -/* OBSOLETE */ -/* OBSOLETE #if 1 || defined(PYRAMID_CONTROL_FRAME_DEBUGGING) */ -/* OBSOLETE printf_unfiltered ("Control stack pointer = %s\n", */ -/* OBSOLETE local_hex_string (u.u_pcb.pcb_csp)); */ -/* OBSOLETE printf_unfiltered ("offset to control stack %d outermost frame %d (%s)\n", */ -/* OBSOLETE reg_stack_offset, reg_offset, local_hex_string (last_frame_address)); */ -/* OBSOLETE #endif /* PYRAMID_CONTROL_FRAME_DEBUGGING *x/ */ -/* OBSOLETE */ -/* OBSOLETE #else /* not PYRAMID_CORE *x/ */ -/* OBSOLETE stack_start = stack_end - NBPG * u.u_ssize; */ -/* OBSOLETE reg_offset = (int) u.u_ar0 - KERNEL_U_ADDR; */ -/* OBSOLETE #endif /* not PYRAMID_CORE *x/ */ -/* OBSOLETE */ -/* OBSOLETE #ifdef __not_on_pyr_yet */ -/* OBSOLETE /* Some machines put an absolute address in here and some put */ -/* OBSOLETE the offset in the upage of the regs. *x/ */ -/* OBSOLETE reg_offset = (int) u.u_ar0; */ -/* OBSOLETE if (reg_offset > NBPG * UPAGES) */ -/* OBSOLETE reg_offset -= KERNEL_U_ADDR; */ -/* OBSOLETE #endif */ -/* OBSOLETE */ -/* OBSOLETE /* I don't know where to find this info. */ -/* OBSOLETE So, for now, mark it as not available. *x/ */ -/* OBSOLETE N_SET_MAGIC (core_aouthdr, 0); */ -/* OBSOLETE */ -/* OBSOLETE /* Read the register values out of the core file and store */ -/* OBSOLETE them where `read_register' will find them. *x/ */ -/* OBSOLETE */ -/* OBSOLETE { */ -/* OBSOLETE register int regno; */ -/* OBSOLETE */ -/* OBSOLETE for (regno = 0; regno < 64; regno++) */ -/* OBSOLETE { */ -/* OBSOLETE char buf[MAX_REGISTER_RAW_SIZE]; */ -/* OBSOLETE */ -/* OBSOLETE val = lseek (corechan, register_addr (regno, reg_offset), 0); */ -/* OBSOLETE if (val < 0 */ -/* OBSOLETE || (val = myread (corechan, buf, sizeof buf)) < 0) */ -/* OBSOLETE { */ -/* OBSOLETE char * buffer = (char *) alloca (strlen (REGISTER_NAME (regno)) */ -/* OBSOLETE + 30); */ -/* OBSOLETE strcpy (buffer, "Reading register "); */ -/* OBSOLETE strcat (buffer, REGISTER_NAME (regno)); */ -/* OBSOLETE */ -/* OBSOLETE perror_with_name (buffer); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE if (val < 0) */ -/* OBSOLETE perror_with_name (filename); */ -/* OBSOLETE #ifdef PYRAMID_CONTROL_FRAME_DEBUGGING */ -/* OBSOLETE printf_unfiltered ("[reg %s(%d), offset in file %s=0x%0x, addr =0x%0x, =%0x]\n", */ -/* OBSOLETE REGISTER_NAME (regno), regno, filename, */ -/* OBSOLETE register_addr(regno, reg_offset), */ -/* OBSOLETE regno * 4 + last_frame_address, */ -/* OBSOLETE *((int *)buf)); */ -/* OBSOLETE #endif /* PYRAMID_CONTROL_FRAME_DEBUGGING *x/ */ -/* OBSOLETE supply_register (regno, buf); */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE if (filename[0] == '/') */ -/* OBSOLETE corefile = savestring (filename, strlen (filename)); */ -/* OBSOLETE else */ -/* OBSOLETE { */ -/* OBSOLETE corefile = concat (current_directory, "/", filename, NULL); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE #if 1 || defined(PYRAMID_CONTROL_FRAME_DEBUGGING) */ -/* OBSOLETE printf_unfiltered ("Providing CSP (%s) as nominal address of current frame.\n", */ -/* OBSOLETE local_hex_string(last_frame_address)); */ -/* OBSOLETE #endif PYRAMID_CONTROL_FRAME_DEBUGGING */ -/* OBSOLETE /* FIXME: Which of the following is correct? *x/ */ -/* OBSOLETE #if 0 */ -/* OBSOLETE set_current_frame ( create_new_frame (read_register (FP_REGNUM), */ -/* OBSOLETE read_pc ())); */ -/* OBSOLETE #else */ -/* OBSOLETE set_current_frame ( create_new_frame (last_frame_address, */ -/* OBSOLETE read_pc ())); */ -/* OBSOLETE #endif */ -/* OBSOLETE */ -/* OBSOLETE select_frame (get_current_frame (), 0); */ -/* OBSOLETE validate_files (); */ -/* OBSOLETE } */ -/* OBSOLETE else if (from_tty) */ -/* OBSOLETE printf_unfiltered ("No core file now.\n"); */ -/* OBSOLETE } */ diff --git a/gdb/tahoe-tdep.c b/gdb/tahoe-tdep.c deleted file mode 100644 index e4011f3..0000000 --- a/gdb/tahoe-tdep.c +++ /dev/null @@ -1,262 +0,0 @@ -/* OBSOLETE /* Print instructions for Tahoe target machines, for GDB. */ -/* OBSOLETE Copyright 1986, 1989, 1991, 1992, 2000 Free Software Foundation, Inc. */ -/* OBSOLETE Contributed by the State University of New York at Buffalo, by the */ -/* OBSOLETE Distributed Computer Systems Lab, Department of Computer Science, 1991. */ -/* OBSOLETE */ -/* OBSOLETE This file is part of GDB. */ -/* OBSOLETE */ -/* OBSOLETE This program is free software; you can redistribute it and/or modify */ -/* OBSOLETE it under the terms of the GNU General Public License as published by */ -/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */ -/* OBSOLETE (at your option) any later version. */ -/* OBSOLETE */ -/* OBSOLETE This program is distributed in the hope that it will be useful, */ -/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */ -/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ -/* OBSOLETE GNU General Public License for more details. */ -/* OBSOLETE */ -/* OBSOLETE You should have received a copy of the GNU General Public License */ -/* OBSOLETE along with this program; if not, write to the Free Software */ -/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */ -/* OBSOLETE Boston, MA 02111-1307, USA. *x/ */ -/* OBSOLETE */ -/* OBSOLETE #include "defs.h" */ -/* OBSOLETE #include "symtab.h" */ -/* OBSOLETE #include "opcode/tahoe.h" */ -/* OBSOLETE */ -/* OBSOLETE /* Tahoe instructions are never longer than this. *x/ */ -/* OBSOLETE #define MAXLEN 62 */ -/* OBSOLETE */ -/* OBSOLETE /* Number of elements in the opcode table. *x/ */ -/* OBSOLETE #define NOPCODES (sizeof votstrs / sizeof votstrs[0]) */ -/* OBSOLETE */ -/* OBSOLETE static unsigned char *print_insn_arg (); */ -/* OBSOLETE */ -/* OBSOLETE /* Advance PC across any function entry prologue instructions */ -/* OBSOLETE to reach some "real" code. *x/ */ -/* OBSOLETE */ -/* OBSOLETE CORE_ADDR */ -/* OBSOLETE tahoe_skip_prologue (pc) */ -/* OBSOLETE CORE_ADDR pc; */ -/* OBSOLETE { */ -/* OBSOLETE register int op = (unsigned char) read_memory_integer (pc, 1); */ -/* OBSOLETE if (op == 0x11) */ -/* OBSOLETE pc += 2; /* skip brb *x/ */ -/* OBSOLETE if (op == 0x13) */ -/* OBSOLETE pc += 3; /* skip brw *x/ */ -/* OBSOLETE if (op == 0x2c */ -/* OBSOLETE && ((unsigned char) read_memory_integer (pc + 2, 1)) == 0x5e) */ -/* OBSOLETE pc += 3; /* skip subl2 *x/ */ -/* OBSOLETE if (op == 0xe9 */ -/* OBSOLETE && ((unsigned char) read_memory_integer (pc + 1, 1)) == 0xae */ -/* OBSOLETE && ((unsigned char) read_memory_integer (pc + 3, 1)) == 0x5e) */ -/* OBSOLETE pc += 4; /* skip movab *x/ */ -/* OBSOLETE if (op == 0xe9 */ -/* OBSOLETE && ((unsigned char) read_memory_integer (pc + 1, 1)) == 0xce */ -/* OBSOLETE && ((unsigned char) read_memory_integer (pc + 4, 1)) == 0x5e) */ -/* OBSOLETE pc += 5; /* skip movab *x/ */ -/* OBSOLETE if (op == 0xe9 */ -/* OBSOLETE && ((unsigned char) read_memory_integer (pc + 1, 1)) == 0xee */ -/* OBSOLETE && ((unsigned char) read_memory_integer (pc + 6, 1)) == 0x5e) */ -/* OBSOLETE pc += 7; /* skip movab *x/ */ -/* OBSOLETE return pc; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Return number of args passed to a frame. */ -/* OBSOLETE Can return -1, meaning no way to tell. *x/ */ -/* OBSOLETE */ -/* OBSOLETE int */ -/* OBSOLETE tahoe_frame_num_args (fi) */ -/* OBSOLETE struct frame_info *fi; */ -/* OBSOLETE { */ -/* OBSOLETE return (((0xffff & read_memory_integer (((fi)->frame - 4), 4)) - 4) >> 2); */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE /* Print the Tahoe instruction at address MEMADDR in debugged memory, */ -/* OBSOLETE on STREAM. Returns length of the instruction, in bytes. *x/ */ -/* OBSOLETE */ -/* OBSOLETE int */ -/* OBSOLETE tahoe_print_insn (memaddr, stream) */ -/* OBSOLETE CORE_ADDR memaddr; */ -/* OBSOLETE struct ui_file *stream; */ -/* OBSOLETE { */ -/* OBSOLETE unsigned char buffer[MAXLEN]; */ -/* OBSOLETE register int i; */ -/* OBSOLETE register unsigned char *p; */ -/* OBSOLETE register char *d; */ -/* OBSOLETE */ -/* OBSOLETE read_memory (memaddr, buffer, MAXLEN); */ -/* OBSOLETE */ -/* OBSOLETE for (i = 0; i < NOPCODES; i++) */ -/* OBSOLETE if (votstrs[i].detail.code == buffer[0] */ -/* OBSOLETE || votstrs[i].detail.code == *(unsigned short *) buffer) */ -/* OBSOLETE break; */ -/* OBSOLETE */ -/* OBSOLETE /* Handle undefined instructions. *x/ */ -/* OBSOLETE if (i == NOPCODES) */ -/* OBSOLETE { */ -/* OBSOLETE fprintf_unfiltered (stream, "0%o", buffer[0]); */ -/* OBSOLETE return 1; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE fprintf_unfiltered (stream, "%s", votstrs[i].name); */ -/* OBSOLETE */ -/* OBSOLETE /* Point at first byte of argument data, */ -/* OBSOLETE and at descriptor for first argument. *x/ */ -/* OBSOLETE p = buffer + 1 + (votstrs[i].detail.code >= 0x100); */ -/* OBSOLETE d = votstrs[i].detail.args; */ -/* OBSOLETE */ -/* OBSOLETE if (*d) */ -/* OBSOLETE fputc_unfiltered ('\t', stream); */ -/* OBSOLETE */ -/* OBSOLETE while (*d) */ -/* OBSOLETE { */ -/* OBSOLETE p = print_insn_arg (d, p, memaddr + (p - buffer), stream); */ -/* OBSOLETE d += 2; */ -/* OBSOLETE if (*d) */ -/* OBSOLETE fprintf_unfiltered (stream, ","); */ -/* OBSOLETE } */ -/* OBSOLETE return p - buffer; */ -/* OBSOLETE } */ -/* OBSOLETE /*******************************************************************x/ */ -/* OBSOLETE static unsigned char * */ -/* OBSOLETE print_insn_arg (d, p, addr, stream) */ -/* OBSOLETE char *d; */ -/* OBSOLETE register char *p; */ -/* OBSOLETE CORE_ADDR addr; */ -/* OBSOLETE struct ui_file *stream; */ -/* OBSOLETE { */ -/* OBSOLETE int temp1 = 0; */ -/* OBSOLETE register int regnum = *p & 0xf; */ -/* OBSOLETE float floatlitbuf; */ -/* OBSOLETE */ -/* OBSOLETE if (*d == 'b') */ -/* OBSOLETE { */ -/* OBSOLETE if (d[1] == 'b') */ -/* OBSOLETE fprintf_unfiltered (stream, "0x%x", addr + *p++ + 1); */ -/* OBSOLETE else */ -/* OBSOLETE { */ -/* OBSOLETE */ -/* OBSOLETE temp1 = *p; */ -/* OBSOLETE temp1 <<= 8; */ -/* OBSOLETE temp1 |= *(p + 1); */ -/* OBSOLETE fprintf_unfiltered (stream, "0x%x", addr + temp1 + 2); */ -/* OBSOLETE p += 2; */ -/* OBSOLETE } */ -/* OBSOLETE } */ -/* OBSOLETE else */ -/* OBSOLETE switch ((*p++ >> 4) & 0xf) */ -/* OBSOLETE { */ -/* OBSOLETE case 0: */ -/* OBSOLETE case 1: */ -/* OBSOLETE case 2: */ -/* OBSOLETE case 3: /* Literal (short immediate byte) mode *x/ */ -/* OBSOLETE if (d[1] == 'd' || d[1] == 'f' || d[1] == 'g' || d[1] == 'h') */ -/* OBSOLETE { */ -/* OBSOLETE *(int *) &floatlitbuf = 0x4000 + ((p[-1] & 0x3f) << 4); */ -/* OBSOLETE fprintf_unfiltered (stream, "$%f", floatlitbuf); */ -/* OBSOLETE } */ -/* OBSOLETE else */ -/* OBSOLETE fprintf_unfiltered (stream, "$%d", p[-1] & 0x3f); */ -/* OBSOLETE break; */ -/* OBSOLETE */ -/* OBSOLETE case 4: /* Indexed *x/ */ -/* OBSOLETE p = (char *) print_insn_arg (d, p, addr + 1, stream); */ -/* OBSOLETE fprintf_unfiltered (stream, "[%s]", REGISTER_NAME (regnum)); */ -/* OBSOLETE break; */ -/* OBSOLETE */ -/* OBSOLETE case 5: /* Register *x/ */ -/* OBSOLETE fprintf_unfiltered (stream, REGISTER_NAME (regnum)); */ -/* OBSOLETE break; */ -/* OBSOLETE */ -/* OBSOLETE case 7: /* Autodecrement *x/ */ -/* OBSOLETE fputc_unfiltered ('-', stream); */ -/* OBSOLETE case 6: /* Register deferred *x/ */ -/* OBSOLETE fprintf_unfiltered (stream, "(%s)", REGISTER_NAME (regnum)); */ -/* OBSOLETE break; */ -/* OBSOLETE */ -/* OBSOLETE case 9: /* Absolute Address & Autoincrement deferred *x/ */ -/* OBSOLETE fputc_unfiltered ('*', stream); */ -/* OBSOLETE if (regnum == PC_REGNUM) */ -/* OBSOLETE { */ -/* OBSOLETE temp1 = *p; */ -/* OBSOLETE temp1 <<= 8; */ -/* OBSOLETE temp1 |= *(p + 1); */ -/* OBSOLETE */ -/* OBSOLETE fputc_unfiltered ('$', stream); */ -/* OBSOLETE print_address (temp1, stream); */ -/* OBSOLETE p += 4; */ -/* OBSOLETE break; */ -/* OBSOLETE } */ -/* OBSOLETE case 8: /*Immediate & Autoincrement SP *x/ */ -/* OBSOLETE if (regnum == 8) /*88 is Immediate Byte Mode *x/ */ -/* OBSOLETE fprintf_unfiltered (stream, "$%d", *p++); */ -/* OBSOLETE */ -/* OBSOLETE else if (regnum == 9) /*89 is Immediate Word Mode *x/ */ -/* OBSOLETE { */ -/* OBSOLETE temp1 = *p; */ -/* OBSOLETE temp1 <<= 8; */ -/* OBSOLETE temp1 |= *(p + 1); */ -/* OBSOLETE fprintf_unfiltered (stream, "$%d", temp1); */ -/* OBSOLETE p += 2; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE else if (regnum == PC_REGNUM) /*8F is Immediate Long Mode *x/ */ -/* OBSOLETE { */ -/* OBSOLETE temp1 = *p; */ -/* OBSOLETE temp1 <<= 8; */ -/* OBSOLETE temp1 |= *(p + 1); */ -/* OBSOLETE temp1 <<= 8; */ -/* OBSOLETE temp1 |= *(p + 2); */ -/* OBSOLETE temp1 <<= 8; */ -/* OBSOLETE temp1 |= *(p + 3); */ -/* OBSOLETE fprintf_unfiltered (stream, "$%d", temp1); */ -/* OBSOLETE p += 4; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE else /*8E is Autoincrement SP Mode *x/ */ -/* OBSOLETE fprintf_unfiltered (stream, "(%s)+", REGISTER_NAME (regnum)); */ -/* OBSOLETE break; */ -/* OBSOLETE */ -/* OBSOLETE case 11: /* Register + Byte Displacement Deferred Mode *x/ */ -/* OBSOLETE fputc_unfiltered ('*', stream); */ -/* OBSOLETE case 10: /* Register + Byte Displacement Mode *x/ */ -/* OBSOLETE if (regnum == PC_REGNUM) */ -/* OBSOLETE print_address (addr + *p + 2, stream); */ -/* OBSOLETE else */ -/* OBSOLETE fprintf_unfiltered (stream, "%d(%s)", *p, REGISTER_NAME (regnum)); */ -/* OBSOLETE p += 1; */ -/* OBSOLETE break; */ -/* OBSOLETE */ -/* OBSOLETE case 13: /* Register + Word Displacement Deferred Mode *x/ */ -/* OBSOLETE fputc_unfiltered ('*', stream); */ -/* OBSOLETE case 12: /* Register + Word Displacement Mode *x/ */ -/* OBSOLETE temp1 = *p; */ -/* OBSOLETE temp1 <<= 8; */ -/* OBSOLETE temp1 |= *(p + 1); */ -/* OBSOLETE if (regnum == PC_REGNUM) */ -/* OBSOLETE print_address (addr + temp1 + 3, stream); */ -/* OBSOLETE else */ -/* OBSOLETE fprintf_unfiltered (stream, "%d(%s)", temp1, REGISTER_NAME (regnum)); */ -/* OBSOLETE p += 2; */ -/* OBSOLETE break; */ -/* OBSOLETE */ -/* OBSOLETE case 15: /* Register + Long Displacement Deferred Mode *x/ */ -/* OBSOLETE fputc_unfiltered ('*', stream); */ -/* OBSOLETE case 14: /* Register + Long Displacement Mode *x/ */ -/* OBSOLETE temp1 = *p; */ -/* OBSOLETE temp1 <<= 8; */ -/* OBSOLETE temp1 |= *(p + 1); */ -/* OBSOLETE temp1 <<= 8; */ -/* OBSOLETE temp1 |= *(p + 2); */ -/* OBSOLETE temp1 <<= 8; */ -/* OBSOLETE temp1 |= *(p + 3); */ -/* OBSOLETE if (regnum == PC_REGNUM) */ -/* OBSOLETE print_address (addr + temp1 + 5, stream); */ -/* OBSOLETE else */ -/* OBSOLETE fprintf_unfiltered (stream, "%d(%s)", temp1, REGISTER_NAME (regnum)); */ -/* OBSOLETE p += 4; */ -/* OBSOLETE } */ -/* OBSOLETE */ -/* OBSOLETE return (unsigned char *) p; */ -/* OBSOLETE } */ |