From: Eli Zaretskii <eliz@gnu.org>
To: Pedro Alves <pedro@palves.net>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 3/4] gdb: distinguish GNU and MSVC flavors of the Windows OS ABI
Date: Tue, 14 Jul 2026 14:57:57 +0300 [thread overview]
Message-ID: <86ik6hg4vu.fsf@gnu.org> (raw)
In-Reply-To: <20260714004507.1323332-4-pedro@palves.net> (message from Pedro Alves on Tue, 14 Jul 2026 01:45:06 +0100)
> From: Pedro Alves <pedro@palves.net>
> 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 <eliz@gnu.org>
next prev parent reply other threads:[~2026-07-14 11:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 0:45 [PATCH 0/4] Support the Windows/MSVC target in GDB Pedro Alves
2026-07-14 0:45 ` [PATCH 1/4] gdb: recognize *-*-windows* Windows targets Pedro Alves
2026-07-14 0:45 ` [PATCH 2/4] gdb: treat Windows host + Windows target as native Pedro Alves
2026-07-14 0:45 ` [PATCH 3/4] gdb: distinguish GNU and MSVC flavors of the Windows OS ABI Pedro Alves
2026-07-14 11:57 ` Eli Zaretskii [this message]
2026-07-14 22:15 ` Pedro Alves
2026-07-15 1:21 ` Simon Marchi
2026-07-15 11:18 ` Pedro Alves
2026-07-15 13:13 ` Simon Marchi
2026-07-15 14:10 ` Pedro Alves
2026-07-15 15:51 ` Simon Marchi
2026-07-15 11:43 ` Eli Zaretskii
2026-07-14 0:45 ` [PATCH 4/4] gdb: MSVC "long double" is a 64-bit double Pedro Alves
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=86ik6hg4vu.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=pedro@palves.net \
/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