Removed superflous code.
[deliverable/binutils-gdb.git] / gdb / os9kread.c
index 8614678e1799d1a11f0367550cc08693924a0e5d..673d415c6e25e6be1ab66b3ac9956475d69a2b01 100644 (file)
@@ -1,5 +1,5 @@
 /* Read os9/os9k symbol tables and convert to internal format, for GDB.
-   Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996
+   Copyright 1986, 87, 88, 89, 90, 91, 92, 93, 94, 96, 1998
    Free Software Foundation, Inc.
 
 This file is part of GDB.
@@ -332,10 +332,10 @@ os9k_symfile_read (objfile, section_offsets, mainline)
     objfile->static_psymbols.size == 0)
     init_psymbol_list (objfile, DBX_SYMCOUNT (objfile));
 
-  pending_blocks = 0;
-  back_to = make_cleanup (really_free_pendings, 0);
+  free_pending_blocks ();
+  back_to = make_cleanup ((make_cleanup_func) really_free_pendings, 0);
 
-  make_cleanup (discard_minimal_symbols, 0);
+  make_cleanup ((make_cleanup_func) discard_minimal_symbols, 0);
   read_minimal_symbols (objfile, section_offsets);
 
   /* Now that the symbol table data of the executable file are all in core,
@@ -400,7 +400,7 @@ os9k_symfile_init (objfile)
   objfile->auxf1 = minfile;
 
   /* Allocate struct to keep track of the symfile */
-  objfile->sym_stab_info = (PTR)
+  objfile->sym_stab_info = (struct dbx_symfile_info *)
     xmmalloc (objfile -> md, sizeof (struct dbx_symfile_info));
   DBX_SYMFILE_INFO (objfile)->stab_section_info = NULL;
 
@@ -1003,7 +1003,7 @@ os9k_end_psymtab (pst, include_list, num_includes, capping_symbol_cnt,
      CORE_ADDR capping_text;
      struct partial_symtab **dependency_list;
      int number_dependencies;
-/*     struct partial_symbol *capping_global, *capping_static;*/
+     /* struct partial_symbol *capping_global, *capping_static; */
 {
   int i;
   struct partial_symtab *p1;
@@ -1160,22 +1160,10 @@ os9k_end_psymtab (pst, include_list, num_includes, capping_symbol_cnt,
    && pst->n_static_syms == 0) {
     /* Throw away this psymtab, it's empty.  We can't deallocate it, since
        it is on the obstack, but we can forget to chain it on the list.  */
-    struct partial_symtab *prev_pst;
-
-    /* First, snip it out of the psymtab chain */
-
-    if (pst->objfile->psymtabs == pst)
-      pst->objfile->psymtabs = pst->next;
-    else
-      for (prev_pst = pst->objfile->psymtabs; prev_pst; prev_pst = pst->next)
-       if (prev_pst->next == pst)
-         prev_pst->next = pst->next;
+    /* Indicate that psymtab was thrown away.  */
 
-    /* Next, put it on a free list for recycling */
-    pst->next = pst->objfile->free_psymtabs;
-    pst->objfile->free_psymtabs = pst;
+    discard_psymtab (pst);
 
-    /* Indicate that psymtab was thrown away.  */
     pst = (struct partial_symtab *)NULL;
   }
   return pst;
@@ -1221,7 +1209,7 @@ os9k_psymtab_to_symtab_1 (pst)
       /* Init stuff necessary for reading in symbols */
       stabsread_init ();
       buildsym_init ();
-      old_chain = make_cleanup (really_free_pendings, 0);
+      old_chain = make_cleanup ((make_cleanup_func) really_free_pendings, 0);
 
       /* Read in this file's symbols */
       os9k_read_ofile_symtab (pst);
@@ -1444,9 +1432,9 @@ os9k_process_one_symbol (type, desc, valu, name, section_offsets, objfile)
      seeing a source file name.  */
   if (last_source_file == NULL && type != (unsigned char)N_SO)
     {
-      /* Ignore any symbols which appear before an N_SO symbol.  Currently
-        no one puts symbols there, but we should deal gracefully with the
-        case.  A complain()t might be in order (if !IGNORE_SYMBOL (type)),
+      /* Ignore any symbols which appear before an N_SO symbol.
+        Currently no one puts symbols there, but we should deal
+        gracefully with the case.  A complain()t might be in order,
         but this should not be an error ().  */
       return;
     }
@@ -1570,6 +1558,7 @@ os9k_process_one_symbol (type, desc, valu, name, section_offsets, objfile)
                start_stabs ();
                os9k_stabs = 1;
                start_symtab (n, dirn, valu);
+               record_debugformat ("OS9");
              } else {
                push_subfile();
                start_subfile (n, dirn!=NULL ? dirn : current_subfile->dirname);
This page took 0.025425 seconds and 4 git commands to generate.