*** gdb-4.13/bfd/coff-apollo.c-dist	Mon Jun 20 16:54:06 1994
--- gdb-4.13/bfd/coff-apollo.c	Wed Sep 21 17:24:34 1994
***************
*** 27,37 ****
--- 27,78 ----
  #include "coff/internal.h"
  #include "libcoff.h"
  
+ #define DOIT(x) \
+   x = ( (x & ~howto->dst_mask) | (((x & howto->src_mask) +  relocation) & howto->dst_mask))
+ 
+ /* This special function handles Apollo relocations.  Normal COFF
+    relocations are used, except that common symbols have the symbol
+    value included in the relocation target.  */
+ 
+ static bfd_reloc_status_type
+ DEFUN (coff_apollo_reloc, (abfd, reloc_entry, symbol, data,
+ 			   input_section, output_bfd),
+        bfd *abfd AND
+        arelent *reloc_entry AND
+        asymbol *symbol AND
+        PTR data AND
+        asection *input_section AND
+        bfd *output_bfd)
+ {
+   bfd_size_type addr = reloc_entry->address;
+   reloc_howto_type *howto = reloc_entry->howto;
+   bfd_vma relocation = symbol->value;
+ 
+   if (     bfd_is_com_section (symbol->section)   &&   relocation
+       &&   howto->size == 2)
+     {
+       /* This should be the only case possible for Apollo.  Add
+ 	 the common size to the target.  */
+       long  x = bfd_get_32 (abfd, (bfd_byte *) data + addr);
+       DOIT (x);
+       bfd_put_32 (abfd, x, (bfd_byte *)data + addr);
+     }
+ 
+   /* Let bfd_perform_relocation handle all other relocations.  */
+   return bfd_reloc_continue;
+ }
+ 
  #ifdef ONLY_DECLARE_RELOCS
  extern reloc_howto_type apollocoff_howto_table[];
  #else
  reloc_howto_type apollocoff_howto_table[] = 
  {
+   /* WJE:  Apollo uses only R_DIR32 as late as SR10.3.5.  Relocation types
+      R_RELLONG and R_PCRLONG cause "illegal relocation type" messages
+      from the Apollo /bin/ld.  If another loader is used, these could be
+      permitted.  Apollo executables have relocations for routines in
+      shared libraries.  These are also restricted to R_DIR32 only.
+      For now, comment out the relative modes.
    HOWTO(R_RELBYTE,	       0,  0,  	8,  false, 0, complain_overflow_bitfield, 0, "8",	true, 0x000000ff,0x000000ff, false),
    HOWTO(R_RELWORD,	       0,  1, 	16, false, 0, complain_overflow_bitfield, 0, "16",	true, 0x0000ffff,0x0000ffff, false),
    HOWTO(R_RELLONG,	       0,  2, 	32, false, 0, complain_overflow_bitfield, 0, "32",	true, 0xffffffff,0xffffffff, false),
***************
*** 38,44 ****
    HOWTO(R_PCRBYTE,	       0,  0, 	8,  true,  0, complain_overflow_signed, 0, "DISP8",    true, 0x000000ff,0x000000ff, false),
    HOWTO(R_PCRWORD,	       0,  1, 	16, true,  0, complain_overflow_signed, 0, "DISP16",   true, 0x0000ffff,0x0000ffff, false),
    HOWTO(R_PCRLONG,	       0,  2, 	32, true,  0, complain_overflow_signed, 0, "DISP32",   true, 0xffffffff,0xffffffff, false),
!   HOWTO(R_RELLONG_NEG,	       0,  -2, 	32, false, 0, complain_overflow_bitfield, 0, "-32",	true, 0xffffffff,0xffffffff, false),
  };
  #endif /* not ONLY_DECLARE_RELOCS */
  
--- 79,87 ----
    HOWTO(R_PCRBYTE,	       0,  0, 	8,  true,  0, complain_overflow_signed, 0, "DISP8",    true, 0x000000ff,0x000000ff, false),
    HOWTO(R_PCRWORD,	       0,  1, 	16, true,  0, complain_overflow_signed, 0, "DISP16",   true, 0x0000ffff,0x0000ffff, false),
    HOWTO(R_PCRLONG,	       0,  2, 	32, true,  0, complain_overflow_signed, 0, "DISP32",   true, 0xffffffff,0xffffffff, false),
!   HOWTO(R_RELLONG_NEG,	       0,  -2, 	32, false, 0, complain_overflow_bitfield, 0, "-32",	true, 0xffffffff,0xffffffff, false), */
! 
!   HOWTO(R_DIR32,	       0,  2, 	32, false, 0, complain_overflow_bitfield, coff_apollo_reloc, "32",	true, 0xffffffff,0xffffffff, false)
  };
  #endif /* not ONLY_DECLARE_RELOCS */
  
***************
*** 59,73 ****
       int relocentry;
  {
    switch (relocentry) 
!   {
!    case R_RELBYTE:	internal->howto = apollocoff_howto_table + 0; break;
!    case R_RELWORD:	internal->howto = apollocoff_howto_table + 1; break;
!    case R_RELLONG:	internal->howto = apollocoff_howto_table + 2; break;
!    case R_PCRBYTE:	internal->howto = apollocoff_howto_table + 3; break;
!    case R_PCRWORD:	internal->howto = apollocoff_howto_table + 4; break;
!    case R_PCRLONG:	internal->howto = apollocoff_howto_table + 5; break;
!    case R_RELLONG_NEG:	internal->howto = apollocoff_howto_table + 6; break;
!   }
  }
  
  int 
--- 102,122 ----
       int relocentry;
  {
    switch (relocentry) 
!     {
!     /* WJE:  commented out
!     case R_RELBYTE:	internal->howto = apollocoff_howto_table + 0; break;
!     case R_RELWORD:	internal->howto = apollocoff_howto_table + 1; break;
!     case R_RELLONG:	internal->howto = apollocoff_howto_table + 2; break;
!     case R_PCRBYTE:	internal->howto = apollocoff_howto_table + 3; break;
!     case R_PCRWORD:	internal->howto = apollocoff_howto_table + 4; break;
!     case R_PCRLONG:	internal->howto = apollocoff_howto_table + 5; break;
!     case R_RELLONG_NEG:	internal->howto = apollocoff_howto_table + 6; break; */
! 
!     case R_DIR32:	internal->howto = apollocoff_howto_table + 0; break;
!     default:
!       internal->howto = 0;
!       BFD_FAIL ();
!     }
  }
  
  int 
***************
*** 75,99 ****
       CONST struct reloc_howto_struct *internal;
  {
    if (internal->pc_relative) 
-   {
-     switch (internal->bitsize) 
      {
!      case 32: return R_PCRLONG;
!      case 16: return R_PCRWORD;
!      case 8: return R_PCRBYTE;
      }
!   }
    else
!   {
!     switch (internal->bitsize)
!      {
!       case 32: return R_RELLONG;
!       case 16: return R_RELWORD;
!       case 8: return R_RELBYTE;
!      }
!   }
!   return R_RELLONG;    
  }
  #endif /* not ONLY_DECLARE_RELOCS */
  
  #define RTYPE2HOWTO(internal, relocentry) \
--- 124,169 ----
       CONST struct reloc_howto_struct *internal;
  {
    if (internal->pc_relative) 
      {
!       /* WJE:  commented out
!       switch (internal->bitsize) 
! 	{
! 	case 32: return R_PCRLONG;
! 	case 16: return R_PCRWORD;
! 	case 8: return R_PCRBYTE;
! 	} */
! 
!       BFD_FAIL ();
!       return 0;
      }
!   /* WJE:  commented out
    else
!     {
!       switch (internal->bitsize)
! 	{
! 	case 32: return R_RELLONG;
! 	case 16: return R_RELWORD;
! 	case 8: return R_RELBYTE;
! 	}
!     }
!   return R_RELLONG; */
! 
!   return R_DIR32;
  }
+ 
+ static reloc_howto_type *
+ DEFUN (coff_apollo_reloc_type_lookup, (abfd, code),
+        bfd *abfd AND
+        bfd_reloc_code_real_type code)
+ {
+   switch (code)
+     {
+     case BFD_RELOC_32:
+       return apollocoff_howto_table + 0;
+     default:
+       return 0;
+     }
+ }
  #endif /* not ONLY_DECLARE_RELOCS */
  
  #define RTYPE2HOWTO(internal, relocentry) \
***************
*** 103,109 ****
--- 173,224 ----
    external.r_type = apollo_howto2rtype(internal);
  
  #include "coffcode.h"
+ #undef coff_bfd_reloc_type_lookup
+ #define coff_bfd_reloc_type_lookup coff_apollo_reloc_type_lookup
+ #undef coff_close_and_cleanup
+ #define coff_close_and_cleanup apollo_coff_close_and_cleanup
  
+ boolean
+ DEFUN (apollo_coff_mkobject,(abfd),
+        bfd *abfd)
+ {
+   int ok = coff_mkobject (abfd);
+ 
+   /* Apollo object files always have an aouthdr.  Setting the flag
+      EXEC_P will create an aouthdr.  */
+   if (ok)
+     abfd->flags |= EXEC_P;
+ 
+   return ok;
+ }
+ 
+ boolean
+ DEFUN (apollo_coff_close_and_cleanup, (abfd),
+        bfd *abfd)
+ {
+   char *cmd;
+   int old_errno;
+ 
+   if (abfd->direction == write_direction)
+     {
+       /* Change the file type to coff, ignoring any failures.  It will
+ 	 fail if the file is on an NFS-mounted filesystem.  A flush is
+ 	 done before changing the file type for safety.
+ 	 This method is simpler than using ios_$ calls to create the file
+ 	 and safer than using unreleased file_$ calls to change the type.  */
+       bfd_flush (abfd);
+       old_errno = errno;
+       cmd = alloca (32 + strlen (abfd->filename));
+       if (cmd)
+ 	{
+ 	  sprintf (cmd, "/com/obty '%s' coff", abfd->filename);
+ 	  system (cmd);
+ 	}
+       errno = old_errno;
+     }
+   return true;
+ }
+ 
  const bfd_target 
  #ifdef TARGET_SYM
    TARGET_SYM =
***************
*** 130,138 ****
  #else
    0,				/* leading underscore */
  #endif
!   '/',				/* ar_pad_char */
    15,				/* ar_max_namelen */
!   3,				/* minimum section alignment */
    bfd_getb64, bfd_getb_signed_64, bfd_putb64,
       bfd_getb32, bfd_getb_signed_32, bfd_putb32,
       bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */
--- 245,253 ----
  #else
    0,				/* leading underscore */
  #endif
!   ' ',				/* ar_pad_char */
    15,				/* ar_max_namelen */
!   2,				/* minimum section alignment */
    bfd_getb64, bfd_getb_signed_64, bfd_putb64,
       bfd_getb32, bfd_getb_signed_32, bfd_putb32,
       bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */
***************
*** 142,148 ****
  
   {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
     bfd_generic_archive_p, _bfd_dummy_target},
!  {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
     bfd_false},
   {bfd_false, coff_write_object_contents, /* bfd_write_contents */
     _bfd_write_archive_contents, bfd_false},
--- 257,263 ----
  
   {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
     bfd_generic_archive_p, _bfd_dummy_target},
!  {bfd_false, apollo_coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
     bfd_false},
   {bfd_false, coff_write_object_contents, /* bfd_write_contents */
     _bfd_write_archive_contents, bfd_false},
*** gdb-4.13/bfd/coffcode.h-dist	Tue Jun 21 11:46:48 1994
--- gdb-4.13/bfd/coffcode.h	Wed Sep 21 17:24:34 1994
***************
*** 318,327 ****
--- 318,335 ----
    if (!strcmp (sec_name, _TEXT))
      {
        styp_flags = STYP_TEXT;
+ #ifdef STYP_INSTRUCTION
+       /* For Apollo */
+       styp_flags |= STYP_INSTRUCTION;
+ #endif
      }
    else if (!strcmp (sec_name, _DATA))
      {
        styp_flags = STYP_DATA;
+ #ifdef STYP_ZERO
+       /* For Apollo */
+       styp_flags |= STYP_ZERO;
+ #endif
  #ifdef TWO_DATA_SECS
      }
    else if (!strcmp (sec_name, ".data2"))
***************
*** 329,334 ****
--- 337,383 ----
        styp_flags = STYP_DATA;
  #endif /* TWO_DATA_SECS */
      }
