diff options
author | Doug Evans <dje@google.com> | 2012-06-26 20:14:03 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2012-06-26 20:14:03 +0000 |
commit | 45cfd468960ba37fc9cf11fffc680fc7ac5d8ee8 (patch) | |
tree | 2c7da6994eecab930483601ce9fbb64d9415e5fb /gdb/symfile.c | |
parent | 1c658ad5fac2a221b589cbe26ec84c788b24a8d1 (diff) | |
download | gdb-45cfd468960ba37fc9cf11fffc680fc7ac5d8ee8.zip gdb-45cfd468960ba37fc9cf11fffc680fc7ac5d8ee8.tar.gz gdb-45cfd468960ba37fc9cf11fffc680fc7ac5d8ee8.tar.bz2 |
* NEWS: Mention new options "set debug dwarf2-read" and
"set debug symtab-create".
* dwarf2read.c (dwarf2_read_debug): New static global.
(dwarf2_build_psymtabs_hard): Add debugging printfs.
(process_queue): Ditto.
(process_full_comp_unit): Ditto.
(_initialize_dwarf2_read): Add new option "set debug dwarf2-read".
* elfread.c (elf_symfile_read): Add debugging printf.
* minsyms.c (install_minimal_symbols): Ditto.
* psymtab.c (allocate_psymtab): Ditto.
* symfile.c (allocate_symtab): Ditto.
* symtab.c (symtab_create_debug): New global.
(_initialize_symtab): Add new option "set debug symtab-create".
* symtab.h (symtab_create_debug): Declare.
doc/
* gdb.texinfo (Debugging Output): Document debug options dwarf2-read
and symtab-create.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r-- | gdb/symfile.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c index 37d98d9..01252e2 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -2873,6 +2873,26 @@ allocate_symtab (const char *filename, struct objfile *objfile) symtab->next = objfile->symtabs; objfile->symtabs = symtab; + if (symtab_create_debug) + { + /* Be a bit clever with debugging messages, and don't print objfile + every time, only when it changes. */ + static char *last_objfile_name = NULL; + + if (last_objfile_name == NULL + || strcmp (last_objfile_name, objfile->name) != 0) + { + xfree (last_objfile_name); + last_objfile_name = xstrdup (objfile->name); + fprintf_unfiltered (gdb_stdlog, + "Creating one or more symtabs for objfile %s ...\n", + last_objfile_name); + } + fprintf_unfiltered (gdb_stdlog, + "Created symtab 0x%lx for module %s.\n", + (long) symtab, filename); + } + return (symtab); } |