This is a patch for GNU gdb 4.12.
Apply this patch with "patch -p0 < vgdb-patch " in the root
directory of the gdb 4.12 distribution *after* you have configured
the distribution.

*** Makefile.orig	Wed Jun  8 13:58:44 1994
--- Makefile	Wed Jun  8 14:28:30 1994
***************
*** 31,36 ****
--- 31,38 ----
  # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  #
  
+ LDFLAGS = -L$$SHAPETOOLS/lib
+ 
  srcdir = .
  
  prefix = /usr/local
*** gdb/Makefile.orig	Wed Jun  8 13:59:47 1994
--- gdb/Makefile	Wed Jun  8 14:25:44 1994
***************
*** 101,107 ****
  # This is essentially the header file directory for the library
  # routines in libiberty.
  INCLUDE_DIR =  $(srcdir)/../include
! INCLUDE_CFLAGS = -I$(INCLUDE_DIR)
  # Where is the "-liberty" library, containing getopt and obstack?
  LIBIBERTY = ../libiberty/libiberty.a
  
--- 101,107 ----
  # This is essentially the header file directory for the library
  # routines in libiberty.
  INCLUDE_DIR =  $(srcdir)/../include
! INCLUDE_CFLAGS = -I$(INCLUDE_DIR) -I$$SHAPETOOLS/include
  # Where is the "-liberty" library, containing getopt and obstack?
  LIBIBERTY = ../libiberty/libiberty.a
  
***************
*** 570,576 ****
  gdb: $(OBS) $(TSOBS) $(ADD_DEPS) $(CDEPS) init.o
  	rm -f gdb
  	$(CC-LD) $(INTERNAL_LDFLAGS) -o gdb \
! 	  init.o $(OBS) $(TSOBS) $(ADD_FILES) $(CLIBS) $(LOADLIBES)
  
  saber_gdb: $(SFILES) $(DEPFILES) copying.c version.c
  	#setopt load_flags $(CFLAGS) $(BFD_CFLAGS) -DHOST_SYS=SUN4_SYS
--- 570,577 ----
  gdb: $(OBS) $(TSOBS) $(ADD_DEPS) $(CDEPS) init.o
  	rm -f gdb
  	$(CC-LD) $(INTERNAL_LDFLAGS) -o gdb \
! 	  init.o $(OBS) $(TSOBS) $(ADD_FILES) $(CLIBS) $(LOADLIBES) \
! 	    -lAtFStk -lAtFS -lsttk
  
  saber_gdb: $(SFILES) $(DEPFILES) copying.c version.c
  	#setopt load_flags $(CFLAGS) $(BFD_CFLAGS) -DHOST_SYS=SUN4_SYS
*** source.c.orig	Thu Feb  3 17:42:16 1994
--- source.c	Wed Jun  8 14:53:43 1994
***************
*** 17,22 ****
--- 17,26 ----
  along with this program; if not, write to the Free Software
  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  
+ #include <atfs.h>
+ #include <atfstk.h>
+ #define _memory_h
+ 
  #include "defs.h"
  #include "symtab.h"
  #include "expression.h"
***************
*** 38,43 ****
--- 42,48 ----
  #include "symfile.h"
  #include "objfiles.h"
  
+ 
  /* Prototypes for local functions. */
  
  static int
***************
*** 488,495 ****
  
    if (try_cwd_first || string[0] == '/')
      {
        filename = string;
!       fd = open (filename, mode, prot);
        if (fd >= 0 || string[0] == '/' || strchr (string, '/'))
  	goto done;
      }
--- 493,507 ----
  
    if (try_cwd_first || string[0] == '/')
      {
+       Af_key *src_key;
        filename = string;
!       src_key = atBindVersion (string, NULL);
!       if (src_key && (mode == O_RDONLY)) {
! 	fd = fileno (af_open (src_key, "r"));
! 	af_dropkey (src_key);
!       }
!       else
! 	fd = open (filename, mode, prot);
        if (fd >= 0 || string[0] == '/' || strchr (string, '/'))
  	goto done;
      }
***************
*** 535,541 ****
        strcat (filename+len, "/");
        strcat (filename, string);
  
!       fd = open (filename, mode, prot);
        if (fd >= 0) break;
      }
  
--- 547,561 ----
        strcat (filename+len, "/");
        strcat (filename, string);
  
!       {
! 	Af_key *src_key = atBindVersion (filename, NULL);
! 	if (src_key && (mode == O_RDONLY)) {
! 	  fd = fileno (af_open (src_key, "r"));
! 	  af_dropkey (src_key);
! 	}
! 	else
! 	  fd = open (filename, mode, prot);
!       }
        if (fd >= 0) break;
      }
  
***************
*** 572,578 ****
    /* Quick way out if we already know its full name */
    if (s->fullname) 
      {
!       result = open (s->fullname, O_RDONLY);
        if (result >= 0)
          return result;
        /* Didn't work -- free old one, try again. */
--- 592,605 ----
    /* Quick way out if we already know its full name */
    if (s->fullname) 
      {
!       Af_key *src_key = atBindVersion (s->fullname, NULL);
! 
!       if (src_key) {
! 	result = fileno (af_open (src_key, "r"));
! 	af_dropkey (src_key);
!       }
!       else
! 	result = open (s->fullname, O_RDONLY);
        if (result >= 0)
          return result;
        /* Didn't work -- free old one, try again. */
*** gdb/defs.h.orig	Wed May 12 17:34:12 1993
--- gdb/defs.h	Fri Jul 30 16:33:36 1993
***************
*** 620,627 ****
  extern NORETURN void			/* Does not return to the caller.  */
  fatal ();
  
! extern NORETURN void			/* Not specified as volatile in ... */
! exit PARAMS ((int));			/* 4.10.4.3 */
  
  extern NORETURN void			/* Does not return to the caller.  */
  nomem PARAMS ((long));
--- 620,627 ----
  extern NORETURN void			/* Does not return to the caller.  */
  fatal ();
  
! /* extern NORETURN void			/* Not specified as volatile in ... */
! /* exit PARAMS ((int));			/* 4.10.4.3 */
  
  extern NORETURN void			/* Does not return to the caller.  */
  nomem PARAMS ((long));
***************
*** 717,727 ****
  
  #endif	/* MALLOC_INCOMPATIBLE */
  
  extern void
  qsort PARAMS ((void *base, size_t nmemb,		/* 4.10.5.2 */
  	       size_t size,
  	       int (*comp)(const void *, const void *)));
! 
  #ifndef	MEM_FNS_DECLARED	/* Some non-ANSI use void *, not char *.  */
  extern PTR
  memcpy PARAMS ((void *, const void *, size_t));		/* 4.11.2.1 */
--- 717,728 ----
  
  #endif	/* MALLOC_INCOMPATIBLE */
  
+ #if 0
  extern void
  qsort PARAMS ((void *base, size_t nmemb,		/* 4.10.5.2 */
  	       size_t size,
  	       int (*comp)(const void *, const void *)));
! #endif
  #ifndef	MEM_FNS_DECLARED	/* Some non-ANSI use void *, not char *.  */
  extern PTR
  memcpy PARAMS ((void *, const void *, size_t));		/* 4.11.2.1 */
***************
*** 743,750 ****
--- 744,753 ----
  strtok PARAMS ((char *, const char *));			/* 4.11.5.8 */
  
  #ifndef	MEM_FNS_DECLARED	/* Some non-ANSI use void *, not char *.  */
+ #if 0
  extern PTR
  memset PARAMS ((void *, int, size_t));			/* 4.11.6.1 */
+ #endif
  #endif
  
  extern char *
