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 3/5] Fix weird quoting in stap-probe.c
Date: Sat, 22 Aug 2026 14:30:05 -0600	[thread overview]
Message-ID: <20260822-no-backquotes-in-strings-v1-3-0b035ad036a3@tromey.com> (raw)
In-Reply-To: <20260822-no-backquotes-in-strings-v1-0-0b035ad036a3@tromey.com>

I found some code in stap-probe.c that split the quoting in a strange
way:

		warning (_("unrecognized bitness %s%c' for probe `%s'"),
			 got_minus ? "`-" : "`", *cur,

Here the leading ` is not part of the format string.  I found this odd
and so I split this fix out into its own patch.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34044
---
 gdb/stap-probe.c                                      | 4 ++--
 gdb/testsuite/gdb.arch/amd64-stap-optional-prefix.exp | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/gdb/stap-probe.c b/gdb/stap-probe.c
index 986ff38c586..654a2f7ca45 100644
--- a/gdb/stap-probe.c
+++ b/gdb/stap-probe.c
@@ -1304,8 +1304,8 @@ stap_probe::parse_arguments (struct gdbarch *gdbarch)
 	      {
 		/* We have an error, because we don't expect anything
 		   except 1, 2, 4 and 8.  */
-		warning (_("unrecognized bitness %s%c' for probe `%s'"),
-			 got_minus ? "`-" : "`", *cur,
+		warning (_("unrecognized bitness \"%s%c\" for probe \"%s\""),
+			 got_minus ? "-" : "", *cur,
 			 this->get_name ().c_str ());
 		return;
 	      }
diff --git a/gdb/testsuite/gdb.arch/amd64-stap-optional-prefix.exp b/gdb/testsuite/gdb.arch/amd64-stap-optional-prefix.exp
index 9cd7dec166c..8f26e3fe9bf 100644
--- a/gdb/testsuite/gdb.arch/amd64-stap-optional-prefix.exp
+++ b/gdb/testsuite/gdb.arch/amd64-stap-optional-prefix.exp
@@ -79,7 +79,7 @@ foreach probe_name $normal_probes_names \
 
 with_test_prefix "fail_probe" {
     goto_probe "fail_probe"
-    gdb_test "print \$_probe_arg0" "warning: unrecognized bitness `-7' for probe `fail_probe'\r\nInvalid probe argument 0 -- probe has 0 arguments available"
+    gdb_test "print \$_probe_arg0" "warning: unrecognized bitness \"-7\" for probe \"fail_probe\"\r\nInvalid probe argument 0 -- probe has 0 arguments available"
 }
 
 with_test_prefix "fail2_probe" {

-- 
2.49.0


  parent reply	other threads:[~2026-08-22 20:30 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 ` Tom Tromey [this message]
2026-08-23  4:31   ` [PATCH 3/5] Fix weird quoting in stap-probe.c 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 ` [PATCH 5/5] Fix styling in a few messages Tom Tromey

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-3-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