+ #ifdef _APTV
+   /* For Apollo.  Add the common Apollo section names.  If an _RWDI
+      compressed data section is used, then the data section flags would
+      have to be set to REG, BSS, ZERO, COMPRESSED.  */
+   else if (!strcmp(sec_name, _APTV))
+     {
+       styp_flags = STYP_DATA;
+     }
+   else if (!strcmp(sec_name, _BLOCKS))
+     {
+       styp_flags = STYP_RELOCATED_NOT_LOADED | STYP_DEBUG;
+     }
+   else if (!strcmp(sec_name, _INLIB))
+     {
+       styp_flags = STYP_LIB;
+     }
+   else if (!strcmp(sec_name, _LINES))
+     {
+       styp_flags = STYP_RELOCATED_NOT_LOADED | STYP_DEBUG;
+     }
+   else if (!strcmp(sec_name, _MIR))
+     {
+       styp_flags = STYP_INFO;
+     }
+   else if (!strcmp(sec_name, _RWDI))
+     {
+       styp_flags = STYP_RELOCATED_NOT_LOADED;
+     }
+   else if (!strcmp(sec_name, _SRI))
+     {
+       styp_flags = STYP_INFO;
+     }
+   else if (!strcmp(sec_name, _SYMBOLS))
+     {
+       styp_flags = STYP_RELOCATED_NOT_LOADED | STYP_DEBUG;
+     }
+   else if (!strcmp(sec_name, _UNWIND))
+     {
+       styp_flags = STYP_TEXT;
+     }
+ #endif /* _APTV */
    else if (!strcmp (sec_name, _BSS))
      {
        styp_flags = STYP_BSS;
***************
*** 359,369 ****
        styp_flags = STYP_INFO;
  #endif
      }
!   else if (!strcmp (sec_name, ".stab")
! 	   || !strncmp (sec_name, ".stabstr", 8))
      {
        styp_flags = STYP_INFO;
      }
    /* Try and figure out what it should be */
    else if (sec_flags & SEC_CODE)
      {
--- 408,426 ----
        styp_flags = STYP_INFO;
  #endif
      }
!   else if (!strcmp(sec_name, ".stab"))
      {
+ #ifdef STYP_RELOCATED_NOT_LOADED
+       /* For Apollo */
+       styp_flags = STYP_RELOCATED_NOT_LOADED;
+ #else
        styp_flags = STYP_INFO;
+ #endif
      }
+   else if (!strncmp(sec_name, ".stabstr", 8))
+     {
+       styp_flags = STYP_INFO;
+     }
    /* Try and figure out what it should be */
    else if (sec_flags & SEC_CODE)
      {
***************
*** 457,462 ****
--- 514,525 ----
        sec_flags |= SEC_DEBUGGING;
  #endif
      }
+ #ifdef STYP_RELOCATED_NOT_LOADED
+   else if (styp_flags & STYP_RELOCATED_NOT_LOADED)
+     {
+       /* For Apollo.  Like STYP_INFO above without COFF_PAGE_SIZE code.  */
+     }
+ #endif
    else
      {
        sec_flags |= SEC_ALLOC | SEC_LOAD;
***************
*** 1203,1209 ****
  #ifdef MC68MAGIC
      case bfd_arch_m68k:
  #ifdef APOLLOM68KMAGIC
!       *magicp = APOLLO_COFF_VERSION_NUMBER;
  #else
        *magicp = MC68MAGIC;
  #endif
--- 1266,1281 ----
  #ifdef MC68MAGIC
      case bfd_arch_m68k:
  #ifdef APOLLOM68KMAGIC
!     /* WJE:  Apollo object files always have an aouthdr.  Set EXEC_P
!        so one will be generated by coff_write_object_contents ().  */
!     *magicp = APOLLOM68KMAGIC;
!     *flagsp  = EXEC_P;
! 
!     /* If there are no text section relocations, set F_PIC.  The first
!        section is assumed to be the text section.  Such code may be
!        used as a shared library.  */
!     if (abfd->sections   &&   abfd->sections->reloc_count == 0)
!       *flagsp |= F_PIC;
  #else
        *magicp = MC68MAGIC;
  #endif
***************
*** 1399,1405 ****
  
  /* If .file, .text, .data, .bss symbols are missing, add them.  */
  /* @@ Should we only be adding missing symbols, or overriding the aux
!    values for existing section symbols?  */
  static boolean
  coff_add_missing_symbols (abfd)
       bfd *abfd;
--- 1471,1478 ----
  
  /* If .file, .text, .data, .bss symbols are missing, add them.  */
  /* @@ Should we only be adding missing symbols, or overriding the aux
!    values for existing section symbols?  WJE:  the previous aux entry
!    is usually inaccurate, so it should be updated here.  */
  static boolean
  coff_add_missing_symbols (abfd)
       bfd *abfd;
***************
*** 1429,1434 ****
--- 1502,1508 ----
  	  if (!strcmp (name, _TEXT))
  	    need_text = 0;
  #ifdef APOLLO_M68
+ 	  /* WJE:  my GCC patches eliminate the need for this.  */
  	  else if (!strcmp (name, ".wtext"))
  	    need_text = 0;
  #endif
***************
*** 1436,1441 ****
--- 1510,1519 ----
  	    need_data = 0;
  	  else if (!strcmp (name, _BSS))
  	    need_bss = 0;
+ 
+ 	  /* WJE:  Update section symbol aux entry.  */
+ 	  if (sympp[i]->flags & BSF_SECTION_SYM)
+ 	    (void) coff_section_symbol (abfd, name);
  	}
      }
    /* Now i == bfd_get_symcount (abfd).  */
*** gdb-4.13/bfd/coffswap.h-dist	Sat Aug 13 18:02:51 1994
--- gdb-4.13/bfd/coffswap.h	Wed Sep 21 17:24:34 1994
***************
*** 644,649 ****
--- 644,658 ----
    bfd_h_put_32(abfd, aouthdr_in->tagentries, (bfd_byte *) aouthdr_out->tagentries);
  #endif
  
+   /* FIXME not all platforms are here yet.  */
+ 
+ #ifdef APOLLO_M68
+   bfd_h_put_32(abfd, aouthdr_in->o_inlib, (bfd_byte *) aouthdr_out->o_inlib);
+   bfd_h_put_32(abfd, aouthdr_in->o_sri, (bfd_byte *) aouthdr_out->o_sri);
+   bfd_h_put_32(abfd, aouthdr_in->vid[0], (bfd_byte *) aouthdr_out->vid);
+   bfd_h_put_32(abfd, aouthdr_in->vid[1], (bfd_byte *) aouthdr_out->vid+4);
+ #endif
+ 
  #ifdef MIPSECOFF
    bfd_h_put_32(abfd, aouthdr_in->bss_start, (bfd_byte *) aouthdr_out->bss_start);
    bfd_h_put_32(abfd, aouthdr_in->gp_value, (bfd_byte *) aouthdr_out->gp_value);
*** gdb-4.13/config/mh-a68bsd-dist	Tue Nov 16 22:57:03 1993
--- gdb-4.13/config/mh-a68bsd	Wed Sep 21 17:24:44 1994
***************
*** 1,12 ****
! RANLIB=true
  
