[PATCH] Fix VLA printing for Ada

Tom Tromey tom@tromey.com
Wed May 8 16:05:00 GMT 2019


>>>>> "Tom" == Tom Tromey <tromey@adacore.com> writes:

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

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

Tom> This patch changes dwarf2_evaluate_property to ignore qualifiers when
Tom> comparing types.

Tom> Tested on x86-64 Fedora 29.

Tom> gdb/ChangeLog
Tom> 2019-04-24  Tom Tromey  <tromey@adacore.com>

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

Tom> gdb/testsuite/ChangeLog
Tom> 2019-04-24  Tom Tromey  <tromey@adacore.com>

Tom> 	* gdb.ada/vla.exp: New file.
Tom> 	* gdb.ada/vla/vla.adb: New file.

I'm going to check this in now.

Tom



More information about the Gdb-patches mailing list