Commit d8f62e84 authored by Tom Tromey's avatar Tom Tromey
Browse files

Recognize names of array types

With -fgnat-encodings=minimal, Gnat will emit DW_TAG_array_type that
has a name -- and this is the only time the name is emitted for the
type.  (For comparison, in C a typedef would be emitted in this
situation.)

This patch changes gdb to recognize the name of an array type.  This
is limited to Ada, to avoid any potential problems if some rogue DWARF
happens to name an array type in some other language, and to avoid
loading unnecessary partial DIEs.

gdb/ChangeLog
2020-11-04  Tom Tromey  <tromey@adacore.com>

	* dwarf2/read.c (add_partial_symbol, process_die):
	Handle DW_TAG_array_type.
	(is_type_tag_for_partial): Add "lang" parameter.
	(load_partial_dies, new_symbol): Handle DW_TAG_array_type.

gdb/testsuite/ChangeLog
2020-11-04  Tom Tromey  <tromey@adacore.com>

	* gdb.ada/tick_length_array_enum_idx.exp: Add ptype test.
	* gdb.ada/tick_length_array_enum_idx/foo_n207_004.adb
	(PT_Full): New variable.
	* gdb.ada/tick_length_array_enum_idx/pck.adb
	(Full_PT): New type.
parent 7ff5b937
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment