[Bug build/25182] [9.1 Regression] gdb trunk fails to build on arm-linux-gnueabihf

wilson at gcc dot gnu.org sourceware-bugzilla@sourceware.org
Wed Nov 13 02:47:00 GMT 2019


Jim Wilson <wilson at gcc dot gnu.org> changed:

           What    |Removed                     |Added
                 CC|                            |wilson at gcc dot gnu.org

--- Comment #2 from Jim Wilson <wilson at gcc dot gnu.org> ---
I just got the same bug report via email for riscv32-linux.

The problem here is that general_symbol_info contains a LONGEST field, which
for most targets will be 8-bytes in size and require 8-byte alignment. 
However, i386 has a 32-bit ABI that gives long long types only 4 byte
alignment.  So the size of the structure will be 20 bytes for i386 and 24 bytes
for most all other 32-bit targets.  You could probably work around this by
using something like 16 + __alignof__ (LONGEST) to compute the structure size,
but that uses a GCC extension which may not work for other compilers.  If it is
possible for LONGEST to be a 32-bit type, then the structure would be 16 bytes.
 That would require something like 8 + sizeof (LONGEST) + __alignof__
(LONGEST).  Or just remove the static assert as suggested in the gerrit patch.

I haven't tried a build from scratch, so there may also be other related

You are receiving this mail because:
You are on the CC list for the bug.

More information about the Gdb-prs mailing list