* xcoffread.c (xcoff_next_symbol_text): Don't return before
authorJim Kingdon <jkingdon@engr.sgi.com>
Wed, 20 Apr 1994 17:07:11 +0000 (17:07 +0000)
committerJim Kingdon <jkingdon@engr.sgi.com>
Wed, 20 Apr 1994 17:07:11 +0000 (17:07 +0000)
updating raw_symbol and symnum.  Return a value in the case where
we complained.

gdb/ChangeLog
gdb/xcoffread.c

index acf2aef90d1023f98acc727d63f64879f0e6e46a..390b5916dec82072ad2beebd9c62127d0f86333d 100644 (file)
@@ -1,5 +1,9 @@
 Wed Apr 20 08:37:16 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
 
+       * xcoffread.c (xcoff_next_symbol_text): Don't return before
+       updating raw_symbol and symnum.  Return a value in the case where
+       we complained.
+
        * dstread.c, coffread.c: Don't define pending_blocks; buildsym.c
        takes care of it.
        * parse.c: Don't define block_found; it is defined in symtab.c.
index 7d93098fc822b65b1bac39f7c190d8076eae13bc..de8f77ac46e1db2f24326a4508f1a269cea77823 100644 (file)
@@ -983,16 +983,32 @@ xcoff_next_symbol_text ()
   struct internal_syment symbol;
   static struct complaint msg =
     {"Unexpected symbol continuation", 0, 0};
+  char *retval;
 
   bfd_coff_swap_sym_in (current_objfile->obfd, raw_symbol, &symbol);
   if (symbol.n_zeroes)
-    complain (&msg);
+    {
+      complain (&msg);
+
+      /* Return something which points to '\0' and hope the symbol reading
+        code does something reasonable.  */
+      retval = "";
+    }
   else if (symbol.n_sclass & 0x80)
-    return debugsec + symbol.n_offset;
+    {
+      retval = debugsec + symbol.n_offset;
+      raw_symbol += coff_data (current_objfile->obfd)->local_symesz;
+      ++symnum;
+    }
   else
-    complain (&msg);
-  raw_symbol += coff_data (current_objfile->obfd)->local_symesz;
-  ++symnum;
+    {
+      complain (&msg);
+
+      /* Return something which points to '\0' and hope the symbol reading
+        code does something reasonable.  */
+      retval = "";
+    }
+  return retval;
 }
 
 /* read the whole symbol table of a given bfd. */