diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2022-04-07 08:00:16 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2022-07-29 20:54:48 -0400 |
commit | 2ab317fb8290ea96bdb446957d2e221634fd25c8 (patch) | |
tree | 04ece983bc78036d9120d35445026eda748de780 /gdb/symfile.c | |
parent | 017772c826f15704c5326ac35daf00f223daff5c (diff) | |
download | gdb-2ab317fb8290ea96bdb446957d2e221634fd25c8.zip gdb-2ab317fb8290ea96bdb446957d2e221634fd25c8.tar.gz gdb-2ab317fb8290ea96bdb446957d2e221634fd25c8.tar.bz2 |
gdb: introduce symtab_create_debug_printf
Introduce symtab_create_debug_printf and symtab_create_debug_printf_v,
to print the debug messages enabled by "set debug symtab-create".
Change-Id: I442500903f72d4635c2dd9eaef770111f317dc04
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r-- | gdb/symfile.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c index ec32442..27e9571 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -2794,13 +2794,13 @@ allocate_symtab (struct compunit_symtab *cust, const char *filename) if (last_objfile_name.empty () || last_objfile_name != this_objfile_name) { last_objfile_name = this_objfile_name; - gdb_printf (gdb_stdlog, - "Creating one or more symtabs for objfile %s ...\n", - this_objfile_name); + + symtab_create_debug_printf_v + ("creating one or more symtabs for objfile %s", this_objfile_name); } - gdb_printf (gdb_stdlog, - "Created symtab %s for module %s.\n", - host_address_to_string (symtab), filename); + + symtab_create_debug_printf_v ("created symtab %s for module %s", + host_address_to_string (symtab), filename); } /* Add it to CUST's list of symtabs. */ @@ -2833,13 +2833,9 @@ allocate_compunit_symtab (struct objfile *objfile, const char *name) cu->set_debugformat ("unknown"); - if (symtab_create_debug) - { - gdb_printf (gdb_stdlog, - "Created compunit symtab %s for %s.\n", - host_address_to_string (cu), - cu->name); - } + symtab_create_debug_printf_v ("created compunit symtab %s for %s", + host_address_to_string (cu), + cu->name); return cu; } |