[PATCH 3/5] Fix weird quoting in stap-probe.c
Tom Tromey <[email protected]>
| Newsgroups | gmane.comp.gdb.patches |
|---|---|
| Message-ID | <[email protected]> |
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