]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
aarch64: improve debuggability on array of enum
authorMatthieu Longo <matthieu.longo@arm.com>
Fri, 7 Jun 2024 15:59:57 +0000 (16:59 +0100)
committerMatthieu Longo <matthieu.longo@arm.com>
Fri, 8 Nov 2024 11:35:46 +0000 (11:35 +0000)
commit46dace1933f6e9c367edb97c60c23bdac9d040b3
tree9ed70b913ab4106f56e4d6662db9476fab7db286
parentc703d0aff58d887a54264445321af0fda032550e
aarch64: improve debuggability on array of enum

The current space optmization on enum aarch64_opn_qualifier forced its
encoding using an unsigned char. This "hard-coded" optimization has the
bad consequence of making the array of such enums being completely
unreadable when debugging with GDB because the enum type is lost along
the way.
Keeping this space optimization, and the enum type as well, is possible
when the declaration of the enum is tagged with attribute((packed)).
attribute((packed)) is a GNU extension, and is wrapped in the macro
ATTRIBUTE_PACKED (defined in ansidecl.h), and should be used instead.
include/opcode/aarch64.h
opcodes/aarch64-opc.c