* xcoffread.c (xcoff_start_psymtab): Update.
authorTom Tromey <tromey@redhat.com>
Wed, 10 Mar 2010 18:27:00 +0000 (18:27 +0000)
committerTom Tromey <tromey@redhat.com>
Wed, 10 Mar 2010 18:27:00 +0000 (18:27 +0000)
(xcoff_end_psymtab): Update.
* psymtab.c (allocate_psymtab): Remove dead code.
* psympriv.h (struct partial_symtab) <read_symtab_private>: Now
void*.
* mdebugread.c (parse_partial_symbols): Update.
(new_psymtab): Likewise.
* dwarf2read.c (process_psymtab_comp_unit): Update.
(psymtab_to_symtab_1): Update.
* dbxread.c (start_psymtab): Update.
(end_psymtab): Likewise.

gdb/ChangeLog
gdb/dbxread.c
gdb/dwarf2read.c
gdb/mdebugread.c
gdb/psympriv.h
gdb/psymtab.c
gdb/xcoffread.c

index f721f9527145751a2178997315bec1aef8f3d17c..f898c82958075e3c674b91e80f8fa470a0d579e9 100644 (file)
@@ -1,5 +1,19 @@
 2010-03-10  Tom Tromey  <tromey@redhat.com>
 
+       * xcoffread.c (xcoff_start_psymtab): Update.
+       (xcoff_end_psymtab): Update.
+       * psymtab.c (allocate_psymtab): Remove dead code.
+       * psympriv.h (struct partial_symtab) <read_symtab_private>: Now
+       void*.
+       * mdebugread.c (parse_partial_symbols): Update.
+       (new_psymtab): Likewise.
+       * dwarf2read.c (process_psymtab_comp_unit): Update.
+       (psymtab_to_symtab_1): Update.
+       * dbxread.c (start_psymtab): Update.
+       (end_psymtab): Likewise.
+
+2010-30-10  Tom Tromey  <tromey@redhat.com>
+
        * xcoffread.c: Include psymtab.h.
        (xcoff_sym_fns): Update.
        * symtab.h (struct partial_symbol): Remove.
