Improve Ada unchecked union type printing
authorTom Tromey <tromey@adacore.com>
Tue, 1 Feb 2022 16:46:43 +0000 (09:46 -0700)
committerTom Tromey <tromey@adacore.com>
Fri, 4 Feb 2022 15:19:42 +0000 (08:19 -0700)
commit480157863bac93e56f97f93d5d90818a47debbf6
treef7893f22b1fcadf4294d3d3c0e8483dd9064891c
parent2b531492447d10de27e6210117509097f6cbc9e0
Improve Ada unchecked union type printing

Currently, "ptype" of an Ada unchecked union may show a
compiler-generated wrapper structure in its output.  It's more
Ada-like to elide this structure, which is what this patch implements.
It turned out to be simplest to reuse a part of print_variant_clauses
for this.

As this is Ada-specific, and Joel already reviewed it internally, I am
going to check it in.
gdb/ada-typeprint.c
gdb/testsuite/gdb.ada/unchecked_union.exp
gdb/testsuite/gdb.ada/unchecked_union/unchecked_union.adb