-# Copyright (C) 2010-2014 Free Software Foundation, Inc.
+# Copyright (C) 2010-2023 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 gdb-guile.exp
+require allow_guile_tests
+
# Start with a fresh gdb.
gdb_exit
gdb_start
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
# Test error while loading .scm.
-# Give the files a new name so we don't clobber the real one if
-# objfile == srcdir.
set remote_guile_file_1 [gdb_remote_download host \
- ${srcdir}/${subdir}/${testfile}-1.scm \
- ${subdir}/t-${testfile}-1.scm]
+ ${srcdir}/${subdir}/${testfile}-1.scm]
set remote_guile_file_2 [gdb_remote_download host \
- ${srcdir}/${subdir}/${testfile}-2.scm \
- ${subdir}/t-${testfile}-2.scm]
+ ${srcdir}/${subdir}/${testfile}-2.scm]
gdb_test "source $remote_guile_file_1" \
- "(ERROR: )?In procedure \[+\]: Wrong type: #f.*" \
+ "(ERROR: )?In procedure \[+\]: Wrong type.*: #f.*" \
"error loading scm file caught"
gdb_test "p 1" " = 1" "no delayed error"
"set print-stack to full, for backtrace test"
gdb_test "guile (define x (top-func 42))" \
- "Guile Backtrace:.*top-func 42.*middle-func 42.*bottom-func 42.*" \
+ "Guile Backtrace:.*top-func (42|_).*middle-func (42|_).*bottom-func (42|_).*" \
"backtrace printed"
# Verify gdb-specific errors are printed properly.