binutils-gdb/gdb/dwarf2
Tom Tromey e26624c669 Be more careful when rewriting thick pointer array type
To handle thick pointers with -fgnat-encodings=minimal, gdb will
rewrite the underlying array type to remove the bounds.  However, if
the same DWARF type is used both for a thick pointer and for an
ordinary array, this will have the side effect of removing the bounds
from the array.  This breaks the printing of objects of this type.

This patch fixes the problem by copying the array type, its range, and
its bounds.

gdb/ChangeLog
2020-12-14  Tom Tromey  <tromey@adacore.com>

	* dwarf2/read.c (rewrite_array_type): New function.
        (quirk_ada_thick_pointer_struct): Use rewrite_array_type.

gdb/testsuite/ChangeLog
2020-12-14  Tom Tromey  <tromey@adacore.com>

	* gdb.dwarf2/ada-thick-pointer.exp: New file.
2020-12-14 07:42:23 -07:00
..
abbrev.c Remove objfile parameter from abbrev_table::read 2020-11-05 18:27:43 -07:00
abbrev.h Remove objfile parameter from abbrev_table::read 2020-11-05 18:27:43 -07:00
attribute.c gdb, gdbserver, gdbsupport: fix leading space vs tabs issues 2020-11-02 10:28:45 -05:00
attribute.h
comp-unit.c
comp-unit.h
die.h
dwz.c
dwz.h
expr.c gdb, gdbserver, gdbsupport: fix leading space vs tabs issues 2020-11-02 10:28:45 -05:00
expr.h
frame-tailcall.c
frame-tailcall.h
frame.c gdb: fix logic of find_comp_unit and set_comp_unit 2020-12-03 15:47:56 -05:00
frame.h
index-cache.c gdb, gdbserver, gdbsupport: fix leading space vs tabs issues 2020-11-02 10:28:45 -05:00
index-cache.h
index-common.c
index-common.h
index-write.c gdb, gdbserver, gdbsupport: fix leading space vs tabs issues 2020-11-02 10:28:45 -05:00
index-write.h
leb.c
leb.h Rewrite leb.h:read_3_bytes 2020-11-04 08:22:05 -07:00
line-header.c gdb, gdbserver, gdbsupport: fix leading space vs tabs issues 2020-11-02 10:28:45 -05:00
line-header.h
loc.c [gdb/symtab] Fix gdb.base/vla-optimized-out.exp with clang 2020-11-30 13:50:26 +01:00
loc.h
macro.c gdb, gdbserver, gdbsupport: fix leading space vs tabs issues 2020-11-02 10:28:45 -05:00
macro.h
read.c Be more careful when rewriting thick pointer array type 2020-12-14 07:42:23 -07:00
read.h gdb, gdbserver, gdbsupport: fix leading space vs tabs issues 2020-11-02 10:28:45 -05:00
section.c
section.h
stringify.c
stringify.h