From c8cfd51787ef7e224e274224a304e461754324d8 Mon Sep 17 00:00:00 2001 From: Guinevere Larsen Date: Wed, 31 Jul 2024 11:13:25 -0300 Subject: gdb/testsuite: fix gdb.python/py-framefilter-invalidarg.exp with clang The final test of gdb.python/py-framefilter-invalidarg.exp expected that the the backtrace only printed the source file name. However, when using clang, gdb will always print the full path to the file, which would cause the test to fail. This commit introduces a regexp that optionally matches paths, preprended to the file name, which fixes the clang failure without introducing gcc failures. Approved-By: Andrew Burgess --- gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp b/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp index 481eead..0e78f8d 100644 --- a/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp +++ b/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp @@ -58,4 +58,4 @@ set remote_python_file [gdb_remote_download host \ ${srcdir}/${subdir}/${testfile}.py] gdb_test_no_output "source ${remote_python_file}" "load python file" -gdb_test "bt" "niam \\(argc=, argv=0x\[0-9a-f\]+\\) at py-framefilter-invalidarg.c:\[0-9\]+" "bt full with filters" +gdb_test "bt" "niam \\(argc=, argv=0x\[0-9a-f\]+\\) at \[^\r\n\]*py-framefilter-invalidarg.c:\[0-9\]+" "bt full with filters" -- cgit v1.1