* stabsread.c (get_substring): Declare second arg as int.
[deliverable/binutils-gdb.git] / gdb / dstread.c
index ad8806ba04f66bcb2a81c9e5212a02610b6210de..c5a79b8cb3759a94c3fd264803ea159c613fc45a 100644 (file)
@@ -16,7 +16,7 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 \f
 #include "defs.h"
 #include "symtab.h"
@@ -26,9 +26,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "symfile.h"
 #include "objfiles.h"
 #include "buildsym.h"
-#include <obstack.h>
+#include "obstack.h"
 
-#include <string.h>
+#include "gdb_string.h"
 
 #include "dst.h"
 
@@ -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 *));
 
@@ -77,10 +75,6 @@ dst_symfile_read PARAMS ((struct objfile *, struct section_offsets *, int));
 static void
 dst_symfile_finish PARAMS ((struct objfile *));
 
-static void
-record_minimal_symbol PARAMS ((char *, CORE_ADDR, enum minimal_symbol_type,
-                              struct objfile *));
-
 static void
 dst_end_symtab PARAMS ((struct objfile *));
 
@@ -236,19 +230,6 @@ dst_end_symtab (objfile)
   last_source_file = NULL;
 }
 \f
-static void
-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,
-                             objfile);
-}
-\f
 /* dst_symfile_init ()
    is the dst-specific initialization routine for reading symbols.
 
@@ -814,8 +795,8 @@ create_new_symbol(objfile, name)
        struct symbol *sym = (struct symbol *)
               obstack_alloc (&objfile->symbol_obstack, sizeof (struct symbol));
        memset (sym, 0, sizeof (struct symbol));
-       SYMBOL_NAME (sym) = obstack_copy0 (&objfile->symbol_obstack,
-                                               name, strlen (name));
+       SYMBOL_NAME (sym) = obsavestring (name, strlen (name),
+                                         &objfile->symbol_obstack);
        SYMBOL_VALUE (sym) = 0;
        SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
 
@@ -1478,7 +1459,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, objfile);
+               prim_record_minimal_symbol(name, address, mst_text, objfile);
                function = process_dst_function(
                        objfile,
                        symbol_entry,
@@ -1639,7 +1620,7 @@ read_dst_symtab (objfile)
                }
        }
        if (module_num)
-               record_minimal_symbol("<end_of_program>",
+               prim_record_minimal_symbol("<end_of_program>",
                                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
@@ -1649,7 +1630,7 @@ read_dst_symtab (objfile)
         * but no functions are ever mapped to an address higher than
         * 40000000
         */
-       record_minimal_symbol("<end_of_text>",
+       prim_record_minimal_symbol("<end_of_text>",
                                (CORE_ADDR) 0x40000000,
                                mst_text, objfile);
        while (struct_list)
This page took 0.024428 seconds and 4 git commands to generate.