! #None of the Apollo compilers can compile gas or binutils.  The preprocessor
! # chokes on bfd, the compiler won't let you assign integers to enums, and
! # other problems.  Defining CC to gcc is a questionable way to say "don't use
! # the apollo compiler" (the preferred version of GCC could be called cc,
! # or whatever), but I'm not sure leaving CC as cc is any better...
  
! #CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG
! CC=gcc
  
! BISON=yacc
--- 1,12 ----
! # This is for Apollo systems using the BSD environment.  It has been tested
! # on SR10.3.5 with ANSI headers.
  
! RANLIB = true
  
! # GCC is the preferred compiler.  If you have to use the Apollo compiler
! # try this.  It may be necessary to add -U__STDC__ and -DUSG.
! # CC = cc -A systype,any -A runtype,any
  
! CC = gcc
! CFLAGS  = -O2
! LDFLAGS = -s
*** gdb-4.13/config/mh-apollo68-dist	Wed Jun 10 01:32:24 1992
--- gdb-4.13/config/mh-apollo68	Wed Sep 21 17:24:44 1994
***************
*** 1,3 ****
  HDEFINES = -DUSG
! RANLIB=true
! CC= cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG
--- 1,14 ----
+ # This is for Apollo systems using the SYS5 environment.  The BSD version
+ # has been tested on SR10.3.5 with ANSI headers.
+ # The SYS5 version is untested.
+ 
+ RANLIB   = true
  HDEFINES = -DUSG
! 
! # GCC is the preferred compiler.  If you have to use the Apollo compiler
! # try this.  It may be necessary to add -U__STDC__ and -DUSG.
! # CC = cc -A systype,any -A runtype,any
! 
! CC = gcc
! CFLAGS  = -O2
! LDFLAGS = -s
*** gdb-4.13/gdb/configure.in-dist	Sun Jul 17 16:07:31 1994
--- gdb-4.13/gdb/configure.in	Wed Sep 21 17:25:29 1994
***************
*** 237,243 ****
--- 237,246 ----
  m68000-*-sunos3*)	gdb_target=sun2os3 ;;
  m68000-*-sunos4*)	gdb_target=sun2os4 ;;
  
+ # Apollo BSD and SYS5 should be able to use the same target setup.
  m68*-apollo*-bsd*)	gdb_target=apollo68b ;;
+ m68*-apollo*-sysv*)	gdb_target=apollo68b ;;
+ 
  m68*-bull-sysv*)	gdb_target=dpx2 ;;
  m68*-hp-bsd*)		gdb_target=hp300bsd ;;
  m68*-hp-hpux*)		gdb_target=hp300hpux ;;
*** gdb-4.13/gdb/a68v-nat.c-dist	Tue Nov 16 14:28:52 1993
--- gdb-4.13/gdb/a68v-nat.c	Wed Sep 21 17:25:29 1994
***************
*** 61,68 ****
  	ptrace_$control_set_m68k);
  
    bcopy (&inferior_registers, registers, 16 * 4);
!   bcopy (&inferior_fp_registers, &registers[REGISTER_BYTE (FP0_REGNUM)],
! 	 sizeof inferior_fp_registers.regs);
    *(int *)&registers[REGISTER_BYTE (PS_REGNUM)] = inferior_control_registers.sr;
    *(int *)&registers[REGISTER_BYTE (PC_REGNUM)] = inferior_control_registers.pc;
  }
--- 61,87 ----
  	ptrace_$control_set_m68k);
  
    bcopy (&inferior_registers, registers, 16 * 4);
! 
!   /* The routines ptrace_$get_fp_reg () and ptrace_$put_fp_reg () are
!      provided to manipulate the returned fp registers.  These do not
!      provide direct access to the fp data registers in extended format.
!      Copy the fp data registers directly.  This works for SR10.3.5.  */
!   bcopy (&inferior_fp_registers.regs[4],
! 	 &registers[REGISTER_BYTE (FP0_REGNUM)],
! 	 8 * 12);
! 
!   /* Use the approved method for the other fp registers.  */
!   ptrace_$get_fp_reg (ptrace_$fp_control_reg,
! 		      &registers[REGISTER_BYTE (FPC_REGNUM)],
! 		      &inferior_fp_registers, ptrace_$single_precision);
!   ptrace_$get_fp_reg (ptrace_$fp_status_reg,
! 		      &registers[REGISTER_BYTE (FPS_REGNUM)],
! 		      &inferior_fp_registers, ptrace_$single_precision);
!   ptrace_$get_fp_reg (ptrace_$fp_instruct_reg,
! 		      &registers[REGISTER_BYTE (FPI_REGNUM)],
! 		      &inferior_fp_registers, ptrace_$single_precision);
! 
!   /* Copy the non-fp control registers.  */
    *(int *)&registers[REGISTER_BYTE (PS_REGNUM)] = inferior_control_registers.sr;
    *(int *)&registers[REGISTER_BYTE (PC_REGNUM)] = inferior_control_registers.pc;
  }
***************
*** 97,105 ****
  
    bcopy (registers, &inferior_registers, sizeof(inferior_registers));
  
!   bcopy (&registers[REGISTER_BYTE (FP0_REGNUM)], inferior_fp_registers.regs,
! 	 sizeof inferior_fp_registers.regs);
  
    inferior_control_registers.sr = *(int *)&registers[REGISTER_BYTE (PS_REGNUM)];
    inferior_control_registers.pc = *(int *)&registers[REGISTER_BYTE (PC_REGNUM)];
  
--- 116,136 ----
  
    bcopy (registers, &inferior_registers, sizeof(inferior_registers));
  
!   /* Handle the fp registers as was done in fetch_inferior_registers.  */
!   bcopy (&registers[REGISTER_BYTE (FP0_REGNUM)],
! 	 &inferior_fp_registers.regs[4],
! 	 8 * 12);
  
+   ptrace_$put_fp_reg (ptrace_$fp_control_reg,
+ 		      &registers[REGISTER_BYTE (FPC_REGNUM)],
+ 		      &inferior_fp_registers, ptrace_$single_precision);
+   ptrace_$put_fp_reg (ptrace_$fp_status_reg,
+ 		      &registers[REGISTER_BYTE (FPS_REGNUM)],
+ 		      &inferior_fp_registers, ptrace_$single_precision);
+   ptrace_$put_fp_reg (ptrace_$fp_instruct_reg,
+ 		      &registers[REGISTER_BYTE (FPI_REGNUM)],
+ 		      &inferior_fp_registers, ptrace_$single_precision);
+ 
    inferior_control_registers.sr = *(int *)&registers[REGISTER_BYTE (PS_REGNUM)];
    inferior_control_registers.pc = *(int *)&registers[REGISTER_BYTE (PC_REGNUM)];
  
