diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ce8696dc95..043093e01a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2013-03-28 Doug Evans + * dwarf2read.c (dw2_get_file_names): Delete arg "objfile". + All callers updated. + (dw2_print_stats): Print #read CUs too. + (dump_die_shallow): Print signatured types better. + * dwarf2read.c (struct dwarf2_per_cu_data): Rename member info_or_types_section to section. All uses updated. (struct dwo_unit): Ditto. diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 75cc799e07..2062448acf 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -2937,8 +2937,7 @@ dw2_get_file_names_reader (const struct die_reader_specs *reader, table for THIS_CU. */ static struct quick_file_names * -dw2_get_file_names (struct objfile *objfile, - struct dwarf2_per_cu_data *this_cu) +dw2_get_file_names (struct dwarf2_per_cu_data *this_cu) { /* For TUs this should only be called on the parent group. */ if (this_cu->is_debug_types) @@ -3076,7 +3075,7 @@ dw2_map_symtabs_matching_filename (struct objfile *objfile, const char *name, if (per_cu->v.quick->symtab) continue; - file_data = dw2_get_file_names (objfile, per_cu); + file_data = dw2_get_file_names (per_cu); if (file_data == NULL) continue; @@ -3294,18 +3293,19 @@ dw2_lookup_symbol (struct objfile *objfile, int block_index, static void dw2_print_stats (struct objfile *objfile) { - int i, count; + int i, total, count; dw2_setup (objfile); + total = dwarf2_per_objfile->n_comp_units + dwarf2_per_objfile->n_type_units; count = 0; - for (i = 0; i < (dwarf2_per_objfile->n_comp_units - + dwarf2_per_objfile->n_type_units); ++i) + for (i = 0; i < total; ++i) { struct dwarf2_per_cu_data *per_cu = dw2_get_cu (i); if (!per_cu->v.quick->symtab) ++count; } + printf_filtered (_(" Number of read CUs: %d\n"), total - count); printf_filtered (_(" Number of unread CUs: %d\n"), count); } @@ -3386,7 +3386,7 @@ dw2_expand_symtabs_with_fullname (struct objfile *objfile, if (per_cu->v.quick->symtab) continue; - file_data = dw2_get_file_names (objfile, per_cu); + file_data = dw2_get_file_names (per_cu); if (file_data == NULL) continue; @@ -3539,7 +3539,7 @@ dw2_expand_symtabs_matching if (per_cu->v.quick->symtab) continue; - file_data = dw2_get_file_names (objfile, per_cu); + file_data = dw2_get_file_names (per_cu); if (file_data == NULL) continue; @@ -3743,7 +3743,7 @@ dw2_map_symbol_filenames (struct objfile *objfile, symbol_filename_ftype *fun, if (per_cu->v.quick->symtab) continue; - file_data = dw2_get_file_names (objfile, per_cu); + file_data = dw2_get_file_names (per_cu); if (file_data == NULL) continue; @@ -17256,10 +17256,16 @@ dump_die_shallow (struct ui_file *f, int indent, struct die_info *die) break; case DW_FORM_ref_sig8: if (DW_SIGNATURED_TYPE (&die->attrs[i]) != NULL) - fprintf_unfiltered (f, "signatured type, offset: 0x%x", - DW_SIGNATURED_TYPE (&die->attrs[i])->per_cu.offset.sect_off); + { + struct signatured_type *sig_type = + DW_SIGNATURED_TYPE (&die->attrs[i]); + + fprintf_unfiltered (f, "signatured type: 0x%s, offset 0x%x", + hex_string (sig_type->signature), + sig_type->per_cu.offset.sect_off); + } else - fprintf_unfiltered (f, "signatured type, offset: unknown"); + fprintf_unfiltered (f, "signatured type, unknown"); break; case DW_FORM_string: case DW_FORM_strp: diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 33c7bf4ae2..f153116c3b 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2013-03-28 Doug Evans + + * gdb.base/maint.exp (maint print statistics): Update expected output. + 2013-03-28 Pedro Alves PR gdb/15294 diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp index a867c50f93..714d2bac30 100644 --- a/gdb/testsuite/gdb.base/maint.exp +++ b/gdb/testsuite/gdb.base/maint.exp @@ -146,7 +146,7 @@ if [istarget "*-*-cygwin*"] { send_gdb "maint print statistics\n" gdb_expect { - -re "Statistics for\[^\n\r\]*break\[^\n\r\]*:\r\n Number of \"minimal\" symbols read: $decimal\r\n( Number of \"partial\" symbols read: $decimal\r\n)? Number of \"full\" symbols read: $decimal\r\n Number of \"types\" defined: $decimal\r\n( Number of psym tables \\(not yet expanded\\): $decimal\r\n)?( Number of unread CUs: $decimal\r\n)? Number of symbol tables: $decimal\r\n Number of symbol tables with line tables: $decimal\r\n Number of symbol tables with blockvectors: $decimal\r\n Total memory used for objfile obstack: $decimal\r\n Total memory used for BFD obstack: $decimal\r\n Total memory used for psymbol cache: $decimal\r\n Total memory used for macro cache: $decimal\r\n Total memory used for file name cache: $decimal\r\n" { + -re "Statistics for\[^\n\r\]*break\[^\n\r\]*:\r\n Number of \"minimal\" symbols read: $decimal\r\n( Number of \"partial\" symbols read: $decimal\r\n)? Number of \"full\" symbols read: $decimal\r\n Number of \"types\" defined: $decimal\r\n( Number of psym tables \\(not yet expanded\\): $decimal\r\n)?( Number of read CUs: $decimal\r\n Number of unread CUs: $decimal\r\n)? Number of symbol tables: $decimal\r\n Number of symbol tables with line tables: $decimal\r\n Number of symbol tables with blockvectors: $decimal\r\n Total memory used for objfile obstack: $decimal\r\n Total memory used for BFD obstack: $decimal\r\n Total memory used for psymbol cache: $decimal\r\n Total memory used for macro cache: $decimal\r\n Total memory used for file name cache: $decimal\r\n" { gdb_expect { -re "$gdb_prompt $" { pass "maint print statistics"