From: Lancelot SIX <lancelot.six@amd.com>
To: <gdb-patches@sourceware.org>
Cc: <aburgess@redhat.com>, Lancelot SIX <lancelot.six@amd.com>
Subject: [PATCH] gdbsupport/common-inferior.c: Fix mingw build
Date: Mon, 31 Mar 2025 12:13:58 +0100 [thread overview]
Message-ID: <20250331111358.200153-1-lancelot.six@amd.com> (raw)
A recent change (512ca2fca4b "gdb: split up
construct_inferior_arguments") introduced a build failure for mingw:
CXX common-inferior.o
.../gdb/gdbsupport/common-inferior.cc: In function ‘std::string escape_characters(const char*, const char*)’:
.../gdb/gdbsupport/common-inferior.cc:62:20: error: ‘argv’ was not declared in this scope; did you mean ‘arg’?
62 | if (strpbrk (argv[i], special))
| ^~~~
| arg
.../gdb/gdbsupport/common-inferior.cc:62:25: error: ‘i’ was not declared in this scope
62 | if (strpbrk (argv[i], special))
| ^
This patch fixes that.
Change-Id: I07ade607bc4516627b433085b07d9d198d8e4b4a
---
gdbsupport/common-inferior.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdbsupport/common-inferior.cc b/gdbsupport/common-inferior.cc
index 4b868294062..e544780bd4b 100644
--- a/gdbsupport/common-inferior.cc
+++ b/gdbsupport/common-inferior.cc
@@ -59,7 +59,7 @@ escape_characters (const char *arg, const char *special)
#ifdef __MINGW32__
bool quoted = false;
- if (strpbrk (argv[i], special))
+ if (strpbrk (arg, special))
{
quoted = true;
result += quote;
base-commit: 7109ea04ac79f641c48b6a1e6a2f3fc38a83c2ed
--
2.43.0
next reply other threads:[~2025-03-31 11:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-31 11:13 Lancelot SIX [this message]
2025-03-31 12:23 ` Tom de Vries
2025-03-31 13:06 ` Lancelot SIX
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=20250331111358.200153-1-lancelot.six@amd.com \
--to=lancelot.six@amd.com \
--cc=aburgess@redhat.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