]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/testsuite: fix gdb.python/py-framefilter-invalidarg.exp with clang
authorGuinevere Larsen <blarsen@redhat.com>
Wed, 31 Jul 2024 14:13:25 +0000 (11:13 -0300)
committerGuinevere Larsen <blarsen@redhat.com>
Fri, 2 Aug 2024 12:06:26 +0000 (09:06 -0300)
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 <aburgess@redhat.com>
gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp

index 481eead4af26d03b3837c68f134d95c1fd575b09..0e78f8d7362061680dd61a20fc0826da0c57c75a 100644 (file)
@@ -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=<error reading variable: dwarf expression stack underflow>, argv=0x\[0-9a-f\]+\\) at py-framefilter-invalidarg.c:\[0-9\]+" "bt full with filters"
+gdb_test "bt" "niam \\(argc=<error reading variable: dwarf expression stack underflow>, argv=0x\[0-9a-f\]+\\) at \[^\r\n\]*py-framefilter-invalidarg.c:\[0-9\]+" "bt full with filters"