From: Sandra Loosemore <sandra@codesourcery.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: <cbiesinger@google.com>, <gdb-patches@sourceware.org>
Subject: Re: [patch] gdb/testsuite: Fix POSIX-isms in gdb.base/shell.exp
Date: Thu, 25 Jun 2020 13:35:45 -0600 [thread overview]
Message-ID: <acb5bef8-4a8a-1f41-5b30-af613ead5d1b@codesourcery.com> (raw)
In-Reply-To: <83k0zvrpdk.fsf@gnu.org>
On 6/25/20 12:07 PM, Eli Zaretskii wrote:
>> From: Sandra Loosemore <sandra@codesourcery.com>
>> Date: Thu, 25 Jun 2020 11:57:08 -0600
>> Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
>>
>> Here is the documentation I found via Google for system() in the Windows
>> library:
>>
>> https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/system-wsystem?view=vs-2019
>>
>> "system uses the COMSPEC and PATH environment variables to locate the
>> command-interpreter file CMD.exe."
>>
>> I think the GDB manual doesn't accurately describe what GDB does in this
>> situation, BTW.
>
> Which part of the manual did you allude to here, and what is in your
> opinion inaccurate there?
https://sourceware.org/gdb/current/onlinedocs/gdb/Shell-Commands.html#Shell-Commands
"If it exists, the environment variable SHELL determines which shell to
run. Otherwise GDB uses the default shell (/bin/sh on Unix systems,
COMMAND.COM on MS-DOS, etc.). "
The SHELL environment variable is not consulted on Windows hosts. It
just uses whatever shell the system() call uses -- look at the
implementation of shell_escape in gdb/cli/cli-cmds.c.
The references to MS-DOS and COMMAND.COM are certainly bit-rotten.
COMMAND.COM was replaced by CMD.EXE in Windows NT, 25+ years ago now.
And do you really expect to be able to build a modern GDB to run on a
16-bit MS-DOS host? :-P
-Sandra
next prev parent reply other threads:[~2020-06-25 19:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-25 1:35 Sandra Loosemore
2020-06-25 17:32 ` Christian Biesinger
2020-06-25 17:57 ` Sandra Loosemore
2020-06-25 18:07 ` Eli Zaretskii
2020-06-25 19:35 ` Sandra Loosemore [this message]
2020-06-26 7:08 ` Eli Zaretskii
2020-06-26 22:22 ` Sandra Loosemore
2020-06-25 22:36 ` Christian Biesinger
2020-07-15 19:53 ` [ping] " Sandra Loosemore
2020-07-16 2:41 ` Simon Marchi
2020-07-16 16:44 ` Eli Zaretskii
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=acb5bef8-4a8a-1f41-5b30-af613ead5d1b@codesourcery.com \
--to=sandra@codesourcery.com \
--cc=cbiesinger@google.com \
--cc=eliz@gnu.org \
--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