[PATCH] Adjust test gdb.ada/ptype_tagged_param.exp for when GNAT runtime does not...
authorSimon Marchi <simon.marchi@polymtl.ca>
Sat, 28 Dec 2019 01:58:42 +0000 (20:58 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Sat, 28 Dec 2019 02:02:35 +0000 (21:02 -0500)
commitb28a729db188235ce61f3a03e35a27f9427af12e
tree4048192488afe36e73036d6fea7f46cb1ecfec4c
parent1ddaf334cfca50957fe33a6b23fab79a85ea1655
[PATCH] Adjust test gdb.ada/ptype_tagged_param.exp for when GNAT runtime does not have debug info

This test verifies that GDB correctly identifies the run-time type of
"s" as being the type "Circle".  However, that can only be done
correctly if the GNAT runtime has been compiled and shipped with debug
information, so that GDB can poke in its internal data structures.
Currently the test fails when when running against a GNAT runtime
without debug info.  This is the case, for example, on Arch Linux using
the distribution package.

This patch adds a helper in lib/ada.exp to check whether the GNAT
runtime has debug info or not.  It then uses it in
gdb.ada/ptype_tagged_param.exp to expect a different result, depending
on whether we have debug info or not in the runtime.

At first, I made it so we would XFAIL the test, in the absence of debug
info, but then I thought that we might as well test for the output we
expect in the absence of debug info instead.

gdb/testsuite/ChangeLog:

* lib/ada.exp (gnat_runtime_has_debug_info): New proc.
* lib/gnat_debug_info_test.adb: New file.
* gdb.ada/ptype_tagged_param.exp: Use
gnat_runtime_has_debug_info, expect a different output if
runtime does not have debug info.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.ada/ptype_tagged_param.exp
gdb/testsuite/lib/ada.exp
gdb/testsuite/lib/gnat_debug_info_test.adb [new file with mode: 0644]
This page took 0.036117 seconds and 4 git commands to generate.