***************
*** 129,132 ****
--- 160,254 ----
       unsigned core_reg_size;
       int which;
  {
+ }
+ 
+ /* This was adapted from registers_info () and do_registers_info ()
+    from infcmd.c.  It ignores its arguments.  It prints all of the
+    floating point registers.
+    This routine could be renamed and moved into m68k-tdep.c and used
+    for floating point support on other m68k platforms.  */
+ 
+ void
+ apollo_float_info (addr_exp, from_tty)
+      char *addr_exp;
+      int from_tty;
+ {
+   register int i;
+   int numregs = ARCH_NUM_REGS;
+ 
+   if (!target_has_registers)
+     error ("The program has no registers now.");
+ 
+   /* This assumes that the FP registers run from FP0_REGNUM to the end
+      of the register set.  */
+   for (i = FP0_REGNUM; i < numregs; i++)
+     {
+       char raw_buffer[MAX_REGISTER_RAW_SIZE];
+       char virtual_buffer[MAX_REGISTER_VIRTUAL_SIZE];
+       fputs_filtered (reg_names[i], gdb_stdout);
+       print_spaces_filtered (15 - strlen (reg_names[i]), gdb_stdout);
+ 
+       /* Get the data in raw format.  */
+       if (read_relative_register_raw_bytes (i, raw_buffer))
+ 	{
+ 	  printf_filtered ("Invalid register contents\n");
+ 	  continue;
+ 	}
+ 
+       /* Convert raw data to virtual format if necessary.  */
+ #ifdef REGISTER_CONVERTIBLE
+       if (REGISTER_CONVERTIBLE (i))
+ 	{
+ 	  REGISTER_CONVERT_TO_VIRTUAL (i, REGISTER_VIRTUAL_TYPE (i),
+ 				       raw_buffer, virtual_buffer);
+ 	}
+       else
+ #endif
+ 	memcpy (virtual_buffer, raw_buffer,
+ 		REGISTER_VIRTUAL_SIZE (i));
+ 
+       /* If virtual format is floating, print it that way, and in raw hex.  */
+       if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT
+ 	  && ! INVALID_FLOAT (virtual_buffer, REGISTER_VIRTUAL_SIZE (i)))
+ 	{
+ 	  register int j;
+ 
+ 	  val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0,
+ 		     gdb_stdout, 0, 1, 0, Val_pretty_default);
+ 
+ 	  printf_filtered ("\t(raw 0x");
+ 	  for (j = 0; j < REGISTER_RAW_SIZE (i); j++)
+ 	    printf_filtered ("%02x", (unsigned char)raw_buffer[j]);
+ 	  printf_filtered (")");
+ 	}
+ 
+ /* FIXME!  val_print probably can handle all of these cases now...  */
+ 
+       /* Else if virtual format is too long for printf,
+ 	 print in hex a byte at a time.  */
+       else if (REGISTER_VIRTUAL_SIZE (i) > sizeof (long))
+ 	{
+ 	  register int j;
+ 	  printf_filtered ("0x");
+ 	  for (j = 0; j < REGISTER_VIRTUAL_SIZE (i); j++)
+ 	    printf_filtered ("%02x", (unsigned char)virtual_buffer[j]);
+ 	}
+       /* Else print as integer in hex and in decimal.  */
+       else
+ 	{
+ 	  val_print (REGISTER_VIRTUAL_TYPE (i), raw_buffer, 0,
+ 		     gdb_stdout, 'x', 1, 0, Val_pretty_default);
+ 	  printf_filtered ("\t");
+ 	  val_print (REGISTER_VIRTUAL_TYPE (i), raw_buffer, 0,
+ 		     gdb_stdout,   0, 1, 0, Val_pretty_default);
+ 	}
+ 
+       /* The SPARC wants to print even-numbered float regs as doubles
+ 	 in addition to printing them as floats.  */
+ #ifdef PRINT_REGISTER_HOOK
+       PRINT_REGISTER_HOOK (i);
+ #endif
+ 
+       printf_filtered ("\n");
+     }
  }
*** gdb-4.13/gdb/breakpoint.c-dist	Mon Jul 25 19:01:15 1994
--- gdb-4.13/gdb/breakpoint.c	Wed Sep 21 17:25:29 1994
***************
*** 1986,1992 ****
--- 1986,2002 ----
      {
        struct minimal_symbol *m;
  
+ #ifndef UNBREAKABLE_LONGJMP
        m = lookup_minimal_symbol(func_name, (struct objfile *)NULL);
+ #else
+       /* WJE:  This is for systems like Apollo that have longjmp in a
+ 	 write-protected shared library space so that it is impossible
+ 	 to set a breakpoint in it.  This disables automatic longjmp
+ 	 handling entirely.  The only alternative would be to have GCC
+ 	 and GDB use renamed stubs for the *longjmp routines and not
+ 	 handle Apollo CC code.  (Insert expletives here!)  */
+       m = NULL;
+ #endif
        if (m)
  	sal.pc = SYMBOL_VALUE_ADDRESS (m);
        else
*** gdb-4.13/gdb/coffread.c-dist	Wed Jul  6 03:01:24 1994
--- gdb-4.13/gdb/coffread.c	Wed Sep 21 17:25:29 1994
***************
*** 1134,1139 ****
--- 1134,1169 ----
      cs->c_type = 0;
  
    symnum += 1 + cs->c_naux;
+ 
+ #ifdef APOLLO_KGT_LOOKUP
+   {
+ #include <apollo/base.h>
+ #include <apollo/loader.h>
+ 
+     /* WJE:  On Apollo systems, undefined externals in a program file refer
+        to shared library objects.  They usually have a symbol with value zero,
+        not usable for printing or calling shared objects.  Look these up in
+        the Known Global Table to find their actual addresses.  FIXME the
+        addresses in the gdb process could potentially differ from those in
+        the inferior.  (How to bootstrap a lookup?)  For now, gamble that
+        the addresses match.  */
+ 
+     if (cs->c_value == 0   &&   cs->c_sclass == C_EXT)
+       {
+ 	long address;
+ 	loader_$kg_lookup_opts   lookup_opts = 0;
+ 
+ 	if (loader_$kg_lookup (cs->c_name,
+ 			       strlen (cs->c_name),
+ 			       loader_$kg_symbol,
+ 			       lookup_opts,   &address) != 0)
+ 	  {
+ 	    cs->c_value  = address;
+ 	    sym->n_value = address;
+ 	  }
+       }
+   }
+ #endif /* APOLLO_KGT_LOOKUP */
  }
  
  /* Support for string table handling */
*** gdb-4.13/gdb/stabsread.c-dist	Thu Jul 14 15:20:04 1994
--- gdb-4.13/gdb/stabsread.c	Wed Sep 21 17:25:30 1994
***************
*** 818,826 ****
--- 818,869 ----
  	 corresponding linker definition to find the value.
  	 These definitions appear at the end of the namelist.  */
        SYMBOL_TYPE (sym) = read_type (&p, objfile);
+ 
+ #ifdef N_GSYM_VALUE_0
+ 
+       /* WJE:  This is used for Apollo COFF.  N_GSYM stabs normally have
+ 	 a value of zero.  The symbol value must be obtained from
+ 	 the COFF symbol table, which has already been read.  */
+       {
+ 	struct symbol *s  = NULL;
+ 	struct symtab *st = NULL;
+ 	struct minimal_symbol *msymbol;
+ 
+ 	/* Look up the COFF symbol table entry.  Using lookup_symbol ()
+ 	   here might lead to recursive bemusement.  */
+ 	ALL_SYMTABS (objfile, st)
+ 	  {
+ 	    s  = lookup_block_symbol (BLOCKVECTOR_BLOCK (BLOCKVECTOR (st),
+ 							 GLOBAL_BLOCK),
+ 				      SYMBOL_NAME (sym), VAR_NAMESPACE);
+ 	    if (s)
+ 	      break;
+ 	  }
+ 
+         if (s)
+           SYMBOL_VALUE (sym) = SYMBOL_VALUE (s);
+ 	else
+ 	  {
+ 	    /* Search for a corresponding minimal symbol.  On systems like
+ 	       Apollo that leave most COFF symbol types NULL, global
+ 	       variable symbols usually wind up there.  */
+ 	    msymbol = lookup_minimal_symbol (SYMBOL_NAME (sym), objfile);
+ 	    if (msymbol)
+ 	      SYMBOL_VALUE (sym) = SYMBOL_VALUE_ADDRESS (msymbol);
+ 	  }
+       }
+ 
+ #else /* not N_GSYM_VALUE_0 */
+ 
+       /* WJE:  FIXME This does not seem right for COFF platforms.
+ 	 It has been left in place as the default so as not to risk
+ 	 breaking other platforms.  */
        i = hashname (SYMBOL_NAME (sym));
        SYMBOL_VALUE_CHAIN (sym) = global_sym_chain[i];
        global_sym_chain[i] = sym;
+ 
+ #endif /* not N_GSYM_VALUE_0 */
+ 
        SYMBOL_CLASS (sym) = LOC_STATIC;
        SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
        add_symbol_to_list (sym, &global_symbols);
*** gdb-4.13/gdb/symfile.c-dist	Sat Jul 16 17:56:51 1994
--- gdb-4.13/gdb/symfile.c	Wed Sep 21 17:25:29 1994
***************
*** 835,842 ****
      our_flavour = (enum bfd_flavour)-1;
  
    /* Special kludge for apollo.  See dstread.c.  */
    if (STREQN (our_target, "apollo", 6))
