aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/testsuite/gdb.ada/catch_ex_std.exp2
-rw-r--r--gdb/testsuite/lib/ada.exp27
2 files changed, 26 insertions, 3 deletions
diff --git a/gdb/testsuite/gdb.ada/catch_ex_std.exp b/gdb/testsuite/gdb.ada/catch_ex_std.exp
index 3a2b10a..052d4d7 100644
--- a/gdb/testsuite/gdb.ada/catch_ex_std.exp
+++ b/gdb/testsuite/gdb.ada/catch_ex_std.exp
@@ -17,7 +17,7 @@ require allow_shlib_tests
load_lib "ada.exp"
-require allow_ada_tests gnat_runtime_has_debug_info
+require allow_ada_tests shared_gnat_runtime_has_debug_info
standard_ada_testfile foo
diff --git a/gdb/testsuite/lib/ada.exp b/gdb/testsuite/lib/ada.exp
index b4a93fa..d45d759 100644
--- a/gdb/testsuite/lib/ada.exp
+++ b/gdb/testsuite/lib/ada.exp
@@ -171,7 +171,7 @@ 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 {} {
+proc gnat_runtime_has_debug_info_1 { shared } {
if { ![allow_ada_tests] } {
return 0
}
@@ -181,7 +181,18 @@ gdb_caching_proc gnat_runtime_has_debug_info {} {
set src "$srcdir/lib/gnat_debug_info_test.adb"
set dst [standard_output_file "gnat_debug_info_test"]
- if { [gdb_compile_ada_1 $src $dst executable {debug}] != "" } {
+ set opts {}
+ lappend opts debug
+ if { $shared } {
+ # Make sure we link against the shared GNAT run time.
+ set gnatbind_options [list -bargs -shared -margs]
+
+ foreach option $gnatbind_options {
+ lappend opts [concat "additional_flags=" $option]
+ }
+ }
+
+ if { [gdb_compile_ada_1 $src $dst executable $opts] != "" } {
return 0
}
@@ -208,3 +219,15 @@ gdb_caching_proc gnat_runtime_has_debug_info {} {
return $has_debug_info
}
+
+# Return 1 if the static GNAT runtime appears to have debug info.
+
+gdb_caching_proc gnat_runtime_has_debug_info {} {
+ return [gnat_runtime_has_debug_info_1 0]
+}
+
+# Return 1 if the shared GNAT runtime appears to have debug info.
+
+gdb_caching_proc shared_gnat_runtime_has_debug_info {} {
+ return [gnat_runtime_has_debug_info_1 1]
+}