mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-24 12:35:55 +08:00
b28a729db1
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.
7 lines
127 B
Ada
7 lines
127 B
Ada
with Ada.Text_IO;
|
|
|
|
procedure GNAT_Debug_Info_Test is
|
|
begin
|
|
Ada.Text_IO.Put_Line("Hello, world!");
|
|
end GNAT_Debug_Info_Test;
|