mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2026-08-27 00:26:02 -04:00
This patch removes the constraint that a CTF_F_ARRNELEMS flag has to be present in order to reverse the elements of an array when dumping. The flag was never added to GCC, and having this requirement causes more problems than it solves. A quick recap of the issue: Given an array int foo[1][2][3], the expected graph is: int foo[1][2][3] -> int foo[2][3] -> int foo[3] -> int foo Prior to GCC PR114186, the emitted graph would be: int foo[1][2][3] -> int foo[1][2] -> int foo[1] -> int foo Following GCC PR114186, before the libctf fix, the output was: int foo[3][2][1] -> int foo[3][2] -> int foo[3] -> int foo So the underlying type graph was correct, but the ordering of elements was incorrect. With this fix, we emit correct ordering of the type graph, with no requirements for the compiler to signal that it has GCC PR114186. include/ * ctf.h (CTF_F_ARRNELEMS): Delete. (CTF_F_MAX): Adjust. libctf/ * ctf-decl.c (ctf_decl_push): Act as if CTF_F_ARRNELEMS is always set. * ctf-dump.c (ctf_dump_header): No longer dump its value. * testsuite/libctf-lookup/multidim-array.c: No longer detect compilers not emitting this flag (none do). |
||
|---|---|---|
| .. | ||
| config | ||
| lib | ||
| libctf-lookup | ||
| libctf-regression | ||
| libctf-writable | ||