+2020-02-18 Tom de Vries <tdevries@suse.de>
+
+ * lib/ada.exp (gdb_compile_ada_1): Factor out of ...
+ (gdb_compile_ada): ... here.
+ (gnat_runtime_has_debug_info): Remove fail call for gdb_compile_ada
+ failure. Use gdb_compile_ada_1 instead of gdb_compile_ada.
+
2020-02-14 Tom Tromey <tom@tromey.com>
* lib/gdbserver-support.exp (find_gdbserver): Find gdbserver in
return -options $options $result
}
-# Compile some Ada code.
+# Compile some Ada code. Return "" if the compile was successful.
-proc gdb_compile_ada {source dest type options} {
+proc gdb_compile_ada_1 {source dest type options} {
set srcdir [file dirname $source]
set gprdir [file dirname $srcdir]
# We therefore simply check whether the dest file has been created
# or not. Unless not present, the build has succeeded.
if [file exists $dest] { set result "" }
+ return $result
+}
+
+# Compile some Ada code. Generate "PASS: foo.exp: compilation SOURCE" if the
+# compile was successful.
+
+proc gdb_compile_ada {source dest type options} {
+ set result [gdb_compile_ada_1 $source $dest $type $options]
+
gdb_compile_test $source $result
return $result
}
set src "$srcdir/lib/gnat_debug_info_test.adb"
set dst [standard_output_file "gnat_debug_info_test"]
- if { [gdb_compile_ada $src $dst executable {debug}] != "" } {
- fail "failed to compile gnat-debug-info test binary"
+ if { [gdb_compile_ada_1 $src $dst executable {debug}] != "" } {
return 0
}