Message ID | cover.1704809585.git.aburgess@redhat.com |
---|---|
Headers |
Return-Path: <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B78803857C5E for <patchwork@sourceware.org>; Tue, 9 Jan 2024 14:27:25 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 4686D3858416 for <gdb-patches@sourceware.org>; Tue, 9 Jan 2024 14:26:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4686D3858416 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4686D3858416 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704810412; cv=none; b=GjovsmRb3UaNVYpC9Lsr+SeODNrQad9/WIfG1PigdgX2mfMySmF6XehhptXscA2hDAhqnH9gKyQR74ZKHJBDGHa2bEcmw2sFWrk3cpMzvC1dHd/JFEOqrMu8hJ7kxx6AXzfI4S8Ij5jpyKKp7Gh3V3KAT5YzNen+ccLznoGIF+A= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704810412; c=relaxed/simple; bh=BlHQ0tGqjaz9mJUen/Z4Yibtr3Y9F9/M21lj4gBE2sA=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=C5lPEdvxZn5mbO6AcC6ctna9C3BRKFKUNpV3aHGQLrDC4vL+nGPTQX0rUKZ6XY/rke+/FkvCfG3XSUD6Tr4Ht0uZfyEyooigij1geBB3Gvl7UUfH6Gzn4gsyI+Uyz3Kumcnhz77VYTDS4TVRDqYW1vDmReuhg6N2deUv8KNLTK8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704810410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m2nUAVABOUJ0QsPJqM+RdFVA8WrAvsGiG5w2gj7bSRg=; b=YmJqEhOfJZ5y/HVlsmAP/nOR2COese2b58elkkn0nzP4++nduGOuevDDfqEaWtRV+rSaQ/ I5/ZpewFb0FEXXwg1/cGIDuQ0thmlOvbQkA3Z4fJMew2SmW2vI+d9boRjEQn0kPZObIfnT ZpPHIe0CPQL/jy3egJtOvFNopqv3vhw= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-556-5jYEwJ2BOg2YAJy2VISQRA-1; Tue, 09 Jan 2024 09:26:43 -0500 X-MC-Unique: 5jYEwJ2BOg2YAJy2VISQRA-1 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-33693a2dae7so1782771f8f.3 for <gdb-patches@sourceware.org>; Tue, 09 Jan 2024 06:26:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704810402; x=1705415202; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=m2nUAVABOUJ0QsPJqM+RdFVA8WrAvsGiG5w2gj7bSRg=; b=Qb6XvMnWfS4DAObkaMls/v2rC1fEB1Rmy+QO1MPpnOOG3hGwl4ucXgXaBmQkhot8mG /PhXUSGjOlocMdT7wZmERJYCUnP7SU5zc0n/xD6tnkpoCAfPd0l2RyFGnWTaTrlrFoAf dX7cMMhQX0DqW7rJLyJmmQBdLa8zrOcPoCJyUl+haaI6C+WyziVQkaXUMbASxX4xPqjS VDx5pV7TElrFvTKSiPk72uYBDW3UTgh0gMXJ1Up7GHWi+Qs0CWmhQoReEKExhCIZvjmu 9xyBQbRrjYACgs2C/SUbWs8ClOldvIaKssnKNgd7yu1Dhh4xk1gdEzpyqgAM29IfHeEu nyBg== X-Gm-Message-State: AOJu0YyI0RAU7fSAjs2MaRmK7IIDFE6uYiDLKgkr/76tE9dxhMkztwPm bgHF0gzM11kIVLAFBu2IVbEaoNeAhRJgNr6pqW4aRxg4gvq6J/uvshCRBfIk+1EZv1DsqVnk5C8 fExPAZS25G5/2pdw7CRTco3PXrxLWEG8AvXoRtfjhC0ovUN/qOjj+uLw3TOGYVOVAlr531L6zMl 3V/QGhNiuJA03GUA== X-Received: by 2002:adf:e648:0:b0:337:70ad:b37c with SMTP id b8-20020adfe648000000b0033770adb37cmr501501wrn.34.1704810402095; Tue, 09 Jan 2024 06:26:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IE+ihsCfVS4O/ZlFjcdIEVqtyJ6melzkpd5TY4rwZeuj2S9PhMUemLxlzewl8X7AZqm50z+cQ== X-Received: by 2002:adf:e648:0:b0:337:70ad:b37c with SMTP id b8-20020adfe648000000b0033770adb37cmr501494wrn.34.1704810401625; Tue, 09 Jan 2024 06:26:41 -0800 (PST) Received: from localhost (185.223.159.143.dyn.plus.net. [143.159.223.185]) by smtp.gmail.com with ESMTPSA id b6-20020a5d6346000000b0033667867a66sm2552684wrw.101.2024.01.09.06.26.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 06:26:41 -0800 (PST) From: Andrew Burgess <aburgess@redhat.com> To: gdb-patches@sourceware.org Cc: Andrew Burgess <aburgess@redhat.com>, Michael Weghorn <m.weghorn@posteo.de> Subject: [PATCH 00/16] Inferior argument (inc for remote targets) changes Date: Tue, 9 Jan 2024 14:26:23 +0000 Message-Id: <cover.1704809585.git.aburgess@redhat.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org |
Series |
Inferior argument (inc for remote targets) changes
|
|
Message
Andrew Burgess
Jan. 9, 2024, 2:26 p.m. UTC
This series relates to bug PR gdb/28392. For background, check out this series: https://inbox.sourceware.org/gdb-patches/20211022071933.3478427-1-m.weghorn@posteo.de which is a previous attempt to address this bug. It might also be worth reading: https://inbox.sourceware.org/gdb-patches/2b98ca58e47638b4760d86bd6e1fa9a9a79fa2ad.1695817255.git.aburgess@redhat.com which is a previous series of mine which covers some of the work from the original patch series. This series does include many ideas taken from the original patch series (thanks for Michael (original series author) for his work). I think this iteration does include some additional fixes beyond the original series, also there are more tests and documentation changes in this version. There is one small problem: patch #1 is within libiberty. I have posted this to the gcc list here: https://inbox.sourceware.org/gcc-patches/24a8d878590403540bc9b579ba58805985a4d2f7.1701881419.git.aburgess@redhat.com/ However, GCC is currently in stage 4 of its release cycle, so I'm not expecting to see that patch merged before April, I've expanded on this more within the patch #1 email. Still, there's plenty here to comment on, and I figure between now and April I can address any feedback that's given. Thanks, Andrew --- Andrew Burgess (14): libiberty/buildargv: POSIX behaviour for backslash handling gdb/testsuite: add some xfail in gdb.base/startup-with-shell.exp gdb: remove the !startup_with_shell path from construct_inferior_arguments gdbserver: convert program_args to a single string gdbsupport: have construct_inferior_arguments take an escape function gdbsupport: split escape_shell_characters in two gdb: move remote arg splitting and joining into gdbsupport/ gdb/python: change escaping rules when setting arguments gdb: add remote argument passing self tests gdb/gdbserver: pass inferior arguments as a single string gdb: allow 'set args' and run commands to contain newlines gdb/gdbserver: remove some uses of free_vector_argv gdb: new maintenance command to help debug remote argument issues gdb/gdbserver: rework argument splitting and joining Michael Weghorn (2): gdb: Support some escaping of args with startup-with-shell being off gdb/gdbserver: add a '--no-escape-args' command line option gdb/Makefile.in | 1 + gdb/NEWS | 41 +++ gdb/doc/gdb.texinfo | 191 ++++++++++++- gdb/doc/python.texi | 7 +- gdb/infcmd.c | 128 ++++++++- gdb/inferior.c | 8 - gdb/inferior.h | 7 +- gdb/main.c | 30 +- gdb/nat/fork-inferior.c | 84 ++---- gdb/python/py-inferior.c | 7 +- gdb/remote.c | 94 ++++++- gdb/testsuite/gdb.base/args.exp | 137 ++++++--- gdb/testsuite/gdb.base/inferior-args.exp | 215 +++++++++++++-- .../gdb.base/maint-test-remote-args.exp | 40 +++ gdb/testsuite/gdb.base/startup-with-shell.exp | 143 ++++++++-- gdb/testsuite/gdb.python/py-inferior.exp | 36 ++- gdb/testsuite/gdb.server/inferior-args.c | 27 ++ gdb/testsuite/gdb.server/inferior-args.exp | 157 +++++++++++ gdb/unittests/remote-arg-selftests.c | 172 ++++++++++++ gdbserver/linux-low.cc | 5 +- gdbserver/linux-low.h | 2 +- gdbserver/netbsd-low.cc | 6 +- gdbserver/netbsd-low.h | 2 +- gdbserver/server.cc | 74 +++-- gdbserver/server.h | 5 + gdbserver/target.h | 6 +- gdbserver/win32-low.cc | 7 +- gdbserver/win32-low.h | 2 +- gdbsupport/Makefile.am | 1 + gdbsupport/Makefile.in | 13 +- gdbsupport/common-inferior.cc | 207 +++++++++----- gdbsupport/common-inferior.h | 29 +- gdbsupport/remote-args.cc | 260 ++++++++++++++++++ gdbsupport/remote-args.h | 44 +++ libiberty/argv.c | 8 +- libiberty/testsuite/test-expandargv.c | 34 +++ 36 files changed, 1927 insertions(+), 303 deletions(-) create mode 100644 gdb/testsuite/gdb.base/maint-test-remote-args.exp create mode 100644 gdb/testsuite/gdb.server/inferior-args.c create mode 100644 gdb/testsuite/gdb.server/inferior-args.exp create mode 100644 gdb/unittests/remote-arg-selftests.c create mode 100644 gdbsupport/remote-args.cc create mode 100644 gdbsupport/remote-args.h base-commit: b7a5722ebdd24a0d15d56e96d30a649ea1d7b0ee
Comments
> From: Andrew Burgess <aburgess@redhat.com> > Cc: Andrew Burgess <aburgess@redhat.com>, Michael Weghorn <m.weghorn@posteo.de> > Date: Tue, 9 Jan 2024 14:26:23 +0000 > > This series relates to bug PR gdb/28392. For background, check out > this series: > > https://inbox.sourceware.org/gdb-patches/20211022071933.3478427-1-m.weghorn@posteo.de > > which is a previous attempt to address this bug. > > It might also be worth reading: > > https://inbox.sourceware.org/gdb-patches/2b98ca58e47638b4760d86bd6e1fa9a9a79fa2ad.1695817255.git.aburgess@redhat.com > > which is a previous series of mine which covers some of the work from > the original patch series. > > This series does include many ideas taken from the original patch > series (thanks for Michael (original series author) for his work). I > think this iteration does include some additional fixes beyond the > original series, also there are more tests and documentation changes > in this version. > > There is one small problem: patch #1 is within libiberty. I have > posted this to the gcc list here: > > https://inbox.sourceware.org/gcc-patches/24a8d878590403540bc9b579ba58805985a4d2f7.1701881419.git.aburgess@redhat.com/ > > However, GCC is currently in stage 4 of its release cycle, so I'm not > expecting to see that patch merged before April, I've expanded on this > more within the patch #1 email. > > Still, there's plenty here to comment on, and I figure between now and > April I can address any feedback that's given. Thanks. It is hard to follow all these changes especially as they are broken into so many pieces, but I cannot avoid asking: what does this mean for the quoting/escaping of arguments by GDB as a native debugger on MS-Windows? For starters, AFAIK on Windows there's no such thing as "startup with shell", as the inferior is never invoked via the Windows shell. So what does this feature mean and how (and whether) will it work in a native GDB running on Windows debugging Windows programs? Likewise with the --no-escape-args command-line option? And this text: > When starting GDB it is possible to set an inferior argument that > contains a newline, for example: > > shell> gdb --args my.app "abc > > def" > ... > (gdb) show args > Argument list to give program being debugged when it is started is "abc' > 'def". > > However, once GDB is started, the only way to install an argument > containing a newline is to use the Python API. > > This commit changes that. > > After this commit 'set args' as well as 'run', 'start', and 'starti', > will now accept multi-line inferior arguments, e.g.: > > (gdb) set args "abc > > def" > (gdb) show args > Argument list to give program being debugged when it is started is ""abc > def"". > > And also: > > (gdb) run "abc > > def" > ... etc ... seems to say that quoting arguments can cause the inferior's command-line arguments to include a newline, but AFAIK there's no way to make that work on MS-Windows. If that is true, we should at least document the lack of support for this on Windows. Thanks, and apologies in advance if my questions make no sense.
Hi Andrew, On 2024-01-09 15:26, Andrew Burgess wrote: > This series relates to bug PR gdb/28392. For background, check out > this series: > > https://inbox.sourceware.org/gdb-patches/20211022071933.3478427-1-m.weghorn@posteo.de > > which is a previous attempt to address this bug. > > It might also be worth reading: > > https://inbox.sourceware.org/gdb-patches/2b98ca58e47638b4760d86bd6e1fa9a9a79fa2ad.1695817255.git.aburgess@redhat.com > > which is a previous series of mine which covers some of the work from > the original patch series. > > This series does include many ideas taken from the original patch > series (thanks for Michael (original series author) for his work). I > think this iteration does include some additional fixes beyond the > original series, also there are more tests and documentation changes > in this version. Thanks a lot for looking into that series and coming up with an improved solution for the underlying problem! Best, Michael
Eli Zaretskii <eliz@gnu.org> writes: >> From: Andrew Burgess <aburgess@redhat.com> >> Cc: Andrew Burgess <aburgess@redhat.com>, Michael Weghorn <m.weghorn@posteo.de> >> Date: Tue, 9 Jan 2024 14:26:23 +0000 >> >> This series relates to bug PR gdb/28392. For background, check out >> this series: >> >> https://inbox.sourceware.org/gdb-patches/20211022071933.3478427-1-m.weghorn@posteo.de >> >> which is a previous attempt to address this bug. >> >> It might also be worth reading: >> >> https://inbox.sourceware.org/gdb-patches/2b98ca58e47638b4760d86bd6e1fa9a9a79fa2ad.1695817255.git.aburgess@redhat.com >> >> which is a previous series of mine which covers some of the work from >> the original patch series. >> >> This series does include many ideas taken from the original patch >> series (thanks for Michael (original series author) for his work). I >> think this iteration does include some additional fixes beyond the >> original series, also there are more tests and documentation changes >> in this version. >> >> There is one small problem: patch #1 is within libiberty. I have >> posted this to the gcc list here: >> >> https://inbox.sourceware.org/gcc-patches/24a8d878590403540bc9b579ba58805985a4d2f7.1701881419.git.aburgess@redhat.com/ >> >> However, GCC is currently in stage 4 of its release cycle, so I'm not >> expecting to see that patch merged before April, I've expanded on this >> more within the patch #1 email. >> >> Still, there's plenty here to comment on, and I figure between now and >> April I can address any feedback that's given. > > Thanks. It is hard to follow all these changes especially as they are > broken into so many pieces, but I cannot avoid asking: what does this > mean for the quoting/escaping of arguments by GDB as a native debugger > on MS-Windows? > > For starters, AFAIK on Windows there's no such thing as "startup with > shell", as the inferior is never invoked via the Windows shell. So > what does this feature mean and how (and whether) will it work in a > native GDB running on Windows debugging Windows programs? Likewise > with the --no-escape-args command-line option? > > And this text: > >> When starting GDB it is possible to set an inferior argument that >> contains a newline, for example: >> >> shell> gdb --args my.app "abc >> > def" >> ... >> (gdb) show args >> Argument list to give program being debugged when it is started is "abc' >> 'def". >> >> However, once GDB is started, the only way to install an argument >> containing a newline is to use the Python API. >> >> This commit changes that. >> >> After this commit 'set args' as well as 'run', 'start', and 'starti', >> will now accept multi-line inferior arguments, e.g.: >> >> (gdb) set args "abc >> > def" >> (gdb) show args >> Argument list to give program being debugged when it is started is ""abc >> def"". >> >> And also: >> >> (gdb) run "abc >> > def" >> ... etc ... > > seems to say that quoting arguments can cause the inferior's > command-line arguments to include a newline, but AFAIK there's no way > to make that work on MS-Windows. If that is true, we should at least > document the lack of support for this on Windows. > > Thanks, and apologies in advance if my questions make no sense. The question makes perfect sense. My hope is that the situation on Windows is no better or worse than it ever was. I'm reluctant to start writing documentation saying feature X does or does not work on Windows and why though as I don't have access to a Windows machine on which I can test any of this. Specifically on the question of passing a newline within an argument, I guess (having taken a quick peek at the window-nat.c file) that embedding a newline within the argument string would cause problems? I believe it's already possible today to inject newline characters via the Python API. Maybe the window-nat.c code should be checking for invalid characters and throw an error if the user tries to start an inferior. I guess the other option would be to check the arguments at the moment the user sets them ... but this isn't going to work if the user sets the arguments before connecting to a remote target, so I suspect it makes more sense to detect invalid argument characters just prior to starting the inferior and giving an error at that point. I agree that platform specific limitations should be documented. I'm willing to help however I can to get that done. But I'm a little uncomfortable trying to document something I can't test. I'll see if I can source a Windows laptop, maybe I can build/test in that setup. Thanks, Andrew
On 1/9/24 06:26, Andrew Burgess wrote: > This series relates to bug PR gdb/28392. For background, check out > this series: > > https://inbox.sourceware.org/gdb-patches/20211022071933.3478427-1-m.weghorn@posteo.de Having run through this code in years gone by, this series is long overdue, so thank you for that. > Still, there's plenty here to comment on, and I figure between now and > April I can address any feedback that's given. Re: libiberty, I am sure you'll make something work. :-) FWIW, I've regression tested the series on our internal testing harness and found no regressions on Fedora 39 (x86_64, aarch64, ppc64le, s390x). I only have comments for a handful of the patches, and most of those comments are pretty trivial. Feel free to add my Reviewed-by. Keith > Andrew Burgess (14): > libiberty/buildargv: POSIX behaviour for backslash handling > gdb/testsuite: add some xfail in gdb.base/startup-with-shell.exp > gdb: remove the !startup_with_shell path from > construct_inferior_arguments > gdbserver: convert program_args to a single string > gdbsupport: have construct_inferior_arguments take an escape function > gdbsupport: split escape_shell_characters in two > gdb: move remote arg splitting and joining into gdbsupport/ > gdb/python: change escaping rules when setting arguments > gdb: add remote argument passing self tests > gdb/gdbserver: pass inferior arguments as a single string > gdb: allow 'set args' and run commands to contain newlines > gdb/gdbserver: remove some uses of free_vector_argv > gdb: new maintenance command to help debug remote argument issues > gdb/gdbserver: rework argument splitting and joining > > Michael Weghorn (2): > gdb: Support some escaping of args with startup-with-shell being off > gdb/gdbserver: add a '--no-escape-args' command line option > > gdb/Makefile.in | 1 + > gdb/NEWS | 41 +++ > gdb/doc/gdb.texinfo | 191 ++++++++++++- > gdb/doc/python.texi | 7 +- > gdb/infcmd.c | 128 ++++++++- > gdb/inferior.c | 8 - > gdb/inferior.h | 7 +- > gdb/main.c | 30 +- > gdb/nat/fork-inferior.c | 84 ++---- > gdb/python/py-inferior.c | 7 +- > gdb/remote.c | 94 ++++++- > gdb/testsuite/gdb.base/args.exp | 137 ++++++--- > gdb/testsuite/gdb.base/inferior-args.exp | 215 +++++++++++++-- > .../gdb.base/maint-test-remote-args.exp | 40 +++ > gdb/testsuite/gdb.base/startup-with-shell.exp | 143 ++++++++-- > gdb/testsuite/gdb.python/py-inferior.exp | 36 ++- > gdb/testsuite/gdb.server/inferior-args.c | 27 ++ > gdb/testsuite/gdb.server/inferior-args.exp | 157 +++++++++++ > gdb/unittests/remote-arg-selftests.c | 172 ++++++++++++ > gdbserver/linux-low.cc | 5 +- > gdbserver/linux-low.h | 2 +- > gdbserver/netbsd-low.cc | 6 +- > gdbserver/netbsd-low.h | 2 +- > gdbserver/server.cc | 74 +++-- > gdbserver/server.h | 5 + > gdbserver/target.h | 6 +- > gdbserver/win32-low.cc | 7 +- > gdbserver/win32-low.h | 2 +- > gdbsupport/Makefile.am | 1 + > gdbsupport/Makefile.in | 13 +- > gdbsupport/common-inferior.cc | 207 +++++++++----- > gdbsupport/common-inferior.h | 29 +- > gdbsupport/remote-args.cc | 260 ++++++++++++++++++ > gdbsupport/remote-args.h | 44 +++ > libiberty/argv.c | 8 +- > libiberty/testsuite/test-expandargv.c | 34 +++ > 36 files changed, 1927 insertions(+), 303 deletions(-) > create mode 100644 gdb/testsuite/gdb.base/maint-test-remote-args.exp > create mode 100644 gdb/testsuite/gdb.server/inferior-args.c > create mode 100644 gdb/testsuite/gdb.server/inferior-args.exp > create mode 100644 gdb/unittests/remote-arg-selftests.c > create mode 100644 gdbsupport/remote-args.cc > create mode 100644 gdbsupport/remote-args.h > > > base-commit: b7a5722ebdd24a0d15d56e96d30a649ea1d7b0ee
> From: Andrew Burgess <aburgess@redhat.com> > Cc: gdb-patches@sourceware.org, m.weghorn@posteo.de > Date: Sat, 20 Jan 2024 22:46:02 +0000 > > The question makes perfect sense. > > My hope is that the situation on Windows is no better or worse than it > ever was. > > I'm reluctant to start writing documentation saying feature X does or > does not work on Windows and why though as I don't have access to a > Windows machine on which I can test any of this. How about saying in the manual that for the embedded newlines to work, the inferior should be started via a Posix shell? This should be enough to hint Windows users this will not work for them. > I believe it's already possible today to inject newline characters via > the Python API. Maybe the window-nat.c code should be checking for > invalid characters and throw an error if the user tries to start an > inferior. If doing that produces some error message from the inferior or the APIs we use to start it, that should be enbough. > I agree that platform specific limitations should be documented. I'm > willing to help however I can to get that done. But I'm a little > uncomfortable trying to document something I can't test. I'll see if I > can source a Windows laptop, maybe I can build/test in that setup. Maybe someone else can test that, and we could then amend the documentation as needed? IOW, I see no reason to delay installing your patch series due to this. Thanks.
Eli Zaretskii <eliz@gnu.org> writes: >> From: Andrew Burgess <aburgess@redhat.com> >> Cc: gdb-patches@sourceware.org, m.weghorn@posteo.de >> Date: Sat, 20 Jan 2024 22:46:02 +0000 >> >> The question makes perfect sense. >> >> My hope is that the situation on Windows is no better or worse than it >> ever was. >> >> I'm reluctant to start writing documentation saying feature X does or >> does not work on Windows and why though as I don't have access to a >> Windows machine on which I can test any of this. > > How about saying in the manual that for the embedded newlines to work, > the inferior should be started via a Posix shell? This should be > enough to hint Windows users this will not work for them. That makes sense. I other feedback to address, so I'll add some suitable words in this area and draw your attention to it on V2. Thanks, Andrew > >> I believe it's already possible today to inject newline characters via >> the Python API. Maybe the window-nat.c code should be checking for >> invalid characters and throw an error if the user tries to start an >> inferior. > > If doing that produces some error message from the inferior or the > APIs we use to start it, that should be enbough. > >> I agree that platform specific limitations should be documented. I'm >> willing to help however I can to get that done. But I'm a little >> uncomfortable trying to document something I can't test. I'll see if I >> can source a Windows laptop, maybe I can build/test in that setup. > > Maybe someone else can test that, and we could then amend the > documentation as needed? IOW, I see no reason to delay installing > your patch series due to this. > > Thanks.