From e38df1d074456c912b31d672bde73afcea5b5c92 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 10 Mar 2010 18:27:00 +0000 Subject: [PATCH] * xcoffread.c (xcoff_start_psymtab): Update. (xcoff_end_psymtab): Update. * psymtab.c (allocate_psymtab): Remove dead code. * psympriv.h (struct partial_symtab) : 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 | 14 ++++++++++++++ gdb/dbxread.c | 7 +++---- gdb/dwarf2read.c | 4 ++-- gdb/mdebugread.c | 10 ++++------ gdb/psympriv.h | 5 ++--- gdb/psymtab.c | 11 ----------- gdb/xcoffread.c | 9 ++++----- 7 files changed, 29 insertions(+), 31 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f721f95271..f898c82958 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,19 @@ 2010-03-10 Tom Tromey + * xcoffread.c (xcoff_start_psymtab): Update. + (xcoff_end_psymtab): Update. + * psymtab.c (allocate_psymtab): Remove dead code. + * psympriv.h (struct partial_symtab) : 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 + * xcoffread.c: Include psymtab.h. (xcoff_sym_fns): Update. * symtab.h (struct partial_symbol): Remove. diff --git a/gdb/dbxread.c b/gdb/dbxread.c index 3a45625afa..447e64e538 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -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 = diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 975ce75aab..11f1a91da1 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -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) { diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c index 7452d9d88c..fbc7766967 100644 --- a/gdb/mdebugread.c +++ b/gdb/mdebugread.c @@ -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; diff --git a/gdb/psympriv.h b/gdb/psympriv.h index 42fa4270c1..52f6e03c69 100644 --- a/gdb/psympriv.h +++ b/gdb/psympriv.h @@ -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 */ diff --git a/gdb/psymtab.c b/gdb/psymtab.c index 35f410ba24..4def4a7de5 100644 --- a/gdb/psymtab.c +++ b/gdb/psymtab.c @@ -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); } diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c index 11a8853105..2720f6db2c 100644 --- a/gdb/xcoffread.c +++ b/gdb/xcoffread.c @@ -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; -- 2.34.1