aboutsummaryrefslogtreecommitdiff
path: root/gdb/compile/compile-c-symbols.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2022-01-02 11:46:15 -0700
committerTom Tromey <tom@tromey.com>2022-03-29 12:46:24 -0600
commit6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a (patch)
tree641a6a86240919fe4ba9219fbbbe15bc6331c22d /gdb/compile/compile-c-symbols.c
parenta11ac3b3e8ff6769badcf0041894f6c5acc1b94f (diff)
downloadbinutils-6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a.zip
binutils-6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a.tar.gz
binutils-6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a.tar.bz2
Unify gdb printf functions
Now that filtered and unfiltered output can be treated identically, we can unify the printf family of functions. This is done under the name "gdb_printf". Most of this patch was written by script.
Diffstat (limited to 'gdb/compile/compile-c-symbols.c')
-rw-r--r--gdb/compile/compile-c-symbols.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/gdb/compile/compile-c-symbols.c b/gdb/compile/compile-c-symbols.c
index bb15602..d422c46 100644
--- a/gdb/compile/compile-c-symbols.c
+++ b/gdb/compile/compile-c-symbols.c
@@ -241,17 +241,17 @@ convert_symbol_sym (compile_c_instance *context, const char *identifier,
&& global_sym.block != block_static_block (global_sym.block))
{
if (compile_debug)
- fprintf_unfiltered (gdb_stdlog,
- "gcc_convert_symbol \"%s\": global symbol\n",
- identifier);
+ gdb_printf (gdb_stdlog,
+ "gcc_convert_symbol \"%s\": global symbol\n",
+ identifier);
convert_one_symbol (context, global_sym, 1, 0);
}
}
if (compile_debug)
- fprintf_unfiltered (gdb_stdlog,
- "gcc_convert_symbol \"%s\": local symbol\n",
- identifier);
+ gdb_printf (gdb_stdlog,
+ "gcc_convert_symbol \"%s\": local symbol\n",
+ identifier);
convert_one_symbol (context, sym, 0, is_local_symbol);
}
@@ -373,9 +373,9 @@ gcc_convert_symbol (void *datum,
}
if (compile_debug && !found)
- fprintf_unfiltered (gdb_stdlog,
- "gcc_convert_symbol \"%s\": lookup_symbol failed\n",
- identifier);
+ gdb_printf (gdb_stdlog,
+ "gcc_convert_symbol \"%s\": lookup_symbol failed\n",
+ identifier);
return;
}
@@ -401,9 +401,9 @@ gcc_symbol_address (void *datum, struct gcc_c_context *gcc_context,
if (sym != NULL && sym->aclass () == LOC_BLOCK)
{
if (compile_debug)
- fprintf_unfiltered (gdb_stdlog,
- "gcc_symbol_address \"%s\": full symbol\n",
- identifier);
+ gdb_printf (gdb_stdlog,
+ "gcc_symbol_address \"%s\": full symbol\n",
+ identifier);
result = BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (sym));
if (sym->type ()->is_gnu_ifunc ())
result = gnu_ifunc_resolve_addr (target_gdbarch (), result);
@@ -417,10 +417,10 @@ gcc_symbol_address (void *datum, struct gcc_c_context *gcc_context,
if (msym.minsym != NULL)
{
if (compile_debug)
- fprintf_unfiltered (gdb_stdlog,
- "gcc_symbol_address \"%s\": minimal "
- "symbol\n",
- identifier);
+ gdb_printf (gdb_stdlog,
+ "gcc_symbol_address \"%s\": minimal "
+ "symbol\n",
+ identifier);
result = BMSYMBOL_VALUE_ADDRESS (msym);
if (MSYMBOL_TYPE (msym.minsym) == mst_text_gnu_ifunc)
result = gnu_ifunc_resolve_addr (target_gdbarch (), result);
@@ -435,9 +435,9 @@ gcc_symbol_address (void *datum, struct gcc_c_context *gcc_context,
}
if (compile_debug && !found)
- fprintf_unfiltered (gdb_stdlog,
- "gcc_symbol_address \"%s\": failed\n",
- identifier);
+ gdb_printf (gdb_stdlog,
+ "gcc_symbol_address \"%s\": failed\n",
+ identifier);
return result;
}