]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* dbxread.c (dbx_symfile_init): Fix for nonexistant string table,
authorFred Fish <fnf@specifix.com>
Wed, 3 Mar 1993 06:04:26 +0000 (06:04 +0000)
committerFred Fish <fnf@specifix.com>
Wed, 3 Mar 1993 06:04:26 +0000 (06:04 +0000)
reported by mycroft@gnu.ai.mit.edu.

(Ultrix 2.2 support from Michael Rendell <michael@mercury.cs.mun.ca>)
* configure.in (vax-*-ultrix2*):  New triplet.
* config/vaxult2.mh:  New file.
* xm-vaxult2.h:  New file.

gdb/.Sanitize
gdb/ChangeLog
gdb/config/.Sanitize
gdb/config/vaxult2.mh [new file with mode: 0644]
gdb/configure.in
gdb/dbxread.c
gdb/xm-vaxult2.h [new file with mode: 0644]

index 99ffba91595b2fe89500ccf6d6141adbd58951a9..d2336a6c9bfff598cf7b158fce85b34e6d95fa03 100644 (file)
@@ -376,6 +376,7 @@ xm-umax.h
 xm-vax.h
 xm-vaxbsd.h
 xm-vaxult.h
+xm-vaxult2.h
 z8k-tdep.c
 
 Do-last:
index d00469dbb42e44695872eb64c397829945c1f756..422c7a41502f423d6845144b0602e24b6ee2c28e 100644 (file)
@@ -1,5 +1,13 @@
 Tue Mar  2 17:57:56 1993  Fred Fish  (fnf@cygnus.com)
 
+       * dbxread.c (dbx_symfile_init):  Fix for nonexistant string table,
+       reported by mycroft@gnu.ai.mit.edu.
+
+       (Ultrix 2.2 support from Michael Rendell <michael@mercury.cs.mun.ca>)
+       * configure.in (vax-*-ultrix2*):  New triplet.
+       * config/vaxult2.mh:  New file.
+       * xm-vaxult2.h:  New file.
+
        * c-exp.y (parse_number):  Change high_bit to unsigned.
        * demangle.c:  Change all references to cfront to ARM, since the
        actual algorithm is the one specified in the Annotated Reference
index c5cbc26f36e403e037ab970aeb9e0c7733cf52a5..db26b9a2980401b2246d62343c3eae38d8514825 100644 (file)
@@ -128,6 +128,7 @@ umax.mt
 vax.mt
 vaxbsd.mh
 vaxult.mh
+vaxult2.mh
 vxworks68.mt
 vxworks960.mt
 
diff --git a/gdb/config/vaxult2.mh b/gdb/config/vaxult2.mh
new file mode 100644 (file)
index 0000000..532a4fd
--- /dev/null
@@ -0,0 +1,8 @@
+# Host: DEC VAX running Ultrix
+
+XDEPFILES= 
+REGEX=regex.o
+REGEX1=regex.o
+XM_FILE= xm-vaxult2.h
+NAT_FILE= nm-vax.h
+NATDEPFILES= infptrace.o inftarg.o fork-child.o coredep.o corelow.o
index fc5fdcdd521296441a8e59c7f154ff3d3cadcb22..4974d942076ce41eab1bd2f0f7d72cae39f1cc16 100644 (file)
@@ -82,6 +82,7 @@ sparc-*-*)            gdb_host=sun4os4 ;;
 tahoe-*-*)             gdb_host=tahoe ;;
 
 vax-*-bsd*)            gdb_host=vaxbsd ;;
+vax-*-ultrix2*)                gdb_host=vaxult2 ;;
 vax-*-ultrix*)         gdb_host=vaxult ;;
 
 esac
index 6151d5e8aff06f96eee5bf95a79ed8581fd601b2..3cb4bcdd965fa78c496e4ecfb9eac38a748be9e9 100644 (file)
@@ -553,19 +553,23 @@ dbx_symfile_init (objfile)
      that we put in on the psymbol_obstack, we can't do this since gdb gets
      a fatal error (out of virtual memory) if the size is bogus.  We can
      however at least check to see if the size is zero or some negative
-     value. */
+     value.  */
 
   val = bfd_seek (sym_bfd, STRING_TABLE_OFFSET, L_SET);
   if (val < 0)
     perror_with_name (name);
 
+  memset (size_temp, 0, sizeof (size_temp));
   val = bfd_read ((PTR)size_temp, sizeof (long), 1, sym_bfd);
   if (val < 0)
     perror_with_name (name);
 
   DBX_STRINGTAB_SIZE (objfile) = bfd_h_get_32 (sym_bfd, size_temp);
 
-  if (DBX_STRINGTAB_SIZE (objfile) <= 0
+  if (DBX_STRINGTAB_SIZE (objfile) == 0)
+    error ("%s has no string table.", name);
+
+  if (DBX_STRINGTAB_SIZE (objfile) < 0
       || DBX_STRINGTAB_SIZE (objfile) > bfd_get_size (sym_bfd))
     error ("ridiculous string table size (%d bytes).",
           DBX_STRINGTAB_SIZE (objfile));
@@ -1650,7 +1654,7 @@ process_one_symbol (type, desc, valu, name, section_offsets, objfile)
             sanity checks).  If so, that one was actually the directory
             name, and the current one is the real file name.
             Patch things up. */           
-         if (previous_stab_code == (int) N_SO)
+         if (previous_stab_code == (unsigned char) N_SO)
            {
              patch_subfile_names (current_subfile, name);
              break;            /* Ignore repeated SOs */
diff --git a/gdb/xm-vaxult2.h b/gdb/xm-vaxult2.h
new file mode 100644 (file)
index 0000000..7470350
--- /dev/null
@@ -0,0 +1,7 @@
+/* Definitions to make GDB run on a vax under Ultrix. */
+
+#include "xm-vax.h"
+extern char *strdup();
+
+#define MEM_FNS_DECLARED
+#define NO_PTRACE_H