diff options
author | Guinevere Larsen <blarsen@redhat.com> | 2023-10-25 10:44:19 +0200 |
---|---|---|
committer | Guinevere Larsen <blarsen@redhat.com> | 2023-10-25 18:24:13 +0200 |
commit | def86538a46f7ce6fbb215cfb184e23015b5d538 (patch) | |
tree | 638b99832b5e74b551acc3d817ce218a9c612084 | |
parent | f603d794f94cb8e6ffb86e0eb78b739788b448b6 (diff) | |
download | gdb-def86538a46f7ce6fbb215cfb184e23015b5d538.zip gdb-def86538a46f7ce6fbb215cfb184e23015b5d538.tar.gz gdb-def86538a46f7ce6fbb215cfb184e23015b5d538.tar.bz2 |
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>
-rw-r--r-- | gdb/testsuite/gdb.python/py-watchpoint.exp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.python/py-watchpoint.exp b/gdb/testsuite/gdb.python/py-watchpoint.exp index 9a6ef44..5ff6128 100644 --- a/gdb/testsuite/gdb.python/py-watchpoint.exp +++ b/gdb/testsuite/gdb.python/py-watchpoint.exp @@ -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" |