* inftarg.c (child_thread_alive): New function to see if a
[deliverable/binutils-gdb.git] / gdb / dstread.c
index 38ea398c748e65af26f5640107f57171066be40e..378ed8ee554618e78fc132defcf778fc877b0cff 100644 (file)
@@ -51,8 +51,6 @@ static int prev_line_number;
 
 static int line_vector_length;
 
-struct pending_block *pending_blocks;
-
 static struct blockvector *
 make_blockvector PARAMS ((struct objfile *));
 
@@ -78,7 +76,8 @@ static void
 dst_symfile_finish PARAMS ((struct objfile *));
 
 static void
-record_minimal_symbol PARAMS ((char *, CORE_ADDR, enum minimal_symbol_type));
+record_minimal_symbol PARAMS ((char *, CORE_ADDR, enum minimal_symbol_type,
+                              struct objfile *));
 
 static void
 dst_end_symtab PARAMS ((struct objfile *));
@@ -236,14 +235,16 @@ dst_end_symtab (objfile)
 }
 \f
 static void
-record_minimal_symbol (name, address, type)
+record_minimal_symbol (name, address, type, objfile)
      char *name;
      CORE_ADDR address;
      enum minimal_symbol_type type;
+     struct objfile *objfile;
 {
   prim_record_minimal_symbol (savestring (name, strlen (name)),
-                            address,
-                            type);
+                             address,
+                             type,
+                             objfile);
 }
 \f
 /* dst_symfile_init ()
@@ -349,7 +350,13 @@ dst_symfile_read (objfile, section_offsets, mainline)
 
   /* Sort symbols alphabetically within each block.  */
 
-  sort_all_symtab_syms ();
+  {
+    struct symtab *s;
+    for (s = objfile -> symtabs; s != NULL; s = s -> next)
+      {
+       sort_symtab_syms (s);
+      }
+  }
 
   /* Install any minimal symbols that have been collected as the current
      minimal symbols for this objfile. */
@@ -1469,7 +1476,7 @@ process_dst_block(objfile, entry)
        case dst_block_function:
        case dst_block_subroutine:
        case dst_block_program:
-               record_minimal_symbol(name, address, mst_text);
+               record_minimal_symbol(name, address, mst_text, objfile);
                function = process_dst_function(
                        objfile,
                        symbol_entry,
@@ -1631,7 +1638,7 @@ read_dst_symtab (objfile)
        }
        if (module_num)
                record_minimal_symbol("<end_of_program>",
-                               BLOCK_END(block), mst_text);
+                               BLOCK_END(block), mst_text, objfile);
        /* One more faked symbol to make sure nothing can ever run off the
         * end of the symbol table. This one represents the end of the
         * text space. It used to be (CORE_ADDR) -1 (effectively the highest
@@ -1642,7 +1649,7 @@ read_dst_symtab (objfile)
         */
        record_minimal_symbol("<end_of_text>",
                                (CORE_ADDR) 0x40000000,
-                               mst_text);
+                               mst_text, objfile);
        while (struct_list)
        {
                element = struct_list;
@@ -1696,6 +1703,7 @@ dst_symfile_offsets (objfile, addr)
      struct objfile *objfile;
      CORE_ADDR addr;
 {
+  objfile->num_sections = 1;
   return &dst_symfile_faker;
 }
 
@@ -1703,8 +1711,10 @@ dst_symfile_offsets (objfile, addr)
 
 static struct sym_fns dst_sym_fns =
 {
-  "apollo",            /* sym_name: name or name prefix of BFD target type */
-  6,                   /* sym_namelen: number of significant sym_name chars */
+  /* FIXME: Can this be integrated with coffread.c?  If not, should it be
+     a separate flavour like ecoff?  */
+  (enum bfd_flavour)-2,
+
   dst_new_init,                /* sym_new_init: init anything gbl to entire symtab */
   dst_symfile_init,    /* sym_init: read initial info, setup for sym_read() */
   dst_symfile_read,    /* sym_read: read a symbol file into symtab */
This page took 0.024305 seconds and 4 git commands to generate.