aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2022-02-07 17:13:34 +0000
committerAndrew Burgess <aburgess@redhat.com>2022-02-08 09:20:52 +0000
commitbafae5524e78a85322788d833a719af753ce14a2 (patch)
treeb3b43ee786898568f7d7364cf652c85b1370ef1b /gdb
parent30a954525f4e53a9cd50a1a8a6f201c7cf6595c7 (diff)
downloadgdb-bafae5524e78a85322788d833a719af753ce14a2.zip
gdb-bafae5524e78a85322788d833a719af753ce14a2.tar.gz
gdb-bafae5524e78a85322788d833a719af753ce14a2.tar.bz2
gdb: remove tailing newlines from index_cache_debug calls
I noticed that most of the calls to index_cache_debug include a trailing newline. As the new debug mechanism already adds a newline, that means all of these debug calls result in a blank line being printed, which I think is a mistake. Remove all the trailing newlines. I also reformatted one of the index_cache_debug where a string will now fit onto a single line. Unless 'set debug index-cache on' is used, there should be no visible change in output after this commit.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/dwarf2/index-cache.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/gdb/dwarf2/index-cache.c b/gdb/dwarf2/index-cache.c
index fa6b7ab..fd76917 100644
--- a/gdb/dwarf2/index-cache.c
+++ b/gdb/dwarf2/index-cache.c
@@ -63,7 +63,7 @@ index_cache::set_directory (std::string dir)
m_dir = std::move (dir);
- index_cache_debug ("now using directory %s\n", m_dir.c_str ());
+ index_cache_debug ("now using directory %s", m_dir.c_str ());
}
/* See dwarf-index-cache.h. */
@@ -71,7 +71,7 @@ index_cache::set_directory (std::string dir)
void
index_cache::enable ()
{
- index_cache_debug ("enabling (%s)\n", m_dir.c_str ());
+ index_cache_debug ("enabling (%s)", m_dir.c_str ());
m_enabled = true;
}
@@ -81,7 +81,7 @@ index_cache::enable ()
void
index_cache::disable ()
{
- index_cache_debug ("disabling\n");
+ index_cache_debug ("disabling");
m_enabled = false;
}
@@ -100,7 +100,7 @@ index_cache::store (dwarf2_per_objfile *per_objfile)
const bfd_build_id *build_id = build_id_bfd_get (obj->obfd);
if (build_id == nullptr)
{
- index_cache_debug ("objfile %s has no build id\n",
+ index_cache_debug ("objfile %s has no build id",
objfile_name (obj));
return;
}
@@ -118,7 +118,7 @@ index_cache::store (dwarf2_per_objfile *per_objfile)
if (dwz_build_id == nullptr)
{
- index_cache_debug ("dwz objfile %s has no build id\n",
+ index_cache_debug ("dwz objfile %s has no build id",
dwz->filename ());
return;
}
@@ -143,7 +143,7 @@ index_cache::store (dwarf2_per_objfile *per_objfile)
return;
}
- index_cache_debug ("writing index cache for objfile %s\n",
+ index_cache_debug ("writing index cache for objfile %s",
objfile_name (obj));
/* Write the index itself to the directory, using the build id as the
@@ -154,8 +154,8 @@ index_cache::store (dwarf2_per_objfile *per_objfile)
}
catch (const gdb_exception_error &except)
{
- index_cache_debug ("couldn't store index cache for objfile "
- "%s: %s", objfile_name (obj), except.what ());
+ index_cache_debug ("couldn't store index cache for objfile %s: %s",
+ objfile_name (obj), except.what ());
}
}
@@ -195,7 +195,7 @@ index_cache::lookup_gdb_index (const bfd_build_id *build_id,
try
{
- index_cache_debug ("trying to read %s\n",
+ index_cache_debug ("trying to read %s",
filename.c_str ());
/* Try to map that file. */
@@ -211,7 +211,7 @@ index_cache::lookup_gdb_index (const bfd_build_id *build_id,
}
catch (const gdb_exception_error &except)
{
- index_cache_debug ("couldn't read %s: %s\n",
+ index_cache_debug ("couldn't read %s: %s",
filename.c_str (), except.what ());
}