!     our_flavour = (enum bfd_flavour)-2;
  
    for (sf = symtab_fns; sf != NULL; sf = sf -> next)
      {
--- 835,843 ----
      our_flavour = (enum bfd_flavour)-1;
  
    /* Special kludge for apollo.  See dstread.c.  */
+   /* WJE:  disabled this to use GNU stabs format.
    if (STREQN (our_target, "apollo", 6))
!     our_flavour = (enum bfd_flavour)-2; */
  
    for (sf = symtab_fns; sf != NULL; sf = sf -> next)
      {
*** gdb-4.13/gdb/config/m68k/apollo68b.mh-dist	Tue Apr  6 00:50:44 1993
--- gdb-4.13/gdb/config/m68k/apollo68b.mh	Wed Sep 21 17:26:27 1994
***************
*** 1,6 ****
! # Host: Apollo m68k, BSD mode.
  
  XM_FILE= xm-apollo68b.h
- XDEPFILES= 
  NAT_FILE= nm-apollo68b.h
  NATDEPFILES= infptrace.o inftarg.o fork-child.o a68v-nat.o
--- 1,16 ----
! # This is for Apollo systems using the BSD environment.  It has been tested
! # on SR10.3.5 with ANSI headers.
  
+ RANLIB = true
+ 
+ # GCC is the preferred compiler.  If you have to use the Apollo compiler
+ # try this.  It may be necessary to add -U__STDC__ and -DUSG.
+ # CC = cc -A systype,any -A runtype,any
+ 
+ CC = gcc
+ CFLAGS  = -O2
+ LDFLAGS = -s
+ 
  XM_FILE= xm-apollo68b.h
  NAT_FILE= nm-apollo68b.h
  NATDEPFILES= infptrace.o inftarg.o fork-child.o a68v-nat.o
*** gdb-4.13/gdb/config/m68k/apollo68b.mt-dist	Fri Oct 22 11:03:07 1993
--- gdb-4.13/gdb/config/m68k/apollo68b.mt	Wed Sep 21 17:26:27 1994
***************
*** 1,3 ****
  # Target: Apollo m68k in BSD mode
! TDEPFILES= exec.o m68k-pinsn.o m68k-tdep.o dstread.o
  TM_FILE= tm-apollo68b.h
--- 1,3 ----
  # Target: Apollo m68k in BSD mode
! TDEPFILES= exec.o m68k-pinsn.o m68k-tdep.o coffread.o
  TM_FILE= tm-apollo68b.h
*** gdb-4.13/gdb/config/m68k/apollo68v.mh-dist	Mon Mar 22 19:13:18 1993
--- gdb-4.13/gdb/config/m68k/apollo68v.mh	Wed Sep 21 17:26:27 1994
***************
*** 1,10 ****
! RANLIB=echo >/dev/null
! XM_FILE= xm-apollo68v.h
! XM_CLIBS= -lPW
  SYSV_DEFINE=-DSYSV
! REGEX=regex.o
! REGEX1=regex.o
! CC= cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_SYS_FILE
! XDEPFILES= 
  NAT_FILE= nm-apollo68v.h
  NATDEPFILES= infptrace.o inftarg.o fork-child.o a68v-nat.o
--- 1,19 ----
! # This is for Apollo systems using the SYS5 environment.  The BSD version
! # has been tested on SR10.3.5 with ANSI headers.
! # The SYS5 version is untested.
! 
! RANLIB   = true
! HDEFINES = -DUSG
! 
! # GCC is the preferred compiler.  If you have to use the Apollo compiler
! # try this.  It may be necessary to add -U__STDC__ and -DUSG.
! # CC = cc -A systype,any -A runtype,any
! 
! CC = gcc
! CFLAGS  = -O2
! LDFLAGS = -s
! 
  SYSV_DEFINE=-DSYSV
! XM_FILE= xm-apollo68v.h
  NAT_FILE= nm-apollo68v.h
  NATDEPFILES= infptrace.o inftarg.o fork-child.o a68v-nat.o
*** gdb-4.13/gdb/config/m68k/nm-apollo68b.h-dist	Fri Oct 22 11:03:07 1993
--- gdb-4.13/gdb/config/m68k/nm-apollo68b.h	Wed Sep 21 17:26:27 1994
***************
*** 23,45 ****
  
  /* Tell gdb that we can attach and detach other processes */
  #define ATTACH_DETACH
- 
- #define U_REGS_OFFSET 6
- 
- /* This is the amount to subtract from u.u_ar0
-    to get the offset in the core file of the register values.  */
- 
- #define KERNEL_U_ADDR 0
- 
- #undef FLOAT_INFO	/* No float info yet */
- 
- #define REGISTER_U_ADDR(addr, blockend, regno) \
- 	(addr) = (6 + 4 * (regno))
- 
- /* Apollos don't really have a USER area,so trying to read it from the
-  * process address space will fail. It does support a read from a faked
-  * USER area using the "PEEKUSER" ptrace call.
-  */
- #define PT_READ_U 3
- 
- #define	MEM_FNS_DECLARED	/* /usr/include/string.h can get it wrong */
--- 23,25 ----
*** gdb-4.13/gdb/config/m68k/nm-apollo68v.h-dist	Mon Mar 22 19:13:56 1993
--- gdb-4.13/gdb/config/m68k/nm-apollo68v.h	Wed Sep 21 17:26:27 1994
***************
*** 18,20 ****
--- 18,23 ----
  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  
  #define	FETCH_INFERIOR_REGISTERS
+ 
+ /* Tell gdb that we can attach and detach other processes */
+ #define ATTACH_DETACH
*** gdb-4.13/gdb/config/m68k/tm-apollo68b.h-dist	Mon Feb 28 00:04:20 1994
--- gdb-4.13/gdb/config/m68k/tm-apollo68b.h	Wed Sep 21 17:26:27 1994
***************
*** 18,24 ****
  along with this program; if not, write to the Free Software
  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  
! /* Apollos use vector 0xb for the breakpoint vector */
  
  #define BPT_VECTOR 0xb
  
--- 18,30 ----
  along with this program; if not, write to the Free Software
  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  
! /* Apollos use vector 0xb for the breakpoint vector.
!  * Testing trap instructions under SR10.1 and 10.3 suggests the following
!  * allocation:  1, 2 SVC calls, 3-5,7 system calls, 6 PBU calls,
!  * 9-13 trace/breakpoint, 15 instant death.  0,14 appear unused, and
!  * 8 gives a stack unwind error.  15 immediately brings the system down to
!  * the ROM monitor.  (Much faster than shut, but requires salvol afterward!)
!  */
  
  #define BPT_VECTOR 0xb
  
***************
*** 26,59 ****
  
  #define FRAME_CHAIN_VALID(chain, thisframe) (chain != 0)
  
! /* These are the jmp_buf registers I could guess. There are 13 registers
!  * in the buffer. There are 8 data registers, 6 general address registers,
!  * the Frame Pointer, the Stack Pointer, the PC and the SR in the chip. I would
!  * guess that 12 is the SR, but we don't need that anyway. 0 and 1 have
!  * me stumped. 4 appears to be a5 for some unknown reason. If you care
!  * about this, disassemble setjmp to find out. But don't do it with gdb :)
   */
  
- #undef JB_SP
- #undef JB_FP
- #undef JB_PC
- #undef JB_D0
- #undef JB_D1
- #undef JB_D2
- #undef JB_D3
- #undef JB_D4
- #undef JB_D5
- 
  #define JB_SP 2
  #define JB_FP 3
  #define JB_PC 5
! #define JB_D0 6
! #define JB_D1 7
! #define JB_D2 8
! #define JB_D3 9
! #define JB_D4 10
! #define JB_D5 11
  
! /* How to decide if we're in a shared library function.  (Probably a wrong
!    definintion inherited from the VxWorks config file).  */
  #define	IN_SOLIB_TRAMPOLINE(pc, name) (name && strcmp(name, "<end_of_program>") == 0)
--- 32,84 ----
  
  #define FRAME_CHAIN_VALID(chain, thisframe) (chain != 0)
  
! /* The SR10 jmp_buf does not contain the entire register set.  The Apollo
!  * compiler special-cases setjmp () calls, preceeding them with explicit
!  * register saves.  The jmp_buf layout below was mapped by initializing
!  * a jmp_buf, calling setjmp (), then printing the values.  The entries
!  * initialized to 0 are probably for signal masks or cleanup handlers.
!  * The entries marked unused were not altered.
!  * 0    0
!  * 1    0
!  * 2    SP just after entry to setjmp ()
!  * 3    FP just after entry to setjmp ()
!  * 4    A5 contents
!  * 5    PC instruction after jbsr setjmp ()
!  * 6    0
!  * 7-12 unused
   */
  
  #define JB_SP 2
  #define JB_FP 3
+ #define JB_A5 4
  #define JB_PC 5
! #define JB_ELEMENT_SIZE 4
! #define GET_LONGJMP_TARGET(pc) get_longjmp_target (pc)
  
! /* How to decide if we're in a shared library function.  Shared libraries
!    reside addresses larger than the stack base.  Any PC outside the text
!    area is in a shared library or the .data or .aptv trampoline code.  */
  #define	IN_SOLIB_TRAMPOLINE(pc, name) (name && strcmp(name, "<end_of_program>") == 0)
+ 
+ /* Enable code in stabsread.c to retrieve value for N_GSYM stab symbols
+    from the COFF symbol table.  */
+ #define N_GSYM_VALUE_0
+ 
+ /* The Apollo compiler aligns the stack on a 16-bit boundary rather than
+    a 32-bit boundary.  */
+ #define BELIEVE_PCC_PROMOTION 1
+ 
+ /* Most addresses in stab symbols are absolute.  */
+ #define BLOCK_ADDRESS_ABSOLUTE
+ 
+ /* Enable code in coffread.c to look up shared library symbols.  */
+ #define APOLLO_KGT_LOOKUP
+ 
+ /* The longjmp routine is in a write-protected shared library.  Disable
+    create_longjmp_breakpoint () and cause other unsettable breaks to
+    disable themselves.  */
+ #define UNBREAKABLE_LONGJMP
+ #define DISABLE_UNSETTABLE_BREAK
+ 
+ /* Provide a routine for printing the 68881/2 FPU status.  */
+ #define FLOAT_INFO apollo_float_info (addr_exp, from_tty)
*** gdb-4.13/gdb/config/m68k/xm-apollo68b.h-dist	Mon Mar 29 18:33:44 1993
--- gdb-4.13/gdb/config/m68k/xm-apollo68b.h	Wed Sep 21 17:26:27 1994
***************
*** 21,24 ****
--- 21,29 ----
  
  #define ALIGN_STACK_ON_STARTUP
  
+ /* The stack limit may not be changed at run-time.  It is set by a
+    loader directive.  Stack overflow checking seems to be unreliable.  */
+ 
+ #define BROKEN_LARGE_ALLOCA
+ 
  extern char *strdup();
*** gdb-4.13/gdb/config/m68k/xm-apollo68v.h-dist	Mon Mar 22 19:15:24 1993
--- gdb-4.13/gdb/config/m68k/xm-apollo68v.h	Wed Sep 21 17:26:27 1994
***************
*** 42,44 ****
--- 42,48 ----
  
  #define HAVE_TERMIO
  
+ /* The stack limit may not be changed at run-time.  It is set by a
+    loader directive.  Stack overflow checking seems to be unreliable.  */
+ 
+ #define BROKEN_LARGE_ALLOCA
*** gdb-4.13/glob/configure.in-dist	Wed May  4 14:36:51 1994
--- gdb-4.13/glob/configure.in	Wed Sep 21 17:27:05 1994
***************
*** 24,29 ****
--- 24,30 ----
    *-*-bsd*)		files=sysdep-obsd.h ;;
    *-*-sysv4*)					my_host=sysv4 ;;
    *-*-sco*)		files=sysdep-sco.h ;;
