-# Copyright 2008-2013 Free Software Foundation, Inc.
+# Copyright 2008-2020 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
load_lib "ada.exp"
standard_ada_testfile lang_switch
-set cfile "${testdir}/foo"
-set csrcfile ${srcdir}/${subdir}/${cfile}.c
+set cfile "foo"
+set csrcfile ${srcdir}/${subdir}/${testdir}/${cfile}.c
set cobject [standard_output_file ${cfile}.o]
gdb_compile "${csrcfile}" "${cobject}" object [list debug]
# Now, make sure that the language doesn't get automatically switched
# if the current language is not "auto".
gdb_test "set lang c"
+# This gives different output with -fgnat-encodings=minimal and
+# -fgnat-encodings=all, but since we don't care so much about the
+# precise details here, we just accept anything.
gdb_test "bt" \
- ".*#1.*lang_switch\\.ada_procedure\\s*\\(msg=(@$hex: +)?{.*\\).*" \
+ ".*#1.*lang_switch\\.ada_procedure\\s*\\(msg=(@$hex: +)?.*\\).*" \
"backtrace with lang set to C"