aboutsummaryrefslogtreecommitdiff
path: root/gdb/ChangeLog
diff options
context:
space:
mode:
authorPedro Alves <pedro@palves.net>2021-06-04 21:44:36 +0100
committerPedro Alves <pedro@palves.net>2021-06-07 23:22:07 +0100
commitd8ca8e9facb184d67ce1aca9196ed8446e7e2a09 (patch)
tree70da82003101080ff658a50b45fdd91c41bc1803 /gdb/ChangeLog
parentcfc75767cc276fb9e10c8239bb23c800a7f07e47 (diff)
downloadfsf-binutils-gdb-d8ca8e9facb184d67ce1aca9196ed8446e7e2a09.zip
fsf-binutils-gdb-d8ca8e9facb184d67ce1aca9196ed8446e7e2a09.tar.gz
fsf-binutils-gdb-d8ca8e9facb184d67ce1aca9196ed8446e7e2a09.tar.bz2
nat/amd64-linux-siginfo.c: Move align attribute from typedef to struct
Compiling GDB with current git Clang (future 13) fails with (among other problems), this issue: $ make nat/amd64-linux-siginfo.o CXX nat/amd64-linux-siginfo.o src/gdb/nat/amd64-linux-siginfo.c:590:35: warning: passing 4-byte aligned argument to 8-byte aligned parameter 1 of 'compat_x32_siginfo_from_siginfo' may result in an unaligned pointer access [-Walign-mismatch] compat_x32_siginfo_from_siginfo ((struct compat_x32_siginfo *) inf, ^ 1 warning generated. The problem is that: - The flagged code is casting to "struct compat_x32_siginfo" pointer directly instead of to a pointer to the compat_x32_siginfo_t typedef. The called function is declared with a compat_x32_siginfo_t typedef pointer parameter. - Only the typedef has the __aligned__ attribute. Fix this by moving the attribute to the struct, so both struct and typedef have the same alignment. The next patch removes the typedefs. gdb/ChangeLog: yyyy-mm-dd Pedro Alves <pedro@palves.net> * nat/amd64-linux-siginfo.c (compat_x32_siginfo_t): Move __attribute__ __aligned__ from the typedef to the struct.
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r--gdb/ChangeLog5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index aa8bcb9..4859531 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2021-06-07 Pedro Alves <pedro@palves.net>
+
+ * nat/amd64-linux-siginfo.c (compat_x32_siginfo_t): Move
+ __attribute__ __aligned__ from the typedef to the struct.
+
2021-06-07 Andrew Burgess <andrew.burgess@embecosm.com>
PR gdb/27847