Fix VLA printing for Ada
authorTom Tromey <tromey@adacore.com>
Wed, 24 Apr 2019 18:50:04 +0000 (12:50 -0600)
committerTom Tromey <tromey@adacore.com>
Wed, 8 May 2019 16:12:37 +0000 (10:12 -0600)
commit988915ee7b880ff059f849893b71118d9bd2c4fc
tree3977c74edfe1781a74796682348a6e4f5604e58a
parent2379f9c475505ecedc97607b39af7184bd67aa88
Fix VLA printing for Ada

While looking at a different Ada problem, I found that printing a
record containing a VLA did not work properly.

I tracked the problem down to dwarf2_evaluate_property trying, and
failing, to compare two types that differed only in qualifiers.

This patch changes dwarf2_evaluate_property to ignore qualifiers when
comparing types.

Tested on x86-64 Fedora 29.

gdb/ChangeLog
2019-05-08  Tom Tromey  <tromey@adacore.com>

* dwarf2loc.c (dwarf2_evaluate_property) <PROP_ADDR_OFFSET>:
Compare main types.

gdb/testsuite/ChangeLog
2019-05-08  Tom Tromey  <tromey@adacore.com>

* gdb.ada/vla.exp: New file.
* gdb.ada/vla/vla.adb: New file.
gdb/ChangeLog
gdb/dwarf2loc.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.ada/vla.exp [new file with mode: 0644]
gdb/testsuite/gdb.ada/vla/vla.adb [new file with mode: 0644]