[Bug target/80777] gdb reports incorrect sizeof(long int) on x86_64-pc-cygwin

jrose.manila at gmail dot com gcc-bugzilla@gcc.gnu.org
Wed May 17 03:54:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80777

Julian Rose <jrose.manila at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|long int structure members  |gdb reports incorrect
                   |allocated incorrect 8 bytes |sizeof(long int) on
                   |                            |x86_64-pc-cygwin

--- Comment #3 from Julian Rose <jrose.manila at gmail dot com> ---
(In reply to Julian Rose from comment #2)
> Hei,
> 
> Yes I thought that initially too. But if you start gdb and print sizeof(long
> int) you get 4, not 8. 
> 
> $ gdb
> GNU gdb (GDB) (Cygwin 7.10.1-1) 7.10.1
> Copyright (C) 2015 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "x86_64-pc-cygwin".
> Type "show configuration" for configuration details.
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>.
> Find the GDB manual and other documentation resources online at:
> <http://www.gnu.org/software/gdb/documentation/>.
> For help, type "help".
> Type "apropos word" to search for commands related to "word".
> (gdb) print sizeof(long int)
> $1 = 4
> (gdb) print sizeof(unsigned long int)
> $2 = 4
> (gdb) print sizeof(long long int)
> $3 = 8
> (gdb) q

But I have changed the summary title of this bug to better reflect that a fault
appears to lie with the gdb build and not with gcc.

Would it be appropriate to close this bug report and raise a new one at
https://sourceware.org/bugzilla/?


More information about the Gcc-bugs mailing list