diff options
author | Doug Evans <dje@google.com> | 2012-07-02 18:13:41 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2012-07-02 18:13:41 +0000 |
commit | 0940620755f9464f782ee92ff20dee0b761a22d7 (patch) | |
tree | d5edf926eb8605b74a7d4d3db2b33ee20eb1d616 /gdb | |
parent | 9fa0f14a97f5588268828ab028464be0307f1a77 (diff) | |
download | gdb-0940620755f9464f782ee92ff20dee0b761a22d7.zip gdb-0940620755f9464f782ee92ff20dee0b761a22d7.tar.gz gdb-0940620755f9464f782ee92ff20dee0b761a22d7.tar.bz2 |
* dwarf2read.c (create_debug_types_hash_table): Use "debug dwarf2-read"
instead of "debug dwarf2-die" in debugging printfs.
(create_debug_info_hash_table_reader): Ditto.
(create_debug_info_hash_table): Ditto.
(init_dwo_file): Ditto.
(init_cutu_and_read_dies): Add debugging printf.
(init_cutu_and_read_dies_no_follow): Ditto.
(process_psymtab_comp_unit_reader): Ditto.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 11 | ||||
-rw-r--r-- | gdb/dwarf2read.c | 41 |
2 files changed, 44 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 281099b..5462b99 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,14 @@ +2012-07-02 Doug Evans <dje@google.com> + + * dwarf2read.c (create_debug_types_hash_table): Use "debug dwarf2-read" + instead of "debug dwarf2-die" in debugging printfs. + (create_debug_info_hash_table_reader): Ditto. + (create_debug_info_hash_table): Ditto. + (init_dwo_file): Ditto. + (init_cutu_and_read_dies): Add debugging printf. + (init_cutu_and_read_dies_no_follow): Ditto. + (process_psymtab_comp_unit_reader): Ditto. + 2012-07-02 Stan Shebs <stan@codesourcery.com> Add target-side support for dynamic printf. diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index dc3f625..328c293 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -3667,6 +3667,11 @@ create_debug_types_hash_table (struct dwo_file *dwo_file, ? &dwo_file->sections.abbrev : &dwarf2_per_objfile->abbrev); + if (dwarf2_read_debug) + fprintf_unfiltered (gdb_stdlog, "Reading .debug_types%s for %s:\n", + dwo_file ? ".dwo" : "", + bfd_get_filename (abbrev_section->asection->owner)); + for (ix = 0; VEC_iterate (dwarf2_section_info_def, types, ix, section); ++ix) @@ -3692,10 +3697,6 @@ create_debug_types_hash_table (struct dwo_file *dwo_file, types_htab = allocate_signatured_type_table (objfile); } - if (dwarf2_die_debug) - fprintf_unfiltered (gdb_stdlog, "Reading signatured types for %s:\n", - bfd_get_filename (abfd)); - /* We don't use init_cutu_and_read_dies_simple, or some such, here because we don't need to read any dies: the signature is in the header. */ @@ -3789,7 +3790,7 @@ create_debug_types_hash_table (struct dwo_file *dwo_file, } *slot = dwo_file ? (void *) dwo_tu : (void *) sig_type; - if (dwarf2_die_debug) + if (dwarf2_read_debug) fprintf_unfiltered (gdb_stdlog, " offset 0x%x, signature 0x%s\n", offset.sect_off, phex (signature, sizeof (signature))); @@ -3908,6 +3909,11 @@ init_cutu_and_read_dies (struct dwarf2_per_cu_data *this_cu, before we can reread the DWO file. */ int rereading_dwo_cu = 0; + if (dwarf2_die_debug) + fprintf_unfiltered (gdb_stdlog, "Reading %s unit at offset 0x%x\n", + this_cu->is_debug_types ? "type" : "comp", + this_cu->offset.sect_off); + if (use_existing_cu) gdb_assert (keep); @@ -4229,6 +4235,11 @@ init_cutu_and_read_dies_no_follow (struct dwarf2_per_cu_data *this_cu, struct die_info *comp_unit_die; int has_children; + if (dwarf2_die_debug) + fprintf_unfiltered (gdb_stdlog, "Reading %s unit at offset 0x%x\n", + this_cu->is_debug_types ? "type" : "comp", + this_cu->offset.sect_off); + gdb_assert (this_cu->cu == NULL); /* This is cheap if the section is already read in. */ @@ -4422,6 +4433,20 @@ process_psymtab_comp_unit_reader (const struct die_reader_specs *reader, and build a psymtab for each of them. */ dwarf2_build_include_psymtabs (cu, comp_unit_die, pst); } + + if (dwarf2_read_debug) + { + struct gdbarch *gdbarch = get_objfile_arch (objfile); + + fprintf_unfiltered (gdb_stdlog, + "Psymtab for %s unit @0x%x: 0x%s - 0x%s" + ", %d global, %d static syms\n", + per_cu->is_debug_types ? "type" : "comp", + per_cu->offset.sect_off, + paddress (gdbarch, pst->textlow), + paddress (gdbarch, pst->texthigh), + pst->n_global_syms, pst->n_static_syms); + } } /* Subroutine of dwarf2_build_psymtabs_hard to simplify it. @@ -7137,7 +7162,7 @@ create_debug_info_hash_table_reader (const struct die_reader_specs *reader, else *slot = dwo_unit; - if (dwarf2_die_debug) + if (dwarf2_read_debug) fprintf_unfiltered (gdb_stdlog, " offset 0x%x, dwo_id 0x%s\n", offset.sect_off, phex (dwo_unit->signature, @@ -7166,7 +7191,7 @@ create_debug_info_hash_table (struct dwo_file *dwo_file) not present, in which case section->asection will be NULL. */ abfd = section->asection->owner; - if (dwarf2_die_debug) + if (dwarf2_read_debug) fprintf_unfiltered (gdb_stdlog, "Reading .debug_info.dwo for %s:\n", bfd_get_filename (abfd)); @@ -7287,7 +7312,7 @@ init_dwo_file (const char *dwo_name, const char *comp_dir) bfd *abfd; struct cleanup *cleanups; - if (dwarf2_die_debug) + if (dwarf2_read_debug) fprintf_unfiltered (gdb_stdlog, "Reading DWO file %s:\n", dwo_name); abfd = open_dwo_file (dwo_name, comp_dir); |