This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]