aboutsummaryrefslogtreecommitdiff
path: root/gdb/elfread.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2022-04-07 08:00:16 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2022-07-29 20:54:48 -0400
commit2ab317fb8290ea96bdb446957d2e221634fd25c8 (patch)
tree04ece983bc78036d9120d35445026eda748de780 /gdb/elfread.c
parent017772c826f15704c5326ac35daf00f223daff5c (diff)
downloadgdb-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/elfread.c')
-rw-r--r--gdb/elfread.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/gdb/elfread.c b/gdb/elfread.c
index deed34c..e0de52c 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -1046,12 +1046,8 @@ elf_read_minimal_symbols (struct objfile *objfile, int symfile_flags,
asymbol **symbol_table = NULL, **dyn_symbol_table = NULL;
asymbol *synthsyms;
- if (symtab_create_debug)
- {
- gdb_printf (gdb_stdlog,
- "Reading minimal symbols of objfile %s ...\n",
- objfile_name (objfile));
- }
+ symtab_create_debug_printf ("reading minimal symbols of objfile %s",
+ objfile_name (objfile));
/* If we already have minsyms, then we can skip some work here.
However, if there were stabs or mdebug sections, we go ahead and
@@ -1063,9 +1059,7 @@ elf_read_minimal_symbols (struct objfile *objfile, int symfile_flags,
&& ei->mdebugsect == NULL
&& ei->ctfsect == NULL)
{
- if (symtab_create_debug)
- gdb_printf (gdb_stdlog,
- "... minimal symbols previously read\n");
+ symtab_create_debug_printf ("minimal symbols were previously read");
return;
}
@@ -1169,8 +1163,7 @@ elf_read_minimal_symbols (struct objfile *objfile, int symfile_flags,
reader.install ();
- if (symtab_create_debug)
- gdb_printf (gdb_stdlog, "Done reading minimal symbols.\n");
+ symtab_create_debug_printf ("done reading minimal symbols");
}
/* Scan and build partial symbols for a symbol file.