diff options
author | Doug Evans <dje@google.com> | 2013-03-29 00:11:10 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2013-03-29 00:11:10 +0000 |
commit | e4a48d9d49e3d63b7d2f5d58bdb04e8ad3a4f2db (patch) | |
tree | 820cf3be330ab80b9c0d6a3044a5897d0b9cd7ad /gdb | |
parent | 0a5a66e6ac4da11b494fc0e30dd82c2da1de6ba7 (diff) | |
download | gdb-e4a48d9d49e3d63b7d2f5d58bdb04e8ad3a4f2db.zip gdb-e4a48d9d49e3d63b7d2f5d58bdb04e8ad3a4f2db.tar.gz gdb-e4a48d9d49e3d63b7d2f5d58bdb04e8ad3a4f2db.tar.bz2 |
* 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.
testsuite/
* gdb.base/maint.exp (maint print statistics): Update expected output.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/dwarf2read.c | 30 | ||||
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/maint.exp | 2 |
4 files changed, 28 insertions, 13 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ce8696d..043093e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2013-03-28 Doug Evans <dje@google.com> + * 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 75cc799..2062448 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 33c7bf4..f153116 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2013-03-28 Doug Evans <dje@google.com> + + * gdb.base/maint.exp (maint print statistics): Update expected output. + 2013-03-28 Pedro Alves <palves@redhat.com> PR gdb/15294 diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp index a867c50..714d2ba 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" |