[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.