[gdb/testsuite] Add shared_gnat_runtime_has_debug_info
authorTom de Vries <tdevries@suse.de>
Mon, 19 Jun 2023 09:47:29 +0000 (11:47 +0200)
committerTom de Vries <tdevries@suse.de>
Mon, 19 Jun 2023 09:47:29 +0000 (11:47 +0200)
commit319626ca736d15836f5381bdc9f0e37396f61b15
treebcfeeb1c7e3ff75e6d66025262ac1d6d92bd06cf
parentba769bb0e6fdf5b4c55577b068b93adf2f6d1333
[gdb/testsuite] Add shared_gnat_runtime_has_debug_info

Test-case gdb.ada/catch_ex_std.exp passes for me with package
libada7-debuginfo installed, but after removing it I get:
...
(gdb) catch exception some_kind_of_error^M
Your Ada runtime appears to be missing some debugging information.^M
Cannot insert Ada exception catchpoint in this configuration.^M
(gdb) FAIL: gdb.ada/catch_ex_std.exp: catch exception some_kind_of_error
...

The test-case contains a require gnat_runtime_has_debug_info to deal with
this, but the problem is that this checks the static gnat runtime, while this
test-case uses the shared one.

Fix this by introducing shared_gnat_runtime_has_debug_info, and requiring that
one instead.

Tested on x86_64-linux.

PR testsuite/30094
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30094
gdb/testsuite/gdb.ada/catch_ex_std.exp
gdb/testsuite/lib/ada.exp