Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH 5/5] Fix styling in a few messages
Date: Sat, 22 Aug 2026 14:30:07 -0600	[thread overview]
Message-ID: <20260822-no-backquotes-in-strings-v1-5-0b035ad036a3@tromey.com> (raw)
In-Reply-To: <20260822-no-backquotes-in-strings-v1-0-0b035ad036a3@tromey.com>

While working on fixing the `...' quoting, I stumbled across a few
spots that should use CLI styling but currently do not.  This patch
fixes the ones I found.
---
 gdb/ada-lang.c    | 3 ++-
 gdb/windows-nat.c | 3 ++-
 gdb/xml-syscall.c | 8 ++++++--
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index a0781d2d6dd..9e7dee54908 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -7888,7 +7888,8 @@ ada_template_to_fixed_record_type_1 (struct type *type,
 	warning (_("Invalid type size for \"%s\" detected: %s."),
 		 rtype->name (), pulongest (type->length ()));
       else
-	warning (_("Invalid type size for <unnamed> detected: %s."),
+	warning (_("Invalid type size for %ps detected: %s."),
+		 styled_string (metadata_style.style (), "<unnamed>"),
 		 pulongest (type->length ()));
     }
   else
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 8d50457b55c..380b30f541f 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -2867,7 +2867,8 @@ windows_nat_target::create_inferior (const char *exec_file,
   ensure_only_one_process ();
 
   if (!exec_file)
-    error (_("No executable specified, use \"target exec\"."));
+    error (_("No executable specified, use \"%ps\"."),
+	   styled_string (command_style.style (), "target exec"));
 
   const char *inferior_cwd = current_inferior ()->cwd ().c_str ();
   std::string expanded_infcwd;
diff --git a/gdb/xml-syscall.c b/gdb/xml-syscall.c
index 1fe50acc191..d8a66a6413f 100644
--- a/gdb/xml-syscall.c
+++ b/gdb/xml-syscall.c
@@ -22,6 +22,7 @@
 #include "xml-support.h"
 #include "xml-syscall.h"
 #include "gdbarch.h"
+#include "cli/cli-style.h"
 
 /* For the struct syscall definition.  */
 #include "target.h"
@@ -363,8 +364,11 @@ init_syscalls_info (struct gdbarch *gdbarch)
   if (syscalls_info->syscalls.empty ())
     {
       if (xml_syscall_file != NULL)
-	warning (_("Could not load the syscall XML file \"%s/%s\"."),
-		 gdb_datadir.c_str (), xml_syscall_file);
+	warning (_("Could not load the syscall XML file \"%p[%s/%s%p]\"."),
+		 file_name_style.style ().ptr (),
+		 gdb_datadir.c_str (),
+		 xml_syscall_file,
+		 nullptr);
       else
 	warning (_("There is no XML file to open."));
 

-- 
2.49.0


      parent reply	other threads:[~2026-08-22 20:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-22 20:30 [PATCH 0/5] Remove `...' and related forms of quoting from gdb Tom Tromey
2026-08-22 20:30 ` [PATCH 1/5] Change `...'-style quoting in gdbsupport Tom Tromey
2026-08-22 20:30 ` [PATCH 2/5] Change `...'-style quoting in gdbserver Tom Tromey
2026-08-22 20:30 ` [PATCH 3/5] Fix weird quoting in stap-probe.c Tom Tromey
2026-08-23  4:31   ` Eli Zaretskii
2026-08-24 18:09     ` Tom de Vries
2026-08-22 20:30 ` [PATCH 4/5] Change `...'-style quoting in gdb Tom Tromey
2026-08-22 20:30 ` Tom Tromey [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260822-no-backquotes-in-strings-v1-5-0b035ad036a3@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox