This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug build/21500] gdb sizeof(long int)=4 but gcc sizeof(long int)=8 on x86_64-pc-cygwin
- From: "palves at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Thu, 18 May 2017 12:29:15 +0000
- Subject: [Bug build/21500] gdb sizeof(long int)=4 but gcc sizeof(long int)=8 on x86_64-pc-cygwin
- Auto-submitted: auto-generated
- References: <bug-21500-4717@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=21500
Pedro Alves <palves at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |palves at redhat dot com
--- Comment #1 from Pedro Alves <palves at redhat dot com> ---
The problem is that while Cygwin and MinGW ABIs are different, GDB assumes
they're the same.
amd64-windows-tdep.c has:
/* On Windows, "long"s are only 32bit. */
set_gdbarch_long_bit (gdbarch, 32);
and this gdbarch is used by both Cygwin and MinGW.
We need a new "show osabi" value for "Windows" (MinGW), and then come up with
some way to figure out automatically from the program binary which of the ABIs
is in effect. Looking at the dll import list for the cygwin dll may be a good
enough approximation. (And add a hardcoded case for the cygwin dll itself.)
--
You are receiving this mail because:
You are on the CC list for the bug.