From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sa-prd-fep-042.btinternet.com (mailomta4-sa.btinternet.com [213.120.69.10]) by sourceware.org (Postfix) with ESMTPS id 599E23959CA2 for ; Tue, 10 Mar 2020 15:33:03 +0000 (GMT) Received: from sa-prd-rgout-001.btmx-prd.synchronoss.net ([10.2.38.4]) by sa-prd-fep-043.btinternet.com with ESMTP id <20200309153953.BUGR29268.sa-prd-fep-043.btinternet.com@sa-prd-rgout-001.btmx-prd.synchronoss.net> for ; Mon, 9 Mar 2020 15:39:53 +0000 Authentication-Results: btinternet.com; auth=pass (PLAIN) smtp.auth=jonturney@btinternet.com X-Originating-IP: [86.141.128.2] X-OWM-Source-IP: 86.141.128.2 (GB) X-OWM-Env-Sender: jonturney@btinternet.com X-VadeSecure-score: verdict=clean score=0/300, class=clean X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgedugedruddukedgkedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuueftkffvkffujffvgffngfevqffopdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurhepuffvfhfhkffffgggjggtgfesthejredttdefjeenucfhrhhomheplfhonhcuvfhurhhnvgihuceojhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukheqnecuffhomhgrihhnpehsohhurhgtvgifrghrvgdrohhrghdptgihghifihhnrdgtohhmnecukfhppeekiedrudeguddruddvkedrvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopegludelvddrudeikedruddruddtiegnpdhinhgvthepkeeirddugedurdduvdekrddvpdhmrghilhhfrhhomhepoehjohhnrdhtuhhrnhgvhiesughrohhnvggtohguvgdrohhrghdruhhkqecuuefqffgjpeekuefkvffokffogfdprhgtphhtthhopeeoghgusgdqphgrthgthhgvshesshhouhhrtggvfigrrhgvrdhorhhgqe X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean Received: from [192.168.1.106] (86.141.128.2) by sa-prd-rgout-001.btmx-prd.synchronoss.net (5.8.340) (authenticated as jonturney@btinternet.com) id 5E3A24110527A49D for gdb-patches@sourceware.org; Mon, 9 Mar 2020 15:39:53 +0000 Subject: Re: [PATCH] gdb: recognize 64 bits Windows executables as Cygwin osabi To: gdb-patches@sourceware.org References: <20200307041742.31158-1-simon.marchi@efficios.com> <83zhcsa8my.fsf@gnu.org> <4bd435cd-b06d-e0fc-70a9-9a8a18d73987@efficios.com> <835zfg9hz5.fsf@gnu.org> From: Jon Turney Message-ID: Date: Mon, 9 Mar 2020 15:39:53 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <835zfg9hz5.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, FORGED_SPF_HELO, RCVD_IN_DNSWL_LOW, SPF_HELO_PASS, SPF_NONE autolearn=no 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: Tue, 10 Mar 2020 15:33:04 -0000 On 07/03/2020 17:45, Eli Zaretskii wrote: >> Cc: gdb-patches@sourceware.org >> From: Simon Marchi >> Date: Sat, 7 Mar 2020 11:51:08 -0500 >> >> https://sourceware.org/ml/gdb-patches/2020-03/msg00151.html >> >> Currently, loading the 64-bits .exe in a GNU/Linux-hosted GDB ends up calling >> the svr4 libraries code, which is plain wrong. By using the Cygwin osabi, >> at least the right shared libraries functions are used. >> >> I agree with what you suggest below, but I think that the current patch is >> still a step forward and improves things. > > I agree. I just think we can do better. > >> So what we can do is add an "MS-Windows" osabi and make "Cygwin" and >> "MS-Windows" functionally equivalent. Any "pei-i386" or "pei-x86-64" >> executable would be detected as "MS-Windows". I believe this suggestion for x86_64 is wrong, in the other direction: x86_64 Cygwin is LP64, but Windows is LLP64 (See also table in [1]) (This is handled incorrectly in Cygwin at the moment, e.g. in our build of gdb 'print sizeof(long)' returns 4) There was some discussion that these need to be separate osabis previously, I think. [1] https://cygwin.com/faq.html#faq.programming.64bitporting > That's fine with me, and IMO will be more accurate than calling them > all "Cygwin", since Cygwin programs are just a peculiar kind of > Windows executables. > >> If we do such a change, I would like it to be done on top of the current >> patch, as to not mix concerns. > > I'm okay with that, thanks.