From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id F0AF93851C34 for ; Thu, 25 Jun 2020 19:35:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org F0AF93851C34 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Sandra_Loosemore@mentor.com IronPort-SDR: 11kA44E9H5sGKCUr9IaLbwJ4jHEuDK3xGPo91dedk9Sb6w1icVr1sl5yvZ4n1ar1taewfxRQsz TWSYP+TFoFWNK9BfkoXzzvWXrssys0AXG0iyP15ICruVVcj1X5o5cSygCccNIfD77LT2mzln+x sNsNn2MsfUj8vsQ8zNOoI7UDHKCdLvNUeFFMWTqHE6X6ftsUx8RLhMK9FJfUJnt8db+wkBb4MX zJ3uWz0Twz5L1fyASg9wxkx6GrnXtHo/GKbBBaMhnKjsapz7T6E5gHOV/zRWIQvlb9CSi/Nq1/ 3Gs= X-IronPort-AV: E=Sophos;i="5.75,280,1589270400"; d="scan'208";a="50326022" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 25 Jun 2020 11:35:52 -0800 IronPort-SDR: bEUZl4+3/ZLqN/NogXxHVXEANN1j6gEMdkJaxrK42B/ppxD0wwsVaSFOIooDksEwumt9qkatDa Ad9fnLaAro0QRlBATFQURXoJIsG/tqLkqbqkOSg+r0heN+YGWLDHfKLJZORVqPNLdeYHWH/cE8 yp+WYvjJ0CIz2TAlDK6GprHswEbPaI3c9Sp4uLwjQ38AaRg/YTlhgyiVANy+lIvXUY1H3ll0ty ITXMT0z2jgteOOh2XttGDc57nN7K3o7pSsxzyg6Nt8mh+vAYK1hpKyEcaQmuGShY2Migsa4GpU bj0= Subject: Re: [patch] gdb/testsuite: Fix POSIX-isms in gdb.base/shell.exp To: Eli Zaretskii CC: , References: <6bc2b01e-3807-77b9-7d1e-d7f6a7875e49@codesourcery.com> <83k0zvrpdk.fsf@gnu.org> From: Sandra Loosemore Message-ID: Date: Thu, 25 Jun 2020 13:35:45 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <83k0zvrpdk.fsf@gnu.org> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: svr-orw-mbx-04.mgc.mentorg.com (147.34.90.204) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 19:35:55 -0000 On 6/25/20 12:07 PM, Eli Zaretskii wrote: >> From: Sandra Loosemore >> Date: Thu, 25 Jun 2020 11:57:08 -0600 >> Cc: "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