X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gdb%2Fsymmisc.c;h=bb4fdfd1ed92e54ceb21eaeda1a276f481e3eef7;hb=fafa92ec3ca92e06fdea8f0f6a0fb08f5f906f77;hp=23d232ca97dba91a0732d3ec11881b34e0c618d3;hpb=d5da8b3c0d99e71c27832a4e9b60c61eebf9767c;p=external%2Fbinutils.git diff --git a/gdb/symmisc.c b/gdb/symmisc.c index 23d232c..bb4fdfd 100644 --- a/gdb/symmisc.c +++ b/gdb/symmisc.c @@ -64,13 +64,14 @@ print_symbol_bcache_statistics (void) struct program_space *pspace; ALL_PSPACES (pspace) - for (objfile *objfile : all_objfiles (pspace)) + for (objfile *objfile : pspace->objfiles ()) { QUIT; printf_filtered (_("Byte cache statistics for '%s':\n"), objfile_name (objfile)); - print_bcache_statistics (psymbol_bcache_get_bcache (objfile->psymbol_cache), - "partial symbol cache"); + print_bcache_statistics + (psymbol_bcache_get_bcache (objfile->partial_symtabs->psymbol_cache), + "partial symbol cache"); print_bcache_statistics (objfile->per_bfd->macro_cache, "preprocessor macro cache"); print_bcache_statistics (objfile->per_bfd->filename_cache, @@ -85,7 +86,7 @@ print_objfile_statistics (void) int i, linetables, blockvectors; ALL_PSPACES (pspace) - for (objfile *objfile : all_objfiles (pspace)) + for (objfile *objfile : pspace->objfiles ()) { QUIT; printf_filtered (_("Statistics for '%s':\n"), objfile_name (objfile)); @@ -107,7 +108,7 @@ print_objfile_statistics (void) if (objfile->sf) objfile->sf->qf->print_stats (objfile); i = linetables = 0; - for (compunit_symtab *cu : objfile_compunits (objfile)) + for (compunit_symtab *cu : objfile->compunits ()) { for (symtab *s : compunit_filetabs (cu)) { @@ -116,8 +117,8 @@ print_objfile_statistics (void) linetables++; } } - blockvectors = std::distance (objfile_compunits (objfile).begin (), - objfile_compunits (objfile).end ()); + blockvectors = std::distance (objfile->compunits ().begin (), + objfile->compunits ().end ()); printf_filtered (_(" Number of symbol tables: %d\n"), i); printf_filtered (_(" Number of symbol tables with line tables: %d\n"), linetables); @@ -133,9 +134,10 @@ print_objfile_statistics (void) printf_filtered (_(" Total memory used for BFD obstack: %s\n"), pulongest (obstack_memory_used (&objfile->per_bfd ->storage_obstack))); - printf_filtered (_(" Total memory used for psymbol cache: %d\n"), - bcache_memory_used (psymbol_bcache_get_bcache - (objfile->psymbol_cache))); + printf_filtered + (_(" Total memory used for psymbol cache: %d\n"), + bcache_memory_used (psymbol_bcache_get_bcache + (objfile->partial_symtabs->psymbol_cache))); printf_filtered (_(" Total memory used for macro cache: %d\n"), bcache_memory_used (objfile->per_bfd->macro_cache)); printf_filtered (_(" Total memory used for file name cache: %d\n"), @@ -160,7 +162,7 @@ dump_objfile (struct objfile *objfile) if (objfile->compunit_symtabs != NULL) { printf_filtered ("Symtabs:\n"); - for (compunit_symtab *cu : objfile_compunits (objfile)) + for (compunit_symtab *cu : objfile->compunits ()) { for (symtab *symtab : compunit_filetabs (cu)) { @@ -195,7 +197,7 @@ dump_msymbols (struct objfile *objfile, struct ui_file *outfile) return; } index = 0; - for (minimal_symbol *msymbol : objfile_msymbols (objfile)) + for (minimal_symbol *msymbol : objfile->msymbols ()) { struct obj_section *section = MSYMBOL_OBJ_SECTION (objfile, msymbol); @@ -274,7 +276,7 @@ dump_symtab_1 (struct symtab *symtab, struct ui_file *outfile) struct objfile *objfile = SYMTAB_OBJFILE (symtab); struct gdbarch *gdbarch = get_objfile_arch (objfile); int i; - struct dict_iterator iter; + struct mdict_iterator miter; int len; struct linetable *l; const struct blockvector *bv; @@ -330,7 +332,7 @@ dump_symtab_1 (struct symtab *symtab, struct ui_file *outfile) even if we're using a hashtable, but nothing else but this message wants it. */ fprintf_filtered (outfile, ", %d syms/buckets in ", - dict_size (BLOCK_DICT (b))); + mdict_size (BLOCK_MULTIDICT (b))); fputs_filtered (paddress (gdbarch, BLOCK_START (b)), outfile); fprintf_filtered (outfile, ".."); fputs_filtered (paddress (gdbarch, BLOCK_END (b)), outfile); @@ -348,7 +350,7 @@ dump_symtab_1 (struct symtab *symtab, struct ui_file *outfile) /* Now print each symbol in this block (in no particular order, if we're using a hashtable). Note that we only want this block, not any blocks from included symtabs. */ - ALL_DICT_SYMBOLS (BLOCK_DICT (b), iter, sym) + ALL_DICT_SYMBOLS (BLOCK_MULTIDICT (b), miter, sym) { TRY { @@ -473,7 +475,7 @@ maintenance_print_symbols (const char *args, int from_tty) { int found = 0; - for (objfile *objfile : all_objfiles (current_program_space)) + for (objfile *objfile : current_program_space->objfiles ()) { int print_for_objfile = 1; @@ -484,7 +486,7 @@ maintenance_print_symbols (const char *args, int from_tty) if (!print_for_objfile) continue; - for (compunit_symtab *cu : objfile_compunits (objfile)) + for (compunit_symtab *cu : objfile->compunits ()) { for (symtab *s : compunit_filetabs (cu)) { @@ -734,7 +736,7 @@ maintenance_print_msymbols (const char *args, int from_tty) outfile = &arg_outfile; } - for (objfile *objfile : all_objfiles (current_program_space)) + for (objfile *objfile : current_program_space->objfiles ()) { QUIT; if (objfile_arg == NULL @@ -754,7 +756,7 @@ maintenance_print_objfiles (const char *regexp, int from_tty) re_comp (regexp); ALL_PSPACES (pspace) - for (objfile *objfile : all_objfiles (pspace)) + for (objfile *objfile : pspace->objfiles ()) { QUIT; if (! regexp @@ -776,13 +778,13 @@ maintenance_info_symtabs (const char *regexp, int from_tty) re_comp (regexp); ALL_PSPACES (pspace) - for (objfile *objfile : all_objfiles (pspace)) + for (objfile *objfile : pspace->objfiles ()) { /* We don't want to print anything for this objfile until we actually find a symtab whose name matches. */ int printed_objfile_start = 0; - for (compunit_symtab *cust : objfile_compunits (objfile)) + for (compunit_symtab *cust : objfile->compunits ()) { int printed_compunit_symtab_start = 0; @@ -861,13 +863,13 @@ maintenance_check_symtabs (const char *ignore, int from_tty) struct program_space *pspace; ALL_PSPACES (pspace) - for (objfile *objfile : all_objfiles (pspace)) + for (objfile *objfile : pspace->objfiles ()) { /* We don't want to print anything for this objfile until we actually find something worth printing. */ int printed_objfile_start = 0; - for (compunit_symtab *cust : objfile_compunits (objfile)) + for (compunit_symtab *cust : objfile->compunits ()) { int found_something = 0; struct symtab *symtab = compunit_primary_filetab (cust); @@ -927,7 +929,7 @@ maintenance_expand_symtabs (const char *args, int from_tty) re_comp (regexp); ALL_PSPACES (pspace) - for (objfile *objfile : all_objfiles (pspace)) + for (objfile *objfile : pspace->objfiles ()) { if (objfile->sf) { @@ -1028,9 +1030,9 @@ maintenance_info_line_tables (const char *regexp, int from_tty) re_comp (regexp); ALL_PSPACES (pspace) - for (objfile *objfile : all_objfiles (pspace)) + for (objfile *objfile : pspace->objfiles ()) { - for (compunit_symtab *cust : objfile_compunits (objfile)) + for (compunit_symtab *cust : objfile->compunits ()) { for (symtab *symtab : compunit_filetabs (cust)) {