* config/sparc/nm-linux.h: Include config/nm-linux.h.
[deliverable/binutils-gdb.git] / gdb / buildsym.c
index 860f4aaa075704a43ee5829e9139364b3daf2a99..dff92936cfdefab8530b4eabe2070c3d2eeeefe5 100644 (file)
@@ -1,5 +1,5 @@
 /* Support routines for building symbol tables in GDB's internal format.
-   Copyright 1986-1999 Free Software Foundation, Inc.
+   Copyright 1986-2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -34,6 +34,8 @@
 #include "gdbtypes.h"
 #include "complaints.h"
 #include "gdb_string.h"
+#include "expression.h"                /* For "enum exp_opcode" used by... */
+#include "language.h"          /* For "longest_local_hex_string_custom" */
 
 /* Ask buildsym.h to define the vars it normally declares `extern'.  */
 #define        EXTERN
@@ -81,10 +83,24 @@ struct complaint innerblock_anon_complaint =
 {"inner block (0x%lx-0x%lx) not inside outer block (0x%lx-0x%lx)", 0, 0};
 
 struct complaint blockvector_complaint =
-{"block at 0x%lx out of order", 0, 0};
+{"block at %s out of order", 0, 0};
 \f
 /* maintain the lists of symbols and blocks */
 
+/* Add a pending list to free_pendings. */
+void
+add_free_pendings (struct pending *list)
+{
+  register struct pending *link = list;
+
+  if (list)
+    {
+      while (link->next) link = link->next;
+      link->next = free_pendings;
+      free_pendings = list;
+    }
+}
+      
 /* Add a symbol to one of the lists of symbols.  */
 
 void
@@ -148,7 +164,7 @@ find_symbol_in_list (struct pending *list, char *name, int length)
 
 /* ARGSUSED */
 void
-really_free_pendings (int foo)
+really_free_pendings (PTR dummy)
 {
   struct pending *next, *next1;
 
@@ -487,17 +503,11 @@ make_blockvector (struct objfile *objfile)
          if (BLOCK_START (BLOCKVECTOR_BLOCK (blockvector, i - 1))
              > BLOCK_START (BLOCKVECTOR_BLOCK (blockvector, i)))
            {
-
-             /* FIXME-32x64: loses if CORE_ADDR doesn't fit in a
-                long.  Possible solutions include a version of
-                complain which takes a callback, a
-                sprintf_address_numeric to match
-                print_address_numeric, or a way to set up a GDB_FILE
-                which causes sprintf rather than fprintf to be
-                called.  */
+             CORE_ADDR start
+               = BLOCK_START (BLOCKVECTOR_BLOCK (blockvector, i));
 
              complain (&blockvector_complaint,
-                       (unsigned long) BLOCK_START (BLOCKVECTOR_BLOCK (blockvector, i)));
+                       longest_local_hex_string ((LONGEST) start));
            }
        }
     }
@@ -533,6 +543,7 @@ start_subfile (char *name, char *dirname)
      source file.  */
 
   subfile = (struct subfile *) xmalloc (sizeof (struct subfile));
+  memset ((char *) subfile, 0, sizeof (struct subfile));
   subfile->next = subfiles;
   subfiles = subfile;
   current_subfile = subfile;
This page took 0.025233 seconds and 4 git commands to generate.