binutils-gdb/libctf
Nick Alcock b09ad6eae9 libctf: do not print array declarators backwards
The CTF declarator stack code (used by ctf_type_aname() and thus
ultimately by ctf-dump.c and objdump --ctf etc) contains careful
code to prepend array declarators to the stack it's building up
on the grounds that array declarators are ordered inside out: only
they're not, they're ordered outside in.

This has led to our (non-upstreamed) compiler emitting array declarators
backwards for years, because it looks backwards in the dumper unless
it's actually emitted backwards into the CTF so the dumper can wrongly
reverse it again: but

  int[5][6]

should be an array of 6 int[5]s, not an array of 5 int[6]'s, so even if
the dumper gets it right, actual users calling ctf_array_info are going
to see a completely wrong type graph with the wrong bounds in it.

Fix trivial.

libctf/ChangeLog
2021-01-05  Nick Alcock  <nick.alcock@oracle.com>

	* ctf-decl.c (ctf_decl_push): Don't print array decls backwards.
2021-01-05 14:53:39 +00:00
..
.gitignore libctf: restructure error handling to reduce relocations 2020-07-22 17:57:20 +01:00
aclocal.m4 libctf, dedup: add new configure option --enable-libctf-hash-debugging 2020-07-22 18:02:19 +01:00
ChangeLog libctf: do not print array declarators backwards 2021-01-05 14:53:39 +00:00
ChangeLog-2020 ChangeLog rotation 2021-01-01 10:31:02 +10:30
config.h.in libctf, dedup: add deduplicator 2020-07-22 18:02:19 +01:00
configure In libctf, make AC_CONFIG_MACRO_DIR consistent with ACLOCAL_AMFLAGS 2021-01-04 11:08:05 +10:30
configure.ac In libctf, make AC_CONFIG_MACRO_DIR consistent with ACLOCAL_AMFLAGS 2021-01-04 11:08:05 +10:30
ctf-archive.c Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ctf-create.c Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ctf-decl.c libctf: do not print array declarators backwards 2021-01-05 14:53:39 +00:00
ctf-decls.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ctf-dedup.c Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ctf-dump.c Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ctf-endian.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ctf-error.c Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ctf-hash.c Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ctf-impl.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ctf-inlines.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ctf-intl.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ctf-labels.c Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ctf-link.c Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ctf-lookup.c Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ctf-open-bfd.c Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ctf-open.c Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ctf-qsort_r.c Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ctf-sha1.c Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ctf-sha1.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ctf-string.c Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ctf-subr.c Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ctf-types.c Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ctf-util.c Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
elf.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
libctf.ver Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
Makefile.am Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
Makefile.in Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
swap.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30