[Bug build/21500] gdb sizeof(long int)=4 but gcc sizeof(long int)=8 on x86_64-pc-cygwin

palves at redhat dot com sourceware-bugzilla@sourceware.org
Thu May 18 12:29:00 GMT 2017


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.


More information about the Gdb-prs mailing list