gdb/testsuite: add a clang XFAIL to gdb.python/py-watchpoint.exp

Clang doesn't use CFA information for variable locations. This makes it
so software breakpoints get a false hit when rbp gets popped, causing
a FAIL in gdb.python/py-watchpoint.exp. Since this is nothing wrong with
GDB itself, add an xfail to reduce noise.

Approved-By: Tom Tromey <tom@tromey.com>
This commit is contained in:
Guinevere Larsen
2023-10-25 10:44:19 +02:00
parent f603d794f9
commit def86538a4

View File

@@ -42,5 +42,20 @@ gdb_test "source $pyfile" ".*Python script imported.*" \
"import python scripts"
gdb_test "python print(len(gdb.breakpoints()))" "2" "check modified BP count"
gdb_test "continue" ".*" "run until program stops"
gdb_test "python print(bpt.n)" "5" "check watchpoint hits"
# Clang doesn't use CFA location information for variables (despite generating
# them), meaning when the instruction "pop rbp" happens, we get a false hit
# on the watchpoint. for more details, see:
# https://github.com/llvm/llvm-project/issues/64390
gdb_test_multiple "python print(bpt.n)" "check watchpoint hits" {
-re -wrap "5" {
pass $gdb_test_name
}
-re -wrap "6" {
if {[test_compiler_info "clang-*"]} {
xfail "$gdb_test_name (clang issue 64390)"
} else {
fail $gdb_test_name
}
}
}
gdb_test "python print(len(gdb.breakpoints()))" "1" "check BP count"