Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] gdbsupport/common-inferior.c: Fix mingw build
@ 2025-03-31 11:13 Lancelot SIX
  2025-03-31 12:23 ` Tom de Vries
  0 siblings, 1 reply; 3+ messages in thread
From: Lancelot SIX @ 2025-03-31 11:13 UTC (permalink / raw)
  To: gdb-patches; +Cc: aburgess, Lancelot SIX

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-03-31 13:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-31 11:13 [PATCH] gdbsupport/common-inferior.c: Fix mingw build Lancelot SIX
2025-03-31 12:23 ` Tom de Vries
2025-03-31 13:06   ` Lancelot SIX

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox