aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLancelot SIX <lancelot.six@amd.com>2025-03-31 12:06:06 +0100
committerLancelot SIX <lancelot.six@amd.com>2025-03-31 14:03:33 +0100
commit7b34a95034ff62537db66049a1736e7b4436e499 (patch)
tree7fd020be0d1df404190edc5502dd14e6d04891fc
parent6ac0e2868057515f860f0a27a17449ef49655a6a (diff)
downloadbinutils-7b34a95034ff62537db66049a1736e7b4436e499.zip
binutils-7b34a95034ff62537db66049a1736e7b4436e499.tar.gz
binutils-7b34a95034ff62537db66049a1736e7b4436e499.tar.bz2
gdbsupport/common-inferior.c: Fix mingw build
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 Approved-By: Tom de Vries <tdevries@suse.de>
-rw-r--r--gdbsupport/common-inferior.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdbsupport/common-inferior.cc b/gdbsupport/common-inferior.cc
index 4b86829..e544780 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;