aboutsummaryrefslogtreecommitdiff
path: root/gdb/skip.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/skip.c
parenta11ac3b3e8ff6769badcf0041894f6c5acc1b94f (diff)
downloadgdb-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/skip.c')
-rw-r--r--gdb/skip.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/gdb/skip.c b/gdb/skip.c
index 62825cb..3a3734a 100644
--- a/gdb/skip.c
+++ b/gdb/skip.c
@@ -184,7 +184,7 @@ skip_file_command (const char *arg, int from_tty)
skiplist_entry::add_entry (false, std::string (filename),
false, std::string ());
- printf_filtered (_("File %s will be skipped when stepping.\n"), filename);
+ gdb_printf (_("File %s will be skipped when stepping.\n"), filename);
}
/* Create a skiplist entry for the given function NAME and add it to the
@@ -195,7 +195,7 @@ skip_function (const char *name)
{
skiplist_entry::add_entry (false, std::string (), false, std::string (name));
- printf_filtered (_("Function %s will be skipped when stepping.\n"), name);
+ gdb_printf (_("Function %s will be skipped when stepping.\n"), name);
}
static void
@@ -331,20 +331,20 @@ skip_command (const char *arg, int from_tty)
if (function_to_print == NULL)
{
- printf_filtered (_("%s %s will be skipped when stepping.\n"),
- file_text, file_to_print);
+ gdb_printf (_("%s %s will be skipped when stepping.\n"),
+ file_text, file_to_print);
}
else if (file_to_print == NULL)
{
- printf_filtered (_("%s %s will be skipped when stepping.\n"),
- function_text, function_to_print);
+ gdb_printf (_("%s %s will be skipped when stepping.\n"),
+ function_text, function_to_print);
}
else
{
- printf_filtered (_("%s %s in %s %s will be skipped"
- " when stepping.\n"),
- function_text, function_to_print,
- lower_file_text, file_to_print);
+ gdb_printf (_("%s %s in %s %s will be skipped"
+ " when stepping.\n"),
+ function_text, function_to_print,
+ lower_file_text, file_to_print);
}
}
}
@@ -486,9 +486,9 @@ bool
skiplist_entry::do_skip_file_p (const symtab_and_line &function_sal) const
{
if (debug_skip)
- fprintf_unfiltered (gdb_stdlog,
- "skip: checking if file %s matches non-glob %s...",
- function_sal.symtab->filename, m_file.c_str ());
+ gdb_printf (gdb_stdlog,
+ "skip: checking if file %s matches non-glob %s...",
+ function_sal.symtab->filename, m_file.c_str ());
bool result;
@@ -513,7 +513,7 @@ skiplist_entry::do_skip_file_p (const symtab_and_line &function_sal) const
}
if (debug_skip)
- fprintf_unfiltered (gdb_stdlog, result ? "yes.\n" : "no.\n");
+ gdb_printf (gdb_stdlog, result ? "yes.\n" : "no.\n");
return result;
}
@@ -522,9 +522,9 @@ bool
skiplist_entry::do_skip_gfile_p (const symtab_and_line &function_sal) const
{
if (debug_skip)
- fprintf_unfiltered (gdb_stdlog,
- "skip: checking if file %s matches glob %s...",
- function_sal.symtab->filename, m_file.c_str ());
+ gdb_printf (gdb_stdlog,
+ "skip: checking if file %s matches glob %s...",
+ function_sal.symtab->filename, m_file.c_str ());
bool result;
@@ -553,7 +553,7 @@ skiplist_entry::do_skip_gfile_p (const symtab_and_line &function_sal) const
}
if (debug_skip)
- fprintf_unfiltered (gdb_stdlog, result ? "yes.\n" : "no.\n");
+ gdb_printf (gdb_stdlog, result ? "yes.\n" : "no.\n");
return result;
}
@@ -584,9 +584,9 @@ skiplist_entry::skip_function_p (const char *function_name) const
if (m_function_is_regexp)
{
if (debug_skip)
- fprintf_unfiltered (gdb_stdlog,
- "skip: checking if function %s matches regex %s...",
- function_name, m_function.c_str ());
+ gdb_printf (gdb_stdlog,
+ "skip: checking if function %s matches regex %s...",
+ function_name, m_function.c_str ());
gdb_assert (m_compiled_function_regexp);
result
@@ -595,15 +595,15 @@ skiplist_entry::skip_function_p (const char *function_name) const
else
{
if (debug_skip)
- fprintf_unfiltered (gdb_stdlog,
- ("skip: checking if function %s matches non-regex "
- "%s..."),
- function_name, m_function.c_str ());
+ gdb_printf (gdb_stdlog,
+ ("skip: checking if function %s matches non-regex "
+ "%s..."),
+ function_name, m_function.c_str ());
result = (strcmp_iw (function_name, m_function.c_str ()) == 0);
}
if (debug_skip)
- fprintf_unfiltered (gdb_stdlog, result ? "yes.\n" : "no.\n");
+ gdb_printf (gdb_stdlog, result ? "yes.\n" : "no.\n");
return result;
}