[pushed,gdb/testsuite] Fix gnat_runtime_has_debug_info for remote host

Message ID 20230327211155.13909-1-tdevries@suse.de
State Committed
Headers
Series [pushed,gdb/testsuite] Fix gnat_runtime_has_debug_info for remote host |

Commit Message

Tom de Vries March 27, 2023, 9:11 p.m. UTC
  Fix gnat_runtime_has_debug_info for remote host by checking for
allow_ada_tests.

This fixes an error for test-case gdb.testsuite/gdb-caching-proc.exp and
remote host.

Tested on x86_64-linux.
---
 gdb/testsuite/lib/ada.exp | 4 ++++
 1 file changed, 4 insertions(+)


base-commit: 5b9e851408c1933ddb45390768421cd0b2918637
  

Patch

diff --git a/gdb/testsuite/lib/ada.exp b/gdb/testsuite/lib/ada.exp
index 02a5d1ad271..4395f31ad94 100644
--- a/gdb/testsuite/lib/ada.exp
+++ b/gdb/testsuite/lib/ada.exp
@@ -167,6 +167,10 @@  proc gnatmake_version_at_least { major } {
 # Return 1 if the GNAT runtime appears to have debug info.
 
 gdb_caching_proc gnat_runtime_has_debug_info {} {
+    if { ![allow_ada_tests] } {
+	return 0
+    }
+
     global srcdir
 
     set src "$srcdir/lib/gnat_debug_info_test.adb"