+   *-apollo-bsd*)	files=sysdep-obsd.h;	my_host=apollo68b ;;
    *-apollo-sysv*)	files=sysdep-a68v.h;	my_host=apollo68v ;;
    m88k-motorola-m88kbcs*)			my_host=delta88 ;;
  esac
*** gdb-4.13/include/coff/apollo.h-dist	Wed Oct 13 17:57:17 1993
--- gdb-4.13/include/coff/apollo.h	Wed Sep 21 17:27:37 1994
***************
*** 36,42 ****
--- 36,45 ----
  #define	FILHDR	struct external_filehdr
  #define	FILHSZ	sizeof(FILHDR)
  
+ /* Apollo-specific f_flags bits.  */
+ #define F_PIC (0x8000)   /* file contains position-independent code.  */
  
+ 
  /********************** AOUT "OPTIONAL HEADER" **********************/
  
  typedef struct 
***************
*** 95,110 ****
  #define _TV	".tv"
  #define _INIT	".init"
  #define _FINI	".fini"
! #define	_LINES	".lines"
! #define	_BLOCKS	".blocks"
! #define _SRI    ".sri"                  /* Static Resource Information (systype,
!  et al.) */
! #define _MIR    ".mir"                  /* Module Information Records  */
! #define _APTV   ".aptv"                 /* Apollo-style transfer vectors. */
! #define _INLIB  ".inlib"                /* Shared Library information */
! #define _RWDI   ".rwdi"         /* Read/write data initialization directives for
!  compressed sections */
! #define _UNWIND ".unwind"               /* Stack unwind information */
  
  #define	SCNHDR	struct external_scnhdr
  #define	SCNHSZ	sizeof(SCNHDR)
--- 98,116 ----
  #define _TV	".tv"
  #define _INIT	".init"
  #define _FINI	".fini"
! #define	_LINES	".lines"	/* Line numbers for debugging */
! #define	_BLOCKS	".blocks"	/* Code blocks for debugging */
! #define _SYMBOLS ".symbols"	/* Symbols for debugging */
! #define _SRI    ".sri"		/* Static Resource Information
! 				   (systype, et al.) */
! #define _MIR    ".mir"		/* Module Information Records  */
! #define _APTV   ".aptv"		/* Transfer vectors used to call routines
! 				   in shared libraries */
! #define _INLIB  ".inlib"	/* Shared Library information */
! #define _RWDI   ".rwdi"		/* Read/write data initialization
! 				   directives for compressed sections */
! #define _UNWIND ".unwind"	/* Stack unwind information for debuggers
! 				   and the tb (traceback) command */
  
  #define	SCNHDR	struct external_scnhdr
  #define	SCNHSZ	sizeof(SCNHDR)
*** gdb-4.13/mmalloc/configure.in-dist	Fri May  6 15:07:56 1994
--- gdb-4.13/mmalloc/configure.in	Wed Sep 21 17:27:05 1994
***************
*** 16,21 ****
--- 16,23 ----
    *-*-sunos4*)		host_makefile_frag=config/mh-sunos4 ;;
    *-*-sysv4*)		host_makefile_frag=config/mh-sysv4 ;;
    *-*-go32*)		host_makefile_frag=config/mh-go32 ;;
+   m68k-apollo-bsd*)	host_makefile_frag=config/mh-a68bsd ;;
+   m68k-apollo-sysv*)	host_makefile_frag=config/mh-apollo68 ;;
  esac
  
  # per-target:
*** gdb-4.13/readline/configure.in-dist	Sat Jul 16 15:33:15 1994
--- gdb-4.13/readline/configure.in	Wed Sep 21 17:27:05 1994
***************
*** 32,37 ****
--- 32,38 ----
  #  i[34]86-*-isc*)	host_makefile_frag=config/mh-isc ;;
    i[34]86-*-isc*)	host_makefile_frag=config/mh-sysv ;;
    *-*-go32)		host_makefile_frag=config/mh-go32 ;;
+   m68k-apollo-bsd*)	host_makefile_frag=config/mh-apollo68b; files=sysdep-obsd.h ;;
    m68k-apollo-sysv*)	host_makefile_frag=config/mh-apollo68v ;;    
    *-*-sysv*)		host_makefile_frag=config/mh-sysv ;;
    *-*-m88kbcs*)		host_makefile_frag=config/mh-sysv ;;
