2010-05-24 Michael Snyder <msnyder@vmware.com>
[binutils-gdb.git] / gdb / psymtab.c
index 35f410ba24169503cea4b494e6e280c26ca56f51..dc630402520e6eb3dde208822e928692fb525a25 100644 (file)
@@ -236,6 +236,7 @@ find_pc_sect_psymtab (struct objfile *objfile, CORE_ADDR pc,
          if (overlay_debugging && msymbol && section)
            {
              struct partial_symbol *p;
+
              /* NOTE: This assumes that every psymbol has a
                 corresponding msymbol, which is not necessarily
                 true; the debug info might be much richer than the
@@ -427,7 +428,6 @@ struct partial_symbol *
 lookup_partial_symbol (struct partial_symtab *pst, const char *name,
                       int global, domain_enum domain)
 {
-  struct partial_symbol *temp;
   struct partial_symbol **start, **psym;
   struct partial_symbol **top, **real_top, **bottom, **center;
   int length = (global ? pst->n_global_syms : pst->n_static_syms);
@@ -519,6 +519,7 @@ psymtab_to_symtab (struct partial_symtab *pst)
   if (!pst->readin)
     {
       struct cleanup *back_to = increment_reading_symtab ();
+
       (*pst->read_symtab) (pst);
       do_cleanups (back_to);
     }
@@ -563,7 +564,6 @@ relocate_psymtabs (struct objfile *objfile,
 static struct symtab *
 find_last_source_symtab_from_partial (struct objfile *ofp)
 {
-  struct symtab *result;
   struct partial_symtab *ps;
   struct partial_symtab *cs_pst = 0;
 
@@ -571,6 +571,7 @@ find_last_source_symtab_from_partial (struct objfile *ofp)
     {
       const char *name = ps->filename;
       int len = strlen (name);
+
       if (!(len > 2 && (strcmp (&name[len - 2], ".h") == 0
                        || strcmp (name, "<<C++-namespaces>>") == 0)))
        cs_pst = ps;
@@ -770,6 +771,7 @@ print_psymtab_stats_for_objfile (struct objfile *objfile)
 {
   int i;
   struct partial_symtab *ps;
+
   i = 0;
   ALL_OBJFILE_PSYMTABS (objfile, ps)
     {
@@ -856,6 +858,7 @@ map_symbol_names_psymtab (struct objfile *objfile,
                          void (*fun) (const char *, void *), void *data)
 {
   struct partial_symtab *ps;
+
   ALL_OBJFILE_PSYMTABS (objfile, ps)
     {
       struct partial_symbol **psym;
@@ -993,12 +996,14 @@ ada_lookup_partial_symbol (struct partial_symtab *pst, const char *name,
       if (global)
         {
           int U;
+
           i = 0;
           U = length - 1;
           while (U - i > 4)
             {
               int M = (U + i) >> 1;
               struct partial_symbol *psym = start[M];
+
               if (SYMBOL_LINKAGE_NAME (psym)[0] < name[0])
                 i = M + 1;
               else if (SYMBOL_LINKAGE_NAME (psym)[0] > name[0])
@@ -1037,12 +1042,14 @@ ada_lookup_partial_symbol (struct partial_symtab *pst, const char *name,
       if (global)
         {
           int U;
+
           i = 0;
           U = length - 1;
           while (U - i > 4)
             {
               int M = (U + i) >> 1;
               struct partial_symbol *psym = start[M];
+
               if (SYMBOL_LINKAGE_NAME (psym)[0] < '_')
                 i = M + 1;
               else if (SYMBOL_LINKAGE_NAME (psym)[0] > '_')
@@ -1108,6 +1115,7 @@ map_ada_symtabs (struct objfile *objfile,
                                        wild_match, is_name_suffix))
        {
          struct symtab *s = PSYMTAB_TO_SYMTAB (ps);
+
          if (s == NULL || !s->primary)
            continue;
          (*callback) (objfile, s, data);
@@ -1420,17 +1428,6 @@ allocate_psymtab (const char *filename, struct objfile *objfile)
   psymtab->objfile = objfile;
   psymtab->next = objfile->psymtabs;
   objfile->psymtabs = psymtab;
-#if 0
-  {
-    struct partial_symtab **prev_pst;
-    psymtab->objfile = objfile;
-    psymtab->next = NULL;
-    prev_pst = &(objfile->psymtabs);
-    while ((*prev_pst) != NULL)
-      prev_pst = &((*prev_pst)->next);
-    (*prev_pst) = psymtab;
-  }
-#endif
 
   return (psymtab);
 }
@@ -1469,6 +1466,7 @@ extend_psymbol_list (struct psymbol_allocation_list *listp,
                     struct objfile *objfile)
 {
   int new_size;
+
   if (listp->size == 0)
     {
       new_size = 255;
@@ -1654,6 +1652,7 @@ maintenance_check_symtabs (char *ignore, int from_tty)
   ALL_PSYMTABS (objfile, ps)
   {
     struct gdbarch *gdbarch = get_objfile_arch (objfile);
+
     s = PSYMTAB_TO_SYMTAB (ps);
     if (s == NULL)
       continue;