From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id mV6fD2EkVmqEugcAWB0awg (envelope-from ) for ; Tue, 14 Jul 2026 07:58:25 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=gnu.org header.i=@gnu.org header.a=rsa-sha256 header.s=fencepost-gnu-org header.b=cBxQe3a8; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 2A71D1E033; Tue, 14 Jul 2026 07:58:25 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 11E971E033 for ; Tue, 14 Jul 2026 07:58:24 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7A1F94BA2E1B for ; Tue, 14 Jul 2026 11:58:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7A1F94BA2E1B Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gnu.org header.i=@gnu.org header.a=rsa-sha256 header.s=fencepost-gnu-org header.b=cBxQe3a8 Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 1701F4BA2E08 for ; Tue, 14 Jul 2026 11:58:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1701F4BA2E08 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1701F4BA2E08 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2001:470:142:3::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784030280; cv=none; b=HLzTuTuQUBSDcM+GBkoCm++jwceAEMm9cdms3YOxmuK8LAvAZPoCbkR0T+1t+iorcCRXdylJSOwYbp434NMfUo4TTB6krGSwLIb7nJVYKD+4k9ljSUwkjkvrYw//IKqR8vLSTmi7M6kQZVZE8WKG1zPh1oUjIId9ZJv/asYwfo4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784030280; c=relaxed/simple; bh=bLnFR8iE5pwujvZuYW5IqeaAZM26LQGd/Vc6xvtS0hk=; h=DKIM-Signature:Date:Message-Id:From:To:Subject; b=orPyxbNm9f6mh8vghRnbR/lQAKaR9O/wX5eukk6Kgj/5gaazzC7lcRZ7jg87KziEcCOg1G0J4oSnFhT03uDhNED/AobFIR/tZs8YcG3qO1Od9bBp+Nhhr7Ik6Ofoilyfs9idG8BrOVPKidVsoGFf6sCGP+d3eJfd9s9PiRO29Vg= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gnu.org header.i=@gnu.org header.a=rsa-sha256 header.s=fencepost-gnu-org header.b=cBxQe3a8 DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1701F4BA2E08 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wjblv-0006mB-C5; Tue, 14 Jul 2026 07:57:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=AgsZd9GIZMNEKdXAeu/OFkUs1lPri+Az3EWSReDh8J0=; b=cBxQe3a8fI8r 4FAVYSuZLPNdpKPYq798xnzkeP5QA7vSRpNeyaDmFJlgwtvkwjkxtBpaQyvWccU1N4UdG9MRwvy85 tXzwjL+3NiNjM4cdG3Xkbxf9dOBUURHVbi8OX+QHlHoKgtapBofGswwFhr6VXTyKt6ouW29CmkLEz nYF2IKFFqsZkxbr0LDmNqs3EA1k07DXPNeDePxabZmpVxaHAyDwjP1Hj5vBQDTnpalaJySV2D/nVI 3YbFnCrwN6xjmYS9VEm/gyiAtmlgXNI0j435nTHrarh0835bKz0OW1fvA6FZkk2LkRmpX/jkB841J OlvVYtBMkPetx4KSt3CTBg==; Date: Tue, 14 Jul 2026 14:57:57 +0300 Message-Id: <86ik6hg4vu.fsf@gnu.org> From: Eli Zaretskii To: Pedro Alves Cc: gdb-patches@sourceware.org In-Reply-To: <20260714004507.1323332-4-pedro@palves.net> (message from Pedro Alves on Tue, 14 Jul 2026 01:45:06 +0100) Subject: Re: [PATCH 3/4] gdb: distinguish GNU and MSVC flavors of the Windows OS ABI References: <20260714004507.1323332-1-pedro@palves.net> <20260714004507.1323332-4-pedro@palves.net> X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org > From: Pedro Alves > Date: Tue, 14 Jul 2026 01:45:06 +0100 > > gdb/NEWS | 16 ++++++++++++++++ > gdb/aarch64-windows-tdep.c | 5 ++++- > gdb/amd64-windows-tdep.c | 6 +++++- > gdb/arch-utils.c | 18 ++++++++++++++++++ > gdb/configure.tgt | 8 ++++++-- > gdb/doc/gdb.texinfo | 15 +++++++++++++++ > gdb/i386-windows-tdep.c | 6 +++++- > gdb/osabi.c | 32 +++++++++++++++++++++++++++----- > gdb/osabi.h | 8 ++++++++ > gdb/windows-tdep.h | 5 +++-- > gdbsupport/osabi.def | 2 ++ > 11 files changed, 109 insertions(+), 12 deletions(-) Thanks. > diff --git a/gdb/NEWS b/gdb/NEWS > index ec9b5a33787..cf3948f87e4 100644 > --- a/gdb/NEWS > +++ b/gdb/NEWS > @@ -103,6 +103,16 @@ > everywhere GDB shows a filename/dirname: source filenames, > executable filename, shared libraries, the cd/pwd commands, etc. > > +* GDB now distinguishes between the GNU (MinGW) and MSVC Windows ABIs. > + > + The "set osabi" command accepts two new values, "Windows-GNU" and > + "Windows-MSVC". The existing "Windows" value continues to work and > + now means "let GDB pick the flavor": GDB uses the configured default > + OS ABI (from --target) when that is a Windows flavor, and otherwise > + assumes the GNU flavor. E.g., --target=x86_64-pc-windows-msvc > + defaults to the MSVC ABI, and --target=x86_64-w64-mingw32 defaults > + to GNU ABI. See "New targets" entry below. This part is okay, but I think it would make sense to tell which compilers produce binaries of Windows-MSVC ABI. E.g., does the above mean that GDB will now be able to debug programs produces by MSVC, including use of the PDB debug data files? Also, you only mention the 64-bit host and target triplets, but does that mean this is limited to 64-bit Windows programs? > --- a/gdb/doc/gdb.texinfo > +++ b/gdb/doc/gdb.texinfo > @@ -28680,6 +28680,15 @@ When @value{GDBN} is debugging the AArch64 architecture, it provides a > @code{longjmp} when debugging binaries that use the @sc{newlib} C library. > The ``Newlib'' OS ABI can be selected by @code{set osabi Newlib}. > > +On Windows, the GNU (MinGW) and MSVC toolchains use different ABIs. > +For example, they disagree on the size of @code{long double}. > +@value{GDBN} provides a separate OS ABI for each: ``Windows-GNU'' and > +``Windows-MSVC''. A generic ``Windows'' OS ABI is also available. It > +does not select a flavor directly, but asks @value{GDBN} to pick one: > +@value{GDBN} uses the OS ABI it was configured with by default (from > +the @code{--target} configure option) when that is a Windows flavor, > +and otherwise assumes the GNU flavor. Should we have a cross-reference here to the "Configure Options" node? Reviewed-By: Eli Zaretskii