aboutsummaryrefslogtreecommitdiff
path: root/gdb/build-id.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/build-id.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/build-id.c')
-rw-r--r--gdb/build-id.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gdb/build-id.c b/gdb/build-id.c
index 8a2d5b4..345ed0e 100644
--- a/gdb/build-id.c
+++ b/gdb/build-id.c
@@ -76,7 +76,7 @@ build_id_to_debug_bfd_1 (const std::string &link, size_t build_id_len,
{
if (separate_debug_file_debug)
{
- fprintf_unfiltered (gdb_stdlog, _(" Trying %s..."), link.c_str ());
+ gdb_printf (gdb_stdlog, _(" Trying %s..."), link.c_str ());
gdb_flush (gdb_stdlog);
}
@@ -94,8 +94,8 @@ build_id_to_debug_bfd_1 (const std::string &link, size_t build_id_len,
if (filename == NULL)
{
if (separate_debug_file_debug)
- fprintf_unfiltered (gdb_stdlog,
- _(" no, unable to compute real path\n"));
+ gdb_printf (gdb_stdlog,
+ _(" no, unable to compute real path\n"));
return {};
}
@@ -106,7 +106,7 @@ build_id_to_debug_bfd_1 (const std::string &link, size_t build_id_len,
if (debug_bfd == NULL)
{
if (separate_debug_file_debug)
- fprintf_unfiltered (gdb_stdlog, _(" no, unable to open.\n"));
+ gdb_printf (gdb_stdlog, _(" no, unable to open.\n"));
return {};
}
@@ -114,13 +114,13 @@ build_id_to_debug_bfd_1 (const std::string &link, size_t build_id_len,
if (!build_id_verify (debug_bfd.get(), build_id_len, build_id))
{
if (separate_debug_file_debug)
- fprintf_unfiltered (gdb_stdlog, _(" no, build-id does not match.\n"));
+ gdb_printf (gdb_stdlog, _(" no, build-id does not match.\n"));
return {};
}
if (separate_debug_file_debug)
- fprintf_unfiltered (gdb_stdlog, _(" yes!\n"));
+ gdb_printf (gdb_stdlog, _(" yes!\n"));
return debug_bfd;
}
@@ -210,9 +210,9 @@ find_separate_debug_file_by_buildid (struct objfile *objfile)
if (build_id != NULL)
{
if (separate_debug_file_debug)
- fprintf_unfiltered (gdb_stdlog,
- _("\nLooking for separate debug info (build-id) for "
- "%s\n"), objfile_name (objfile));
+ gdb_printf (gdb_stdlog,
+ _("\nLooking for separate debug info (build-id) for "
+ "%s\n"), objfile_name (objfile));
gdb_bfd_ref_ptr abfd (build_id_to_debug_bfd (build_id->size,
build_id->data));