index 3a45625afa7e458db56c157119677af84867f8be..447e64e538cd9a28f4234d10f37795d79879afe7 100644 (file)
@@ -2189,8 +2189,8 @@ start_psymtab (struct objfile *objfile, char *filename, CORE_ADDR textlow,
   start_psymtab_common (objfile, objfile->section_offsets,
                        filename, textlow, global_syms, static_syms);
 
-  result->read_symtab_private = (char *)
-    obstack_alloc (&objfile->objfile_obstack, sizeof (struct symloc));
+  result->read_symtab_private = obstack_alloc (&objfile->objfile_obstack,
+                                              sizeof (struct symloc));
   LDSYMOFF (result) = ldsymoff;
   result->read_symtab = dbx_psymtab_to_symtab;
   SYMBOL_SIZE (result) = symbol_size;
@@ -2334,8 +2334,7 @@ end_psymtab (struct partial_symtab *pst, char **include_list, int num_includes,
       /* Copy the sesction_offsets array from the main psymtab. */
       subpst->section_offsets = pst->section_offsets;
       subpst->read_symtab_private =
-       (char *) obstack_alloc (&objfile->objfile_obstack,
-                               sizeof (struct symloc));
+       obstack_alloc (&objfile->objfile_obstack, sizeof (struct symloc));
       LDSYMOFF (subpst) =
        LDSYMLEN (subpst) =
        subpst->textlow =
index 975ce75aab5588ad419dffefc34127787b394f9d..11f1a91da17faa82a8de90f0ff9adedcde9bfedf 100644 (file)
@@ -1951,7 +1951,7 @@ process_psymtab_comp_unit (struct objfile *objfile,
   if (attr != NULL)
     pst->dirname = DW_STRING (attr);
 
-  pst->read_symtab_private = (char *) this_cu;
+  pst->read_symtab_private = this_cu;
 
   baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
 
@@ -3055,7 +3055,7 @@ psymtab_to_symtab_1 (struct partial_symtab *pst)
         psymtab_to_symtab_1 (pst->dependencies[i]);
       }
 
-  per_cu = (struct dwarf2_per_cu_data *) pst->read_symtab_private;
+  per_cu = pst->read_symtab_private;
 
   if (per_cu == NULL)
     {
index 7452d9d88c979a51772058a58ea32332b30e2f43..fbc776696781180be14f699d793f56a72c107057 100644 (file)
@@ -2660,9 +2660,8 @@ parse_partial_symbols (struct objfile *objfile)
                                  textlow,
                                  objfile->global_psymbols.next,
                                  objfile->static_psymbols.next);
-      pst->read_symtab_private = ((char *)
-                                 obstack_alloc (&objfile->objfile_obstack,
-                                                sizeof (struct symloc)));
+      pst->read_symtab_private = obstack_alloc (&objfile->objfile_obstack,
+                                               sizeof (struct symloc));
       memset (pst->read_symtab_private, 0, sizeof (struct symloc));
 
       save_pst = pst;
@@ -4694,9 +4693,8 @@ new_psymtab (char *name, struct objfile *objfile)
 
   /* Keep a backpointer to the file's symbols */
 
-  psymtab->read_symtab_private = ((char *)
-                                 obstack_alloc (&objfile->objfile_obstack,
-                                                sizeof (struct symloc)));
+  psymtab->read_symtab_private = obstack_alloc (&objfile->objfile_obstack,
+                                               sizeof (struct symloc));
   memset (psymtab->read_symtab_private, 0, sizeof (struct symloc));
   CUR_BFD (psymtab) = cur_bfd;
   DEBUG_SWAP (psymtab) = debug_swap;
index 42fa4270c15a9f0fbb776212ee2c0f7cfc21e80d..52f6e03c69a8004061925e27ab40322bbe3415df 100644 (file)
@@ -140,10 +140,9 @@ struct partial_symtab
   /* Information that lets read_symtab() locate the part of the symbol table
      that this psymtab corresponds to.  This information is private to the
      format-dependent symbol reading routines.  For further detail examine
-     the various symbol reading modules.  Should really be (void *) but is
-     (char *) as with other such gdb variables.  (FIXME) */
+     the various symbol reading modules.  */
 
-  char *read_symtab_private;
+  void *read_symtab_private;
 
   /* Non-zero if the symtab corresponding to this psymtab has been readin */
 
index 35f410ba24169503cea4b494e6e280c26ca56f51..4def4a7de5ad790d355446b4a9b1f6bcd79b5d23 100644 (file)
@@ -1420,17 +1420,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);
 }
index 11a885310520174eeb2cc85dc420d9971f057076..2720f6db2cd4f214cec93de6c882a709b9e7c1bd 100644 (file)
@@ -1959,8 +1959,8 @@ xcoff_start_psymtab (struct objfile *objfile, char *filename, int first_symnum,
                        0,
                        global_syms, static_syms);
 
-  result->read_symtab_private = (char *)
-    obstack_alloc (&objfile->objfile_obstack, sizeof (struct symloc));
+  result->read_symtab_private = obstack_alloc (&objfile->objfile_obstack,
+                                              sizeof (struct symloc));
   ((struct symloc *) result->read_symtab_private)->first_symnum = first_symnum;
   result->read_symtab = xcoff_psymtab_to_symtab;
 
@@ -2021,9 +2021,8 @@ xcoff_end_psymtab (struct partial_symtab *pst, char **include_list,
       allocate_psymtab (include_list[i], objfile);
 
       subpst->section_offsets = pst->section_offsets;
-      subpst->read_symtab_private =
-       (char *) obstack_alloc (&objfile->objfile_obstack,
-                               sizeof (struct symloc));
+      subpst->read_symtab_private = obstack_alloc (&objfile->objfile_obstack,
+                                                  sizeof (struct symloc));
       ((struct symloc *) subpst->read_symtab_private)->first_symnum = 0;
       ((struct symloc *) subpst->read_symtab_private)->numsyms = 0;
       subpst->textlow = 0;