aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2022-02-28 08:21:55 -0700
committerTom Tromey <tromey@adacore.com>2022-02-28 11:33:30 -0700
commit972f7a4b97f81a0a5e6f46b9fb163796dc12ead5 (patch)
treeef051cf4349869e03ecdf31406afc1bb86edb660 /gdb
parent29928b8e3b79e14abb11cfa78daec447158b79d4 (diff)
downloadgdb-972f7a4b97f81a0a5e6f46b9fb163796dc12ead5.zip
gdb-972f7a4b97f81a0a5e6f46b9fb163796dc12ead5.tar.gz
gdb-972f7a4b97f81a0a5e6f46b9fb163796dc12ead5.tar.bz2
Add more filename styling
I found a few spots where filename styling ought to be applied, but is not.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/auto-load.c9
-rw-r--r--gdb/gdb_bfd.c4
-rw-r--r--gdb/infcmd.c3
-rw-r--r--gdb/inferior.c4
-rw-r--r--gdb/linux-thread-db.c3
-rw-r--r--gdb/progspace.c4
-rw-r--r--gdb/symtab.c3
7 files changed, 21 insertions, 9 deletions
diff --git a/gdb/auto-load.c b/gdb/auto-load.c
index 680b879..9a1ccec 100644
--- a/gdb/auto-load.c
+++ b/gdb/auto-load.c
@@ -476,15 +476,18 @@ file_is_auto_load_safe (const char *filename)
printf_filtered (_("\
To enable execution of this file add\n\
\tadd-auto-load-safe-path %s\n\
-line to your configuration file \"%s\".\n\
+line to your configuration file \"%ps\".\n\
To completely disable this security protection add\n\
\tset auto-load safe-path /\n\
-line to your configuration file \"%s\".\n\
+line to your configuration file \"%ps\".\n\
For more information about this security protection see the\n\
\"Auto-loading safe path\" section in the GDB manual. E.g., run from the shell:\n\
\tinfo \"(gdb)Auto-loading safe path\"\n"),
filename_real.get (),
- home_config.c_str (), home_config.c_str ());
+ styled_string (file_name_style.style (),
+ home_config.c_str ()),
+ styled_string (file_name_style.style (),
+ home_config.c_str ()));
advice_printed = true;
}
diff --git a/gdb/gdb_bfd.c b/gdb/gdb_bfd.c
index d28c323..b2e896f 100644
--- a/gdb/gdb_bfd.c
+++ b/gdb/gdb_bfd.c
@@ -32,6 +32,7 @@
#include "target.h"
#include "gdb/fileio.h"
#include "inferior.h"
+#include "cli/cli-style.h"
/* An object of this type is stored in the section's user data when
mapping a section. */
@@ -1101,7 +1102,8 @@ print_one_bfd (void **slot, void *data)
ui_out_emit_tuple tuple_emitter (uiout, NULL);
uiout->field_signed ("refcount", gdata->refc);
uiout->field_string ("addr", host_address_to_string (abfd));
- uiout->field_string ("filename", bfd_get_filename (abfd));
+ uiout->field_string ("filename", bfd_get_filename (abfd),
+ file_name_style.style ());
uiout->text ("\n");
return 1;
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 682bebe..ea06ceb 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -438,7 +438,8 @@ run_command_1 (const char *args, int from_tty, enum run_how run_how)
uiout->field_string (NULL, "Starting program");
uiout->text (": ");
if (exec_file)
- uiout->field_string ("execfile", exec_file);
+ uiout->field_string ("execfile", exec_file,
+ file_name_style.style ());
uiout->spaces (1);
uiout->field_string ("infargs", current_inferior ()->args ());
uiout->text ("\n");
diff --git a/gdb/inferior.c b/gdb/inferior.c
index bebddb4..1abdde3 100644
--- a/gdb/inferior.c
+++ b/gdb/inferior.c
@@ -36,6 +36,7 @@
#include "readline/tilde.h"
#include "progspace-and-thread.h"
#include "gdbsupport/buildargv.h"
+#include "cli/cli-style.h"
/* Keep a registry of per-inferior data-pointers required by other GDB
modules. */
@@ -521,7 +522,8 @@ print_inferior (struct ui_out *uiout, const char *requested_inferiors)
uiout->field_string ("connection-id", conn);
if (inf->pspace->exec_filename != nullptr)
- uiout->field_string ("exec", inf->pspace->exec_filename.get ());
+ uiout->field_string ("exec", inf->pspace->exec_filename.get (),
+ file_name_style.style ());
else
uiout->field_skip ("exec");
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index 18d313b..530ece0 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -1944,7 +1944,8 @@ info_auto_load_libthread_db (const char *args, int from_tty)
ui_out_emit_tuple tuple_emitter (uiout, NULL);
info = array[i];
- uiout->field_string ("filename", info->filename);
+ uiout->field_string ("filename", info->filename,
+ file_name_style.style ());
std::string pids;
while (i < array.size () && strcmp (info->filename,
diff --git a/gdb/progspace.c b/gdb/progspace.c
index 4a2ac84..8dc21fd 100644
--- a/gdb/progspace.c
+++ b/gdb/progspace.c
@@ -27,6 +27,7 @@
#include "gdbthread.h"
#include "inferior.h"
#include <algorithm>
+#include "cli/cli-style.h"
/* The last program space number assigned. */
static int last_program_space_num = 0;
@@ -321,7 +322,8 @@ print_program_space (struct ui_out *uiout, int requested)
uiout->field_signed ("id", pspace->num);
if (pspace->exec_filename != nullptr)
- uiout->field_string ("exec", pspace->exec_filename.get ());
+ uiout->field_string ("exec", pspace->exec_filename.get (),
+ file_name_style.style ());
else
uiout->field_skip ("exec");
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 1a39372..a867e1d 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -4508,7 +4508,8 @@ info_sources_worker (struct ui_out *uiout,
if (group_by_objfile)
{
output_tuple.emplace (uiout, nullptr);
- uiout->field_string ("filename", objfile_name (objfile));
+ uiout->field_string ("filename", objfile_name (objfile),
+ file_name_style.style ());
uiout->text (":\n");
bool debug_fully_readin = !objfile->has_unexpanded_symtabs ();
if (uiout->is_mi_like_p ())