[PATCH 0/7] Add "Windows" OS ABI

Simon Marchi
2020-03-16T17:08:49Z

This patchset started out as a single patch to have the OS ABI Cygwin
applied to Windows x86-64 binaries, here:

https://sourceware.org/legacy-ml/gdb-patches/2020-03/msg00195.html

with the follow-up here:

https://sourceware.org/pipermail/gdb-patches/2020-March/000022.html

Eli pointed out that it doesn't make sense for binaries compilied with
MinGW to have the Cygwin OS ABI, that there should be separate OS ABIs
for Cygwin and non-Cygwin Windows binaries. This already came up in the
following bug report:

https://sourceware.org/bugzilla/show_bug.cgi?id=21500#add_comment

This patchset does a bit of refactor in that area. Most importantly, it:

- adds a "Windows" OS ABI
- makes GDB recognize the proper OS ABI (Cygwin or Windows) when
loading executables
- makes the builtin long type on Cygwin be 64 bits long

Simon Marchi (7):
gdb: recognize 64 bits Windows executables as Cygwin osabi
gdb: move enum gdb_osabi to osabi.h
gdb: add Windows OS ABI
gdb: rename i386-cygwin-tdep.c to i386-windows-tdep.c
gdb: rename content of i386-windows-tdep.c, cygwin to windows
gdb: select "Cygwin" OS ABI for Cygwin binaries
gdb: define builtin long type to be 64 bits on amd64 Cygwin

gdb/Makefile.in | 4 +-
gdb/amd64-windows-tdep.c | 41 ++++++-
gdb/configure.tgt | 10 +-
gdb/defs.h | 31 ------
gdb/gdbarch.h | 1 +
gdb/gdbarch.sh | 1 +
...i386-cygwin-tdep.c => i386-windows-tdep.c} | 45 +++++---
gdb/osabi.c | 1 +
gdb/osabi.h | 32 ++++++
gdb/windows-tdep.c | 101 ++++++++++++++++++
gdb/windows-tdep.h | 6 ++
11 files changed, 215 insertions(+), 58 deletions(-)
rename gdb/{i386-cygwin-tdep.c => i386-windows-tdep.c} (83%)

--
2.25.1