GDB for Xenix 386 with GCC (part 3 of 4)

Steve.Bleazard at RoboBar.Co.UK Steve.Bleazard at RoboBar.Co.UK
Tue May 8 21:55:09 AEST 1990


This is part three of a coordinated set of 4 patches for Xenix GCC, GAS and GDB.
Please collect all parts before you start hacking :-)

This is part 3 which patches GDB, say |patch -p -d /usr/local/src/dist-gdb
or whatever.  PLEASE APPLY THIS PATCH TO A FRESH UNSULLIED DISTRIBUTION
OF GDB 3.5 FROM THE FREE SOFTWARE FOUNDATION.  In particular, the
Xenix patches from rdk386!ron MUST NOT be already applied.  I've merged
his changes into this patch.  Part 4 will also patch GDB.

GDB will DEFINITELY need to be compiled with gcc, it requires GCC specific
enhancements.

#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create the files:
#	gdb-x386.01
# This archive created: Tue May  8 12:35:10 1990
export PATH; PATH=/bin:$PATH
echo shar: extracting "'gdb-x386.01'" '(39436 characters)'
if test -f 'gdb-x386.01'
then
	echo shar: will not over-write existing file "'gdb-x386.01'"
else
sed 's/^X//' << \SHAR_EOF > 'gdb-x386.01'
X*** dist-gdb/Makefile.dist	Wed Jan 31 03:42:57 1990
X--- ./Makefile.dist	Tue May  8 12:33:40 1990
X***************
X*** 19,24 ****
X   will be incorrectly compiled.  The "fixincludes" script in the gcc
X   distribution will fix your include files up. */
X! /* CC=gcc -traditional */
X! CC=cc
X  
X  /* It is also possible that you will need to add -I/usr/include/sys to the
X--- 19,24 ----
X   will be incorrectly compiled.  The "fixincludes" script in the gcc
X   distribution will fix your include files up. */
X! CC=gcc -traditional
X! /* CC=cc */
X  
X  /* It is also possible that you will need to add -I/usr/include/sys to the
X***************
X*** 26,31 ****
X   is where it should be according to Posix).  */
X  
X! YACC=bison -y -v
X! /* YACC=yacc */
X  SHELL=/bin/sh
X  MAKE=make
X--- 26,31 ----
X   is where it should be according to Posix).  */
X  
X! /* YACC=bison -y -v */
X! YACC=yacc
X  SHELL=/bin/sh
X  MAKE=make
X***************
X*** 43,51 ****
X  /* M_CFLAGS, if defined, has system-dependent CFLAGS.  */
X  #if !defined(M_CFLAGS)
X! #define M_CFLAGS
X  #endif
X  
X  /* CFLAGS for both GDB and readline.  */
X! GLOBAL_CFLAGS = -g M_CFLAGS
X  CFLAGS = -I. ${HAVE_VPRINTF_DEFINE} ${GLOBAL_CFLAGS}
X  /* None of the things in CFLAGS will do any harm, and on some systems
X--- 43,51 ----
X  /* M_CFLAGS, if defined, has system-dependent CFLAGS.  */
X  #if !defined(M_CFLAGS)
X! #define M_CFLAGS -DM_SYSV
X  #endif
X  
X  /* CFLAGS for both GDB and readline.  */
X! GLOBAL_CFLAGS = M_CFLAGS
X  CFLAGS = -I. ${HAVE_VPRINTF_DEFINE} ${GLOBAL_CFLAGS}
X  /* None of the things in CFLAGS will do any harm, and on some systems
X***************
X*** 67,72 ****
X  REGEX1 = M_REGEX
X  #else
X! REGEX = 
X! REGEX1 = 
X  #endif
X  
X--- 67,72 ----
X  REGEX1 = M_REGEX
X  #else
X! REGEX = regex.o
X! REGEX1 = regex.o
X  #endif
X  
X***************
X*** 113,117 ****
X   For example, -lPW for System V to get alloca().  */
X  #ifndef M_CLIBS
X! #define M_CLIBS
X  #endif
X  CLIBS = ${ADD_FILES} ${TERMCAP} M_CLIBS
X--- 113,117 ----
X   For example, -lPW for System V to get alloca().  */
X  #ifndef M_CLIBS
X! #define M_CLIBS -lx
X  #endif
X  CLIBS = ${ADD_FILES} ${TERMCAP} M_CLIBS
X***************
X*** 125,129 ****
X  	 remote.c source.c stack.c standalone.c stuff.c symmisc.c symtab.c \
X  	 utils.c valarith.c valops.c valprint.c values.c version.c expread.y \
X! 	 xgdb.c
X  
X  DEPFILES = umax-dep.c gould-dep.c default-dep.c sun3-dep.c \
X--- 125,129 ----
X  	 remote.c source.c stack.c standalone.c stuff.c symmisc.c symtab.c \
X  	 utils.c valarith.c valops.c valprint.c values.c version.c expread.y \
X! 	 x386dbx.c xgdb.c
X  
X  DEPFILES = umax-dep.c gould-dep.c default-dep.c sun3-dep.c \
X***************
X*** 174,178 ****
X  OBS = main.o blockframe.o breakpoint.o findvar.o stack.o source.o \
X      values.o eval.o valops.o valarith.o valprint.o printcmd.o \
X!     symtab.o symmisc.o coffread.o dbxread.o infcmd.o infrun.o remote.o \
X      command.o utils.o expread.o expprint.o pinsn.o environ.o version.o \
X      copying.o ${READLINEOBS}
X--- 174,178 ----
X  OBS = main.o blockframe.o breakpoint.o findvar.o stack.o source.o \
X      values.o eval.o valops.o valarith.o valprint.o printcmd.o \
X!     symtab.o symmisc.o coffread.o dbxread.o x386dbx.o infcmd.o infrun.o remote.o \
X      command.o utils.o expread.o expprint.o pinsn.o environ.o version.o \
X      copying.o ${READLINEOBS}
X***************
X*** 259,265 ****
X  	rm -f gdb.tar
X  	mkdir dist-gdb
X! 	cd dist-gdb ; for i in ${TARFILES} ; do ln -s ../$$i . ; done
X  	mkdir dist-gdb/readline
X! 	cd dist-gdb/readline ; for i in ${READLINE} ; do ln -s ../../readline/$$i . ; done
X  	tar chf gdb.tar dist-gdb
X  	rm -rf dist-gdb
X--- 259,265 ----
X  	rm -f gdb.tar
X  	mkdir dist-gdb
X! 	cd dist-gdb ; for i in ${TARFILES} ; do ln -s "../$$i" . ; done
X  	mkdir dist-gdb/readline
X! 	cd dist-gdb/readline ; for i in ${READLINE} ; do ln -s "../../readline/$$i" . ; done
X  	tar chf gdb.tar dist-gdb
X  	rm -rf dist-gdb
X*** dist-gdb.old/breakpoint.c	Wed Jan 10 23:49:07 1990
X--- breakpoint.c	Sat May  5 14:59:30 1990
X***************
X*** 1108,1112 ****
X  	if (b->number == num)
X  	  {
X! 	    function (b);
X  	    goto win;
X  	  }
X--- 1108,1112 ----
X  	if (b->number == num)
X  	  {
X! 	    (*function)(b);
X  	    goto win;
X  	  }
X*** dist-gdb.old/config.gdb	Tue Jan 30 20:35:46 1990
X--- config.gdb	Mon May  7 15:33:32 1990
X***************
X*** 327,330 ****
X--- 327,336 ----
X  	opcodefile=four
X  	;;
X+ xenix386)
X+ 	pinsnfile=i386-pinsn.c
X+ # The following is a lie, but a necessary one.  See comment at beginning
X+ # of this file about unneeded files.
X+ 	opcodefile=m-xenix386.h
X+ 	;;
X  *)
X  	echo "Unknown machine type: \`$machine'"
X***************
X*** 370,375 ****
X  echo "Editing Makefile"
X  cp Makefile.dist tmp.c
X! cc -E >Makefile tmp.c $makedefine -DM_MAKEDEFINE="$makedefine"
X! rm -f tmp.c
X  
X  echo "GDB is now set up for use with a $machine." \
X--- 376,381 ----
X  echo "Editing Makefile"
X  cp Makefile.dist tmp.c
X! gcc -E >Makefile $makedefine -DM_MAKEDEFINE="$makedefine" tmp.c
X! #rm -f tmp.c
X  
X  echo "GDB is now set up for use with a $machine." \
X*** dist-gdb.old/core.c	Wed Jan 10 23:55:17 1990
X--- core.c	Sat May  5 14:59:31 1990
X***************
X*** 50,53 ****
X--- 50,57 ----
X  #include <sys/ptrace.h>
X  #else
X+ #ifdef M_XENIX
X+ #include <sys/page.h>
X+ #include <sys/seg.h>
X+ #endif
X  #include <sys/user.h>
X  #endif
X***************
X*** 63,69 ****
X--- 67,77 ----
X  #ifndef COFF_FORMAT
X  #ifndef AOUTHDR
X+ #ifdef M_XENIX
X+ #define AOUTHDR		struct xexec
X+ #else
X  #define AOUTHDR		struct exec
X  #endif
X  #endif
X+ #endif
X  
X  extern char *sys_siglist[];
X***************
X*** 201,208 ****
X  	return;
X  
X        if (N_MAGIC (core_aouthdr) != 0
X  	  && bcmp (&core_aouthdr, &exec_aouthdr, sizeof core_aouthdr))
X  	printf ("Warning: core file does not match specified executable file.\n");
X!       else if (exec_mtime > st_core.st_mtime)
X  	printf ("Warning: exec file is newer than core file.\n");
X      }
X--- 209,220 ----
X  	return;
X  
X+ /* cannot validate core file against executable file on xenix */
X+ #ifndef M_XENIX
X        if (N_MAGIC (core_aouthdr) != 0
X  	  && bcmp (&core_aouthdr, &exec_aouthdr, sizeof core_aouthdr))
X  	printf ("Warning: core file does not match specified executable file.\n");
X!       else
X! #endif
X!       if (exec_mtime > st_core.st_mtime)
X  	printf ("Warning: exec file is newer than core file.\n");
X      }
X*** dist-gdb.old/dbxread.c	Sat Jan 27 07:30:54 1990
X--- dbxread.c	Sat May  5 15:44:39 1990
X***************
X*** 41,44 ****
X--- 41,59 ----
X  #endif
X  
X+ #ifdef M_XENIX
X+ #include <sys/relsym.h>
X+ #define nlist xenix_nlist	/* the system nlist is broken */
X+ #include <a.out.h>
X+ #undef nlist
X+ #define nlist gas_nlist
X+ #include "stab.gnu.h"
X+ #include "gas-nlist.h"
X+ 
X+ #define STRING_SEG 4
X+ #define SYMS_SEG   5
X+ #define AOUTHDR    struct xexec
X+ 
X+ #else /* M_XENIX */
X+ 
X  #ifdef COFF_ENCAPSULATE
X  #include "a.out.encap.h"
X***************
X*** 48,51 ****
X--- 63,68 ----
X  #include <stab.h>
X  #endif
X+ #endif /* M_XENIX */
X+ 
X  #include <ctype.h>
X  
X***************
X*** 168,171 ****
X--- 185,190 ----
X  static struct type **read_args ();
X  
X+ #ifndef M_XENIX
X+ 
X  /* Macro to determine which symbols to ignore when reading the first symbol
X     of a file.  Some machines override this definition. */
X***************
X*** 284,287 ****
X--- 303,413 ----
X  #define BELIEVE_PCC_PROMOTION 0
X  #endif
X+ 
X+ #else	/* M_XENIX */
X+ 
X+ /* Macro to determine which symbols to ignore when reading the first symbol
X+    of a file.  Some machines override this definition. */
X+ 
X+ extern struct xseg *find_segment();
X+ 
X+ #ifndef IGNORE_SYMBOL
X+ /* Don't ignore any symbols. */
X+ #define IGNORE_SYMBOL(type) (0)
X+ #endif 
X+ 
X+ /* Macro for number of symbol table entries (in usual a.out format).
X+    Some machines override this definition.  */
X+ #ifndef NUMBER_OF_SYMBOLS
X+ #define NUMBER_OF_SYMBOLS \
X+   ({ struct xseg *cseg; long z;\
X+      cseg = find_segment(XS_TSYMS, SYMS_SEG); \
X+      z = cseg ? cseg->xs_psize / sizeof(struct nlist) : 0; z;})
X+ #endif
X+ 
X+ /* Macro for file-offset of symbol table (in usual a.out format).  */
X+ #ifndef SYMBOL_TABLE_OFFSET
X+ #define SYMBOL_TABLE_OFFSET \
X+   ({ struct xseg *cseg; long z;\
X+      cseg = find_segment(XS_TSYMS, SYMS_SEG); \
X+      z = cseg ? cseg->xs_filpos : 0; z;})
X+ #endif
X+ 
X+ /* Macro for file-offset of string table (in usual a.out format).  */
X+ #ifndef STRING_TABLE_OFFSET
X+ #define STRING_TABLE_OFFSET \
X+   ({ struct xseg *cseg; long z;\
X+      cseg = find_segment(XS_TSYMS, STRING_SEG); \
X+      z = cseg ? cseg->xs_filpos : 0; z; })
X+ #endif
X+ 
X+ /* Macro to store the length of the string table data in INTO.  */
X+ #ifndef READ_STRING_TABLE_SIZE
X+ #define READ_STRING_TABLE_SIZE(INTO)		\
X+   { struct xseg *cseg; \
X+      cseg = find_segment(XS_TSYMS, STRING_SEG); \
X+      INTO = cseg ? cseg->xs_psize : 0; }
X+ #endif
X+ 
X+ /* Macro to declare variables to hold the file's header data.  */
X+ #ifndef DECLARE_FILE_HEADERS
X+ #define DECLARE_FILE_HEADERS  AOUTHDR hdr
X+ #endif
X+ 
X+ #define N_BADMAG(hdr)\
X+   (hdr.x_magic != X_MAGIC && (hdr.x_cpu & XC_CPU) != XC_386 \
X+    && (hdr.x_renv & XE_SEG) == 0  && (hdr.x_renv & XE_EXEC) == 0)
X+ 
X+ /* Macro to read the header data from descriptor DESC and validate it.
X+    NAME is the file name, for error messages.  */
X+ #ifndef READ_FILE_HEADERS
X+ #define READ_FILE_HEADERS(DESC, NAME)		\
X+ { val = myread (DESC, &hdr, sizeof hdr);	\
X+   if (val < 0) perror_with_name (NAME);		\
X+   if (N_BADMAG (hdr))				\
X+     error ("File \"%s\" not in executable format.", NAME);\
X+   process_a_out(DESC, NAME); }
X+ #endif
X+ 
X+ #ifndef IS_OBJECT_FILE
X+ #define IS_OBJECT_FILE 0
X+ #endif
X+ 
X+ /* Macro for size of text segment */
X+ #ifndef SIZE_OF_TEXT_SEGMENT
X+ #define SIZE_OF_TEXT_SEGMENT hdr.x_text
X+ #endif
X+ 
X+ /* Get the address in debugged memory of the start
X+    of the text segment.  */
X+ #if !defined (ADDR_OF_TEXT_SEGMENT)
X+ #define ADDR_OF_TEXT_SEGMENT 0
X+ #endif /* no ADDR_OF_TEXT_SEGMENT */
X+ 
X+ /* Macro to get entry point from headers.  */
X+ #ifndef ENTRY_POINT
X+ #define ENTRY_POINT hdr.x_entry
X+ #endif
X+ 
X+ /* Macro for name of symbol to indicate a file compiled with gcc. */
X+ #ifndef GCC_COMPILED_FLAG_SYMBOL
X+ #define GCC_COMPILED_FLAG_SYMBOL "gcc_compiled."
X+ #endif
X+ 
X+ /* Convert stab register number (from `r' declaration) to a gdb REGNUM.  */
X+ 
X+ #ifndef STAB_REG_TO_REGNUM
X+ #define STAB_REG_TO_REGNUM(VALUE) (VALUE)
X+ #endif
X+ 
X+ /* Define this as 1 if a pcc declaration of a char or short argument
X+    gives the correct address.  Otherwise assume pcc gives the
X+    address of the corresponding int, which is not the same on a
X+    big-endian machine.  */
X+ 
X+ #ifndef BELIEVE_PCC_PROMOTION
X+ #define BELIEVE_PCC_PROMOTION 0
X+ #endif
X+ 
X+ #endif /* !M_XENIX */
X  
X  /* Nonzero means give verbose info on gdb action.  From main.c.  */
X***************
X*** 1628,1631 ****
X--- 1754,1763 ----
X    make_cleanup (free_current_contents, &name);
X  
X+ #ifdef M_XENIX
X+ /* On xenix (with gcc) READ_FILE_HEADER reads the segment table,
X+  * fileinfo table and global symbol table as well. 
X+  */
X+ #endif /* M_XENIX */
X+ 
X    READ_FILE_HEADERS (desc, name);
X  
X***************
X*** 1677,1680 ****
X--- 1809,1816 ----
X    if (val < 0)
X      perror_with_name (name);
X+ #ifdef X_DEBUG
X+     printf("\nstring table offset = %d, size = %d, start = %s\n",
X+ 	    STRING_TABLE_OFFSET, buffer, stringtab);
X+ #endif
X    
X    /* Throw away the old symbol table.  */
X***************
X*** 1721,1725 ****
X--- 1857,1865 ----
X    /* Go over the misc functions and install them in vector.  */
X  
X+ #ifndef M_XENIX /* This has already been done at header read time */
X    condense_misc_bunches (0);
X+ #else
X+   process_global_symbol_table(desc, name);
X+ #endif /* M_XENIX */
X  
X    /* Don't allow char * to have a typename (else would get caddr_t.)  */
X***************
X*** 1938,1941 ****
X--- 2078,2091 ----
X  #endif
X  
X+ #ifdef M_XENIX
X+   long lsym_count = 0;
X+   long flsym_count = 0;
X+   long file_string_base = 0;
X+   long stringtab_offset = 0;
X+   long symtab_pos = 0;
X+   long filadd = 0;
X+   int file_count = 0;
X+ #endif /* M_XENIX */
X+ 
X    /* Current partial symtab */
X    struct partial_symtab *pst;
X***************
X*** 1990,1993 ****
X--- 2140,2148 ----
X    symbuf_end = symbuf_idx = 0;
X  
X+ #ifdef M_XENIX
X+   init_fileinfo_processing();   /* start processing the list of files */
X+   nlistlen += 10; 		/* force the hack code to terminate the loop */
X+ #endif /* M_XENIX */
X+ 
X    for (symnum = 0; symnum < nlistlen; symnum++)
X      {
X***************
X*** 1994,1997 ****
X--- 2149,2194 ----
X        /* Get the symbol for this run and pull out some info */
X        QUIT;	/* allow this to be interruptable */
X+ #ifdef M_XENIX
X+ 
X+       /* This is a gross hack.  Xenix places pointers to each files $$SYMBOLS
X+        * (containing the symbols for DBX) and $$TYPES (containing the strings
X+        * for DBX) in the file name table.  There is also a partial symbol
X+        * table record for each file produced by the loader - this is ignored
X+        * at present.
X+        */
X+        if (lsym_count == 0)
X+        {
X+      try_next_file:
X+ 	 if (!get_next_fileinfo(&stringtab_offset, &flsym_count, &filadd,
X+ 	                        &symtab_pos))
X+ 	 {			/* all files proccessed */
X+ 	   symnum = nlistlen;
X+ 	   continue;
X+ 	 }
X+ 	 else
X+ 	 {
X+ 	   lseek(desc, symtab_pos, 0);
X+   	   stringtab_global = stringtab + stringtab_offset;
X+ 	   symbuf_idx = symbuf_end;  /* force symbol reading */
X+ 	   lsym_count = flsym_count;
X+ 	 }
X+ 	 
X+ 	 file_count++;
X+ 
X+ 	 if (file_count == 2)
X+            startup_file_start = filadd;
X+ 
X+ 	 if (file_count == 3)
X+            startup_file_end = filadd;
X+ 
X+          if (lsym_count == 0)    /* skip this file if no symbols in it */
X+ 	   goto try_next_file;
X+ 
X+        }
X+ 
X+        
X+        lsym_count--;
X+ 
X+ #endif /* M_XENIX */
X        if (symbuf_idx == symbuf_end)
X  	fill_symbuf ();
X***************
X*** 2024,2028 ****
X      error ("Invalid symbol data: bad string table offset: %d",       \
X  	   bufp->n_un.n_strx);                                       \
X!   namestring = bufp->n_un.n_strx + stringtab
X  
X  #define	ADD_PSYMBOL_TO_LIST(NAME, NAMELENGTH, NAMESPACE, CLASS, LIST, VALUE)\
X--- 2221,2225 ----
X      error ("Invalid symbol data: bad string table offset: %d",       \
X  	   bufp->n_un.n_strx);                                       \
X!   namestring = bufp->n_un.n_strx + stringtab + stringtab_offset
X  
X  #define	ADD_PSYMBOL_TO_LIST(NAME, NAMELENGTH, NAMESPACE, CLASS, LIST, VALUE)\
X***************
X*** 2052,2057 ****
X    } while (0);
X  
X  
X!       switch (bufp->n_type)
X  	{
X  	  /*
X--- 2249,2259 ----
X    } while (0);
X  
X+ #ifdef X_DEBUG
X+ printf("%s = (%#x, %d, %#x)\n",
X+   bufp->n_un.n_strx ? bufp->n_un.n_strx+stringtab+stringtab_offset : "<NONE>",
X+   (unsigned char)bufp->n_type, bufp->n_desc, bufp->n_value);
X+ #endif /* X_DEBUG */
X  
X!       switch ((unsigned char)bufp->n_type)
X  	{
X  	  /*
X***************
X*** 2058,2061 ****
X--- 2260,2264 ----
X  	   * Standard, non-debugger, symbols
X  	   */
X+ #ifndef M_XENIX			/* these are not present with Xenix / GCC */
X  
X  	case N_TEXT | N_EXT:
X***************
X*** 2177,2180 ****
X--- 2380,2385 ----
X  #endif
X  
X+ #endif /* M_XENIX */
X+ 
X  	  /* Keep going . . .*/
X  
X***************
X*** 2210,2213 ****
X--- 2415,2419 ----
X  	  if (pst && past_first_source_file)
X  	    {
X+ #ifndef M_XENIX
X  	      end_psymtab (pst, psymtab_include_list, includes_used,
X  			   symnum * sizeof (struct nlist), bufp->n_value,
X***************
X*** 2214,2217 ****
X--- 2420,2429 ----
X  			   dependency_list, dependencies_used,
X  			   global_psymbols.next, static_psymbols.next);
X+ #else
X+ 	      end_psymtab (pst, psymtab_include_list, includes_used,
X+ 			   symtab_pos + flsym_count * sizeof (struct nlist),
X+ 			   bufp->n_value, dependency_list, dependencies_used,
X+ 			   global_psymbols.next, static_psymbols.next);
X+ #endif
X  	      pst = (struct partial_symtab *) 0;
X  	      includes_used = 0;
X***************
X*** 2221,2227 ****
X--- 2433,2445 ----
X  	    past_first_source_file = 1;
X  
X+ #ifndef M_XENIX
X  	  pst = start_psymtab (namestring, bufp->n_value,
X  			       symnum * sizeof (struct nlist),
X  			       global_psymbols.next, static_psymbols.next);
X+ #else
X+ 	  pst = start_psymtab (namestring, bufp->n_value, symtab_pos,
X+ 			       global_psymbols.next, static_psymbols.next,
X+ 			       stringtab_offset, flsym_count);
X+ #endif /* M_XENIX */
X  
X  	  continue;
X***************
X*** 2592,2595 ****
X--- 2810,2814 ----
X  
X    /* If there's stuff to be cleaned up, clean it up.  */
X+ #ifndef M_XENIX
X    if (entry_point < bufp->n_value
X        && entry_point >= last_o_file_start)
X***************
X*** 2598,2604 ****
X--- 2817,2825 ----
X        startup_file_end = bufp->n_value;
X      }
X+ #endif /* M_XENIX */
X  
X    if (pst)
X      {
X+ #ifndef M_XENIX
X        end_psymtab (pst, psymtab_include_list, includes_used,
X  		   symnum * sizeof (struct nlist), end_of_text_addr,
X***************
X*** 2605,2608 ****
X--- 2826,2835 ----
X  		   dependency_list, dependencies_used,
X  		   global_psymbols.next, static_psymbols.next);
X+ #else /* M_XENIX */
X+       end_psymtab (pst, psymtab_include_list, includes_used,
X+ 		   symtab_pos + flsym_count * sizeof (struct nlist),
X+ 		   end_of_text_addr, dependency_list, dependencies_used,
X+ 		   global_psymbols.next, static_psymbols.next);
X+ #endif /* M_XENIX */
X        includes_used = 0;
X        dependencies_used = 0;
X***************
X*** 2654,2657 ****
X--- 2881,2885 ----
X   */
X  static struct partial_symtab *
X+ #ifndef M_XENIX
X  start_psymtab (filename, textlow, ldsymoff, global_syms, static_syms)
X       char *filename;
X***************
X*** 2660,2663 ****
X--- 2888,2902 ----
X       struct partial_symbol *global_syms;
X       struct partial_symbol *static_syms;
X+ #else
X+ start_psymtab (filename, textlow, ldsymoff, global_syms, static_syms, stroffset,
X+ 	       symcount)
X+      char *filename;
X+      int textlow;
X+      int ldsymoff;
X+      struct partial_symbol *global_syms;
X+      struct partial_symbol *static_syms;
X+      int stroffset;
X+      int symcount;
X+ #endif
X  {
X    struct partial_symtab *result =
X***************
X*** 2672,2676 ****
X    result->textlow = textlow;
X    result->ldsymoff = ldsymoff;
X! 
X    result->readin = 0;
X  
X--- 2911,2917 ----
X    result->textlow = textlow;
X    result->ldsymoff = ldsymoff;
X! #ifdef M_XENIX
X!   result->ldsymlen = symcount * sizeof(struct nlist);
X! #endif
X    result->readin = 0;
X  
X***************
X*** 2680,2683 ****
X--- 2921,2925 ----
X    result->n_global_syms = 0;
X    result->n_static_syms = 0;
X+   result->stringtab_off = stroffset;
X  
X    return result;
X***************
X*** 2723,2727 ****
X--- 2965,2971 ----
X    int i;
X  
X+ #ifndef M_XENIX
X    pst->ldsymlen = capping_symbol_offset - pst->ldsymoff;
X+ #endif /* M_XENIX */
X    pst->texthigh = capping_text;
X  
X***************
X*** 2831,2835 ****
X--- 3075,3081 ----
X  
X        /* Read in this files symbols */
X+ #ifndef M_XENIX
X        lseek (desc, sym_offset, L_SET);
X+ 
X        read_ofile_symtab (desc, stringtab, stringtab_size,
X  			 pst->ldsymoff,
X***************
X*** 2836,2839 ****
X--- 3082,3092 ----
X  			 pst->ldsymlen, pst->textlow,
X  			 pst->texthigh - pst->textlow, 0);
X+ #else  /* M_XENIX */
X+       read_ofile_symtab (desc, stringtab + pst->stringtab_off,
X+ 			 stringtab_size - pst->stringtab_off,
X+ 			 pst->ldsymoff,
X+ 			 pst->ldsymlen, pst->textlow,
X+ 			 pst->texthigh - pst->textlow, 0);
X+ #endif  /* M_XENIX */
X        sort_symtab_syms (symtab_list); /* At beginning since just added */
X  
X***************
X*** 2904,2908 ****
X--- 3157,3163 ----
X  	error("Symbol file not readable");
X  
X+ #ifndef M_XENIX	
X        READ_FILE_HEADERS (desc, name);
X+ #endif /* M_XENIX */
X  
X        /* Read in the string table */
X***************
X*** 3059,3062 ****
X--- 3314,3318 ----
X    symbuf_end = symbuf_idx = 0;
X  
X+ #ifndef M_XENIX
X    /* It is necessary to actually read one symbol *before* the start
X       of this symtab's symbols, because the GCC_COMPILED_FLAG_SYMBOL
X***************
X*** 3065,3068 ****
X--- 3321,3325 ----
X       Detecting this in read_dbx_symtab
X       would slow down initial readin, so we look for it here instead.  */
X+ 
X    if (sym_offset >= sizeof (struct nlist))
X      {
X***************
X*** 3088,3091 ****
X--- 3345,3355 ----
X        processing_gcc_compilation = 0;
X      }
X+ #else /* M_XENIX */
X+     lseek(desc, sym_offset, L_SET);
X+     processing_gcc_compilation = 0;
X+ #ifdef X_DEBUG
X+     printf("sym_offset = %d,  sym_size = %d\n", sym_offset, sym_size);
X+ #endif /* X_DEBUG */
X+ #endif /* M_XENIX */
X  
X    if (symbuf_idx == symbuf_end)
X***************
X*** 3095,3098 ****
X--- 3359,3368 ----
X      fatal("First symbol in segment of executable not a source symbol");
X  
X+ #ifdef X_DEBUG
X+ printf("%s = (%#x, %d, %#x)\n",
X+   bufp->n_un.n_strx ? bufp->n_un.n_strx+stringtab : "<NONE>",
X+   (unsigned char)bufp->n_type, bufp->n_desc, bufp->n_value);
X+ #endif /* X_DEBUG */
X+ 
X    for (symnum = 0;
X         symnum < sym_size / sizeof(struct nlist);
X***************
X*** 3104,3107 ****
X--- 3374,3382 ----
X        bufp = &symbuf[symbuf_idx++];
X        type = bufp->n_type;
X+ #ifdef X_DEBUG
X+ printf("%s = (%#x, %d, %#x)\n",
X+   bufp->n_un.n_strx ? bufp->n_un.n_strx+stringtab : "<NONE>",
X+   (unsigned char)bufp->n_type, bufp->n_desc, bufp->n_value);
X+ #endif /* X_DEBUG */
X  
X        if (offset &&
X***************
X*** 3477,3480 ****
X--- 3752,3757 ----
X  /* Read in another .o file and create a symtab entry for it.*/
X  
X+ #ifndef M_XENIX /* Xenix can't do incremental loads */
X+ 
X  static void
X  read_addl_syms (desc, stringtab, nlistlen, text_addr, text_size)
X***************
X*** 3773,3776 ****
X--- 4050,4054 ----
X    fflush (stdout);
X  }
X+ #endif /* M_XENIX */
X  
X  /* Read a number by which a type is referred to in dbx data,
X***************
X*** 5466,5475 ****
X    undef_types = (struct type **) xmalloc (undef_types_allocated *
X  					  sizeof (struct type *));
X- 
X    add_com ("symbol-file", class_files, symbol_file_command,
X  	   "Load symbol table (in dbx format) from executable file FILE.");
X  
X    add_com ("add-file", class_files, add_file_command,
X             "Load the symbols from FILE, assuming its code is at TEXT_START.") ;
X  }
X  
X--- 5744,5754 ----
X    undef_types = (struct type **) xmalloc (undef_types_allocated *
X  					  sizeof (struct type *));
X    add_com ("symbol-file", class_files, symbol_file_command,
X  	   "Load symbol table (in dbx format) from executable file FILE.");
X  
X+ #ifndef M_XENIX
X    add_com ("add-file", class_files, add_file_command,
X             "Load the symbols from FILE, assuming its code is at TEXT_START.") ;
X+ #endif /* M_XENIX */
X  }
X  
X*** dist-gdb.old/eval.c	Sun Nov  5 18:01:52 1989
X--- eval.c	Sat May  5 14:59:35 1990
X***************
X*** 412,419 ****
X  	goto nosideret;
X        if (noside == EVAL_AVOID_SIDE_EFFECTS)
X! 	return value_zero (lookup_struct_elt_type (TYPE_TARGET_TYPE
X! 						   (VALUE_TYPE (arg1)),
X! 						   &exp->elts[pc + 1].string),
X! 			   lval_memory);
X        else
X  	return value_struct_elt (arg1, 0, &exp->elts[pc + 1].string, 0,
X--- 412,419 ----
X  	goto nosideret;
X        if (noside == EVAL_AVOID_SIDE_EFFECTS)
X! 	return value_zero (lookup_struct_elt_type
X! 		(TYPE_TARGET_TYPE(VALUE_TYPE (arg1)),
X! 	        &exp->elts[pc + 1].string),
X! 	        lval_memory);
X        else
X  	return value_struct_elt (arg1, 0, &exp->elts[pc + 1].string, 0,
X*** dist-gdb.old/gas-nlist.h	Thu Jan  1 00:00:00 1970
X--- gas-nlist.h	Sat May  5 14:59:35 1990
X***************
X*** 0 ****
X--- 1,13 ----
X+ #define N_STAB 0340
X+ 
X+ struct gas_nlist {
X+ 	union {
X+ 		char	*n_name;
X+ 		struct gas_nlist *n_next;
X+ 		long	n_strx;
X+ 	} n_un;
X+ 	char	n_type;
X+ 	char	n_other;
X+ 	short	n_desc;
X+ 	unsigned n_value;
X+ };
X*** dist-gdb.old/inflow.c	Wed Jan 10 23:55:38 1990
X--- inflow.c	Sat May  5 14:59:36 1990
X***************
X*** 30,33 ****
X--- 30,34 ----
X  /* Some USG-esque systems (some of which are BSD-esque enough so that USG
X     is not defined) want this header, and it won't do any harm.  */
X+ /* rk at unify.UUCP: yes it will if you include it twice (line removed below) */
X  #include <fcntl.h>
X  
X***************
X*** 47,51 ****
X  #else
X  #include <sys/ioctl.h>
X- #include <fcntl.h>
X  #include <sgtty.h>
X  #define TERMINAL struct sgttyb
X--- 48,51 ----
X***************
X*** 299,303 ****
X--- 299,307 ----
X  
X    printf_filtered ("fcntl flags = 0x%x, sgttyb.sg_flags = 0x%x, owner pid = %d.\n",
X+ #ifdef TIOCGPGRP
X  	  tflags_inferior, sg_inferior.sg_flags, pgrp_inferior);
X+ #else
X+ 	  tflags_inferior, sg_inferior.sg_flags, 0);
X+ #endif
X  
X  #endif /* not HAVE_TERMIO */
X*** dist-gdb.old/infrun.c	Tue Jan 23 23:10:35 1990
X--- infrun.c	Sat May  5 14:59:36 1990
X***************
X*** 147,150 ****
X--- 147,154 ----
X  #include <sys/param.h>
X  /* Needed by IN_SIGTRAMP on some machines (e.g. vax).  */
X+ #ifdef M_XENIX
X+ #include <sys/page.h>
X+ #include <sys/seg.h>
X+ #endif
X  #include <sys/user.h>
X  
X*** dist-gdb.old/m-xenix386.h	Thu Jan  1 00:00:00 1970
X--- m-xenix386.h	Sat May  5 14:59:38 1990
X***************
X*** 0 ****
X--- 1,350 ----
X+ /* Macro defintions for i386.
X+    Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc.
X+ 
X+ This file is part of GDB.
X+ 
X+ GDB is free software; you can redistribute it and/or modify
X+ it under the terms of the GNU General Public License as published by
X+ the Free Software Foundation; either version 1, or (at your option)
X+ any later version.
X+ 
X+ GDB is distributed in the hope that it will be useful,
X+ but WITHOUT ANY WARRANTY; without even the implied warranty of
X+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
X+ GNU General Public License for more details.
X+ 
X+ You should have received a copy of the GNU General Public License
X+ along with GDB; see the file COPYING.  If not, write to
X+ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
X+ 
X+ /* Define the bit, byte, and word ordering of the machine.  */
X+ /* #define BITS_BIG_ENDIAN  */
X+ /* #define BYTES_BIG_ENDIAN */
X+ /* #define WORDS_BIG_ENDIAN */
X+ 
X+ /*
X+  * Changes for 80386 by Pace Willisson (pace at prep.ai.mit.edu)
X+  * July 1988
X+  */
X+ 
X+ 
X+ #ifndef i386
X+ #define i386
X+ #endif
X+ 
X+ /* This machine doesn't have the siginterrupt call.  */
X+ #define NO_SIGINTERRUPT
X+ 
X+ #define ALIGN_STACK_ON_STARTUP
X+ 
X+ /* define USG if you are using sys5 /usr/include's */
X+ #define USG
X+ 
X+ /* USG systems need these */
X+ #define vfork() fork()
X+ #define MAXPATHLEN 500
X+ 
X+ /* define this if you don't have the extension to coff that allows
X+  * file names to appear in the string table
X+  * (aux.x_file.x_foff)
X+  */
X+ #define COFF_NO_LONG_FILE_NAMES
X+ 
X+ /* turn this on when rest of gdb is ready */
X+ /* #define IEEE_FLOAT */
X+ 
X+ #define NBPG NBPC
X+ #define UPAGES USIZE
X+ 
X+ /* #define HAVE_TERMIO */
X+ 
X+ /* Get rid of any system-imposed stack limit if possible.  */
X+ 
X+ /* #define SET_STACK_LIMIT_HUGE not in sys5 */
X+ 
X+ /* Define this if the C compiler puts an underscore at the front
X+    of external names before giving them to the linker.  */
X+ 
X+ #define NAMES_HAVE_UNDERSCORE
X+ 
X+ /* Specify debugger information format (only one)  */
X+ 
X+ #define READ_DBX_FORMAT
X+ #undef COFF_FORMAT
X+ 
X+ /* number of traps that happen between exec'ing the shell 
X+  * to run an inferior, and when we finally get to 
X+  * the inferior code.  This is 2 on most implementations.
X+  */
X+ #define START_INFERIOR_TRAPS_EXPECTED 2
X+ 
X+ /* Offset from address of function to start of its code.
X+    Zero on most machines.  */
X+ 
X+ #define FUNCTION_START_OFFSET 0
X+ 
X+ /* Advance PC across any function entry prologue instructions
X+    to reach some "real" code.  */
X+ 
X+ #define SKIP_PROLOGUE(frompc)   {(frompc) = i386_skip_prologue((frompc));}
X+ 
X+ /* Immediately after a function call, return the saved pc.
X+    Can't always go through the frames for this because on some machines
X+    the new frame is not set up until the new function executes
X+    some instructions.  */
X+ 
X+ #define SAVED_PC_AFTER_CALL(frame) \
X+   (read_memory_integer (read_register (SP_REGNUM), 4))
X+ 
X+ /* This is the amount to subtract from u.u_ar0
X+    to get the offset in the core file of the register values.  */
X+ 
X+ #define KERNEL_U_ADDR 0x06000000
X+ 
X+ /* Address of end of stack space.  */
X+ 
X+ #define STACK_END_ADDR 0x80000000
X+ 
X+ /* Stack grows downward.  */
X+ 
X+ #define INNER_THAN <
X+ 
X+ /* Sequence of bytes for breakpoint instruction.  */
X+ 
X+ #define BREAKPOINT {0xcc}
X+ 
X+ /* Amount PC must be decremented by after a breakpoint.
X+    This is often the number of bytes in BREAKPOINT
X+    but not always.  */
X+ 
X+ #define DECR_PC_AFTER_BREAK 1
X+ 
X+ /* Nonzero if instruction at PC is a return instruction.  */
X+ 
X+ #define ABOUT_TO_RETURN(pc) (read_memory_integer (pc, 1) == 0xc3)
X+ 
X+ /* Return 1 if P points to an invalid floating point value.
X+    LEN is the length in bytes -- not relevant on the 386.  */
X+ 
X+ #define INVALID_FLOAT(p, len) (0)
X+ 
X+ /* code to execute to print interesting information about the
X+  * floating point processor (if any)
X+  * No need to define if there is nothing to do.
X+  */
X+ #define FLOAT_INFO { i386_float_info (); }
X+ 
X+ 
X+ /* Largest integer type */
X+ #define LONGEST long
X+ 
X+ /* Name of the builtin type for the LONGEST type above. */
X+ #define BUILTIN_TYPE_LONGEST builtin_type_long
X+ 
X+ /* Say how long (ordinary) registers are.  */
X+ 
X+ #define REGISTER_TYPE long
X+ 
X+ /* Number of machine registers */
X+ 
X+ #define NUM_REGS 16
X+ 
X+ /* Initializer for an array of names of registers.
X+    There should be NUM_REGS strings in this initializer.  */
X+ 
X+ /* the order of the first 8 registers must match the compiler's 
X+  * numbering scheme (which is the same as the 386 scheme)
X+  * also, this table must match regmap in i386-pinsn.c.
X+  */
X+ #define REGISTER_NAMES { "eax", "ecx", "edx", "ebx", \
X+ 			 "esp", "ebp", "esi", "edi", \
X+ 			 "eip", "ps", "cs", "ss", \
X+ 			 "ds", "es", "fs", "gs", \
X+ 			 }
X+ 
X+ /* Register numbers of various important registers.
X+    Note that some of these values are "real" register numbers,
X+    and correspond to the general registers of the machine,
X+    and some are "phony" register numbers which are too large
X+    to be actual register numbers as far as the user is concerned
X+    but do serve to get the desired values when passed to read_register.  */
X+ 
X+ #define FP_REGNUM 5		/* Contains address of executing stack frame */
X+ #define SP_REGNUM 4		/* Contains address of top of stack */
X+ 
X+ #define PC_REGNUM 8
X+ #define PS_REGNUM 9
X+ 
X+ #define REGISTER_U_ADDR(addr, blockend, regno) \
X+ 	(addr) = i386_register_u_addr ((blockend),(regno));
X+ 
X+ /* Total amount of space needed to store our copies of the machine's
X+    register state, the array `registers'.  */
X+ #define REGISTER_BYTES (NUM_REGS * 4)
X+ 
X+ /* Index within `registers' of the first byte of the space for
X+    register N.  */
X+ 
X+ #define REGISTER_BYTE(N) ((N)*4)
X+ 
X+ /* Number of bytes of storage in the actual machine representation
X+    for register N.  */
X+ 
X+ #define REGISTER_RAW_SIZE(N) (4)
X+ 
X+ /* Number of bytes of storage in the program's representation
X+    for register N. */
X+ 
X+ #define REGISTER_VIRTUAL_SIZE(N) (4)
X+ 
X+ /* Largest value REGISTER_RAW_SIZE can have.  */
X+ 
X+ #define MAX_REGISTER_RAW_SIZE 4
X+ 
X+ /* Largest value REGISTER_VIRTUAL_SIZE can have.  */
X+ 
X+ #define MAX_REGISTER_VIRTUAL_SIZE 4
X+ 
X+ /* Nonzero if register N requires conversion
X+    from raw format to virtual format.  */
X+ 
X+ #define REGISTER_CONVERTIBLE(N) (0)
X+ 
X+ /* Convert data from raw format for register REGNUM
X+    to virtual format for register REGNUM.  */
X+ 
X+ #define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,FROM,TO) {bcopy ((FROM), (TO), 4);}
X+ 
X+ /* Convert data from virtual format for register REGNUM
X+    to raw format for register REGNUM.  */
X+ 
X+ #define REGISTER_CONVERT_TO_RAW(REGNUM,FROM,TO) {bcopy ((FROM), (TO), 4);}
X+ 
X+ /* Return the GDB type object for the "standard" data type
X+    of data in register N.  */
X+ 
X+ #define REGISTER_VIRTUAL_TYPE(N) (builtin_type_int)
X+ 
X+ /* Store the address of the place in which to copy the structure the
X+    subroutine will return.  This is called from call_function. */
X+ 
X+ #define STORE_STRUCT_RETURN(ADDR, SP) \
X+   { (SP) -= sizeof (ADDR);		\
X+     write_memory ((SP), &(ADDR), sizeof (ADDR)); }
X+ 
X+ /* Extract from an array REGBUF containing the (raw) register state
X+    a function return value of type TYPE, and copy that, in virtual format,
X+    into VALBUF.  */
X+ 
X+ #define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
X+   bcopy (REGBUF, VALBUF, TYPE_LENGTH (TYPE))
X+ 
X+ /* Write into appropriate registers a function return value
X+    of type TYPE, given in virtual format.  */
X+ 
X+ #define STORE_RETURN_VALUE(TYPE,VALBUF) \
X+   write_register_bytes (0, VALBUF, TYPE_LENGTH (TYPE))
X+ 
X+ /* Extract from an array REGBUF containing the (raw) register state
X+    the address in which a function should return its structure value,
X+    as a CORE_ADDR (or an expression that can be used as one).  */
X+ 
X+ #define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(int *)(REGBUF))
X+ 
X+ 
X+ /* Describe the pointer in each stack frame to the previous stack frame
X+    (its caller).  */
X+ 
X+ /* FRAME_CHAIN takes a frame's nominal address
X+    and produces the frame's chain-pointer.
X+ 
X+    FRAME_CHAIN_COMBINE takes the chain pointer and the frame's nominal address
X+    and produces the nominal address of the caller frame.
X+ 
X+    However, if FRAME_CHAIN_VALID returns zero,
X+    it means the given frame is the outermost one and has no caller.
X+    In that case, FRAME_CHAIN_COMBINE is not used.  */
X+ 
X+ #define FRAME_CHAIN(thisframe) \
X+   (outside_startup_file ((thisframe)->pc) ? \
X+    read_memory_integer ((thisframe)->frame, 4) :\
X+    0)
X+ 
X+ #define FRAME_CHAIN_VALID(chain, thisframe) \
X+   (chain != 0 && (outside_startup_file (FRAME_SAVED_PC (thisframe))))
X+ 
X+ #define FRAME_CHAIN_COMBINE(chain, thisframe) (chain)
X+ 
X+ /* Define other aspects of the stack frame.  */
X+ 
X+ /* A macro that tells us whether the function invocation represented
X+    by FI does not have a frame on the stack associated with it.  If it
X+    does not, FRAMELESS is set to 1, else 0.  */
X+ #define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
X+   FRAMELESS_LOOK_FOR_PROLOGUE(FI, FRAMELESS)
X+ 
X+ #define FRAME_SAVED_PC(FRAME) (read_memory_integer ((FRAME)->frame + 4, 4))
X+ 
X+ #define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
X+ 
X+ #define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
X+ 
X+ /* Return number of args passed to a frame.
X+    Can return -1, meaning no way to tell.  */
X+ 
X+ #define FRAME_NUM_ARGS(numargs, fi) (numargs) = i386_frame_num_args(fi)
X+ 
X+ /* Return number of bytes at start of arglist that are not really args.  */
X+ 
X+ #define FRAME_ARGS_SKIP 8
X+ 
X+ /* Put here the code to store, into a struct frame_saved_regs,
X+    the addresses of the saved registers of frame described by FRAME_INFO.
X+    This includes special registers such as pc and fp saved in special
X+    ways in the stack frame.  sp is even more special:
X+    the address we return for it IS the sp for the next frame.  */
X+ 
X+ #define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \
X+ { i386_frame_find_saved_regs ((frame_info), &(frame_saved_regs)); }
X+ 
X+ 
X+ /* Things needed for making the inferior call functions.  */
X+ 
X+ /* Push an empty stack frame, to record the current PC, etc.  */
X+ 
X+ #define PUSH_DUMMY_FRAME { i386_push_dummy_frame (); }
X+ 
X+ /* Discard from the stack the innermost frame, restoring all registers.  */
X+ 
X+ #define POP_FRAME  { i386_pop_frame (); }
X+ 
X+ /* this is 
X+  *   call 11223344 (32 bit relative)
X+  *   int3
X+  */
X+ 
X+ #define CALL_DUMMY { 0x223344e8, 0xcc11 }
X+ 
X+ #define CALL_DUMMY_LENGTH 8
X+ 
X+ #define CALL_DUMMY_START_OFFSET 0  /* Start execution at beginning of dummy */
X+ 
X+ /* Insert the specified number of args and function address
X+    into a call sequence of the above form stored at DUMMYNAME.  */
X+ 
X+ #define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, type)   \
X+ { \
X+ 	int from, to, delta, loc; \
X+ 	loc = (int)(read_register (SP_REGNUM) - CALL_DUMMY_LENGTH); \
X+ 	from = loc + 5; \
X+ 	to = (int)(fun); \
X+ 	delta = to - from; \
X+ 	*(int *)((char *)(dummyname) + 1) = delta; \
X+ }
X+ 
X+ #define CANNOT_EXECUTE_STACK
X+ 
X+ /* missing stuff from SCO */
X+ #define X_OK 1			/* for access(2) */
X+ #define W_OK 2			/* for access(2) */
X+ #define R_OK 4			/* for access(2) */
X*** dist-gdb.old/munch	Wed Jul  5 19:46:28 1989
X--- munch	Sat May  5 14:59:38 1990
X***************
X*** 6,11 ****
X  echo 'void initialize_all_files () {'
X  
X! if test "$1" = "-DSYSV" ; then
X      shift;
X      nm $* | egrep '^(.*[^a-zA-Z_]_|_)initialize_' | \
X  	sed -e 's/^.*\(_initialize_[a-zA-Z0-9_]*\)[^a-zA-Z0-9_].*$/   \1 ();/'
X--- 6,15 ----
X  echo 'void initialize_all_files () {'
X  
X! if [ -f /xenix ]; then
X      shift;
X+     nm $* | egrep 'A *__initialize_' | \
X+ 	sed -e 's/^.*A *_*\(.*\)/    _\1 ();/'
X+ else if test "$1" = "-DSYSV" ; then
X+     shift;
X      nm $* | egrep '^(.*[^a-zA-Z_]_|_)initialize_' | \
X  	sed -e 's/^.*\(_initialize_[a-zA-Z0-9_]*\)[^a-zA-Z0-9_].*$/   \1 ();/'
X***************
X*** 13,16 ****
X--- 17,21 ----
X      nm -p $* | egrep 'T *__initialize_' | \
X  	sed -e 's/^.*T *_*\(.*\)/    _\1 ();/'
X+ fi
X  fi
X  
X*** dist-gdb.old/readline/readline.c	Sun Nov 26 21:31:36 1989
X--- readline/readline.c	Sat May  5 14:59:43 1990
X***************
X*** 1044,1048 ****
X  readline_default_bindings ()
X  {
X! #ifdef TIOCGETP
X    struct sgttyb ttybuff;
X    int tty = fileno (rl_instream);
X--- 1044,1048 ----
X  readline_default_bindings ()
X  {
X! #if 0 /* def TIOCGETP */
X    struct sgttyb ttybuff;
X    int tty = fileno (rl_instream);
X*** dist-gdb.old/symtab.h	Fri Sep  8 00:59:14 1989
X--- symtab.h	Sat May  5 14:59:43 1990
X***************
X*** 150,153 ****
X--- 150,156 ----
X       how long errors take). */
X    int statics_offset, n_static_syms;
X+ #ifdef M_XENIX
X+   int stringtab_off;
X+ #endif /* M_XENIX */
X  };
X  
X*** dist-gdb.old/test/fred.h	Thu Jan  1 00:00:00 1970
X--- test/fred.h	Sat May  5 15:14:16 1990
X***************
X*** 0 ****
X--- 1,5 ----
X+ struct test_s {
X+ 	long l;
X+ 	int  i;
X+ 	char c;
X+ };
X*** dist-gdb.old/test/test.c	Thu Jan  1 00:00:00 1970
X--- test/test.c	Sat May  5 15:48:37 1990
X***************
X*** 0 ****
X--- 1,32 ----
X+ #include <stdio.h>
X+ #include "fred.h"
X+ 
X+ extern char **environ;
X+ int j = 100;
X+ 
X+ struct test_s test_v;
X+ 
X+ boo(char *p)
X+ {
X+ 	return 0x3742;
X+ }
X+ 
X+ 
X+ #define alloca __builtin_alloca
X+ main(int argc, char **argv)
X+ {
X+ 	int i;
X+ 	char *p;
X+ 	i = 1234;
X+ 	test_v.l = 34;
X+ 	test_v.i = 35;
X+ 	test_v.c = 36;
X+ 	foo(&test_v);
X+ 	printf("%s: hello world (%d, %d)\n", *argv, i, j);
X+ 	p = alloca(200000);
X+ 	foo(p);
X+ 	p = alloca(10);
X+ 	strcpy(p, "FooBar");
X+ 	*p = 'Z';
X+ 	while (1) ;
X+ }
X*** dist-gdb.old/test/test1.c	Thu Jan  1 00:00:00 1970
X--- test/test1.c	Sat May  5 17:41:05 1990
X***************
X*** 0 ****
X--- 1,9 ----
X+ #include <stdio.h>
X+ #include "fred.h"
X+ 
X+ foo(st)
X+ struct test_s *st;
X+ {
X+ 	printf("%d %d %d\n", st->l, st->i, st->c);
X+ 	while (1);
X+ }
X*** dist-gdb.old/values.c	Sun Sep 10 03:39:19 1989
X--- values.c	Sat May  5 17:28:02 1990
X***************
X*** 1025,1028 ****
X    add_info ("values", value_history_info,
X  	    "Elements of value history (around item number IDX, or last ten).");
X!   add_info_alias ("history", value_history_info, 0);
X  }
X--- 1025,1028 ----
X    add_info ("values", value_history_info,
X  	    "Elements of value history (around item number IDX, or last ten).");
X! /*  add_info_alias ("history", value_history_info, 0); */
X  }
SHAR_EOF
if test 39436 -ne "`wc -c < 'gdb-x386.01'`"
then
	echo shar: error transmitting "'gdb-x386.01'" '(should have been 39436 characters)'
fi
fi # end of overwriting check
#	End of shell archive
exit 0



More information about the Comp.unix.xenix mailing list