diff options
author | Tom Tromey <tom@tromey.com> | 2022-01-02 11:46:15 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2022-03-29 12:46:24 -0600 |
commit | 6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a (patch) | |
tree | 641a6a86240919fe4ba9219fbbbe15bc6331c22d /gdb/cp-namespace.c | |
parent | a11ac3b3e8ff6769badcf0041894f6c5acc1b94f (diff) | |
download | gdb-6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a.zip gdb-6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a.tar.gz gdb-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/cp-namespace.c')
-rw-r--r-- | gdb/cp-namespace.c | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c index 18238db..3ac19fa 100644 --- a/gdb/cp-namespace.c +++ b/gdb/cp-namespace.c @@ -509,11 +509,11 @@ cp_lookup_symbol_imports_or_template (const char *scope, if (symbol_lookup_debug) { - fprintf_unfiltered (gdb_stdlog, - "cp_lookup_symbol_imports_or_template" - " (%s, %s, %s, %s)\n", - scope, name, host_address_to_string (block), - domain_name (domain)); + gdb_printf (gdb_stdlog, + "cp_lookup_symbol_imports_or_template" + " (%s, %s, %s, %s)\n", + scope, name, host_address_to_string (block), + domain_name (domain)); } if (function != NULL && function->language () == language_cplus) @@ -531,10 +531,10 @@ cp_lookup_symbol_imports_or_template (const char *scope, { if (symbol_lookup_debug) { - fprintf_unfiltered (gdb_stdlog, - "cp_lookup_symbol_imports_or_template" - " (...) = %s\n", - host_address_to_string (sym)); + gdb_printf (gdb_stdlog, + "cp_lookup_symbol_imports_or_template" + " (...) = %s\n", + host_address_to_string (sym)); } return (struct block_symbol) {sym, block}; } @@ -576,7 +576,7 @@ cp_lookup_symbol_imports_or_template (const char *scope, { if (symbol_lookup_debug) { - fprintf_unfiltered + gdb_printf (gdb_stdlog, "cp_lookup_symbol_imports_or_template (...) = %s\n", host_address_to_string (sym)); @@ -590,10 +590,10 @@ cp_lookup_symbol_imports_or_template (const char *scope, result = cp_lookup_symbol_via_imports (scope, name, block, domain, 0, 1, 1); if (symbol_lookup_debug) { - fprintf_unfiltered (gdb_stdlog, - "cp_lookup_symbol_imports_or_template (...) = %s\n", - result.symbol != NULL - ? host_address_to_string (result.symbol) : "NULL"); + gdb_printf (gdb_stdlog, + "cp_lookup_symbol_imports_or_template (...) = %s\n", + result.symbol != NULL + ? host_address_to_string (result.symbol) : "NULL"); } return result; } @@ -636,10 +636,10 @@ cp_lookup_symbol_namespace (const char *scope, if (symbol_lookup_debug) { - fprintf_unfiltered (gdb_stdlog, - "cp_lookup_symbol_namespace (%s, %s, %s, %s)\n", - scope, name, host_address_to_string (block), - domain_name (domain)); + gdb_printf (gdb_stdlog, + "cp_lookup_symbol_namespace (%s, %s, %s, %s)\n", + scope, name, host_address_to_string (block), + domain_name (domain)); } /* First, try to find the symbol in the given namespace. */ @@ -651,10 +651,10 @@ cp_lookup_symbol_namespace (const char *scope, if (symbol_lookup_debug) { - fprintf_unfiltered (gdb_stdlog, - "cp_lookup_symbol_namespace (...) = %s\n", - sym.symbol != NULL - ? host_address_to_string (sym.symbol) : "NULL"); + gdb_printf (gdb_stdlog, + "cp_lookup_symbol_namespace (...) = %s\n", + sym.symbol != NULL + ? host_address_to_string (sym.symbol) : "NULL"); } return sym; } @@ -742,11 +742,11 @@ cp_lookup_symbol_nonlocal (const struct language_defn *langdef, if (symbol_lookup_debug) { - fprintf_unfiltered (gdb_stdlog, - "cp_lookup_symbol_non_local" - " (%s, %s (scope %s), %s)\n", - name, host_address_to_string (block), scope, - domain_name (domain)); + gdb_printf (gdb_stdlog, + "cp_lookup_symbol_non_local" + " (%s, %s (scope %s), %s)\n", + name, host_address_to_string (block), scope, + domain_name (domain)); } /* First, try to find the symbol in the given namespace, and all @@ -759,11 +759,11 @@ cp_lookup_symbol_nonlocal (const struct language_defn *langdef, if (symbol_lookup_debug) { - fprintf_unfiltered (gdb_stdlog, - "cp_lookup_symbol_nonlocal (...) = %s\n", - (sym.symbol != NULL - ? host_address_to_string (sym.symbol) - : "NULL")); + gdb_printf (gdb_stdlog, + "cp_lookup_symbol_nonlocal (...) = %s\n", + (sym.symbol != NULL + ? host_address_to_string (sym.symbol) + : "NULL")); } return sym; } @@ -920,11 +920,11 @@ cp_lookup_nested_symbol (struct type *parent_type, { const char *type_name = saved_parent_type->name (); - fprintf_unfiltered (gdb_stdlog, - "cp_lookup_nested_symbol (%s, %s, %s, %s)\n", - type_name != NULL ? type_name : "unnamed", - nested_name, host_address_to_string (block), - domain_name (domain)); + gdb_printf (gdb_stdlog, + "cp_lookup_nested_symbol (%s, %s, %s, %s)\n", + type_name != NULL ? type_name : "unnamed", + nested_name, host_address_to_string (block), + domain_name (domain)); } switch (parent_type->code ()) @@ -956,11 +956,11 @@ cp_lookup_nested_symbol (struct type *parent_type, if (symbol_lookup_debug) { - fprintf_unfiltered (gdb_stdlog, - "cp_lookup_nested_symbol (...) = %s\n", - (sym.symbol != NULL - ? host_address_to_string (sym.symbol) - : "NULL")); + gdb_printf (gdb_stdlog, + "cp_lookup_nested_symbol (...) = %s\n", + (sym.symbol != NULL + ? host_address_to_string (sym.symbol) + : "NULL")); } return sym; } @@ -969,9 +969,9 @@ cp_lookup_nested_symbol (struct type *parent_type, case TYPE_CODE_METHOD: if (symbol_lookup_debug) { - fprintf_unfiltered (gdb_stdlog, - "cp_lookup_nested_symbol (...) = NULL" - " (func/method)\n"); + gdb_printf (gdb_stdlog, + "cp_lookup_nested_symbol (...) = NULL" + " (func/method)\n"); } return {}; @@ -1058,7 +1058,7 @@ cp_lookup_transparent_type_loop (const char *name, static void maintenance_cplus_namespace (const char *args, int from_tty) { - printf_filtered (_("The `maint namespace' command was removed.\n")); + gdb_printf (_("The `maint namespace' command was removed.\n")); } void _initialize_cp_namespace (); |