From: Guinevere Larsen Date: Wed, 31 Jul 2024 14:13:25 +0000 (-0300) Subject: gdb/testsuite: fix gdb.python/py-framefilter-invalidarg.exp with clang X-Git-Tag: gdb-16-branchpoint~1242 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c8cfd51787ef7e224e274224a304e461754324d8;p=thirdparty%2Fbinutils-gdb.git 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 --- diff --git a/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp b/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp index 481eead4af2..0e78f8d7362 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"