From: Yao Qi Date: Fri, 27 Nov 2015 14:21:47 +0000 (+0000) Subject: Allow multiple occurrences of the frames-invalid annotation in gdb.cp/annota2.exp X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=88e8ec1b3e372dc1ea1cd0be44c59ca7760e9008;p=binutils-gdb.git Allow multiple occurrences of the frames-invalid annotation in gdb.cp/annota2.exp Hi, I see one fail on aarch64-linux testing, FAIL: gdb.cp/annota2.exp: watch triggered on a.x (timeout) because GDB prints two frames-invalid annotation but the test expects only one. next^M ^M ^Z^Zpost-prompt^M ^M ^Z^Zstarting^M ^M ^Z^Zframes-invalid^M ^M ^Z^Zframes-invalid^M ^M Note I also see the fail on Debian-s390x-m64 too. https://sourceware.org/ml/gdb-testers/2015-q4/msg07291.html The test shouldn't only expect one frames-invalid annotation, because there can be multiple times of stop/resume before the user visible stop. Ulrich did something similar before https://www.sourceware.org/ml/gdb-patches/2009-06/msg00118.html This patch only changes ${frames_invalid} to \(${frames_invalid}\)* in the regexp pattern. The patch below fixes the fail on aarch64-linux. gdb/testsuite: 2015-11-27 Yao Qi * gdb.cp/annota2.exp: Allow multiple occurrences of the frames-invalid annotation. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index f03b3c17440..bff404d5cf7 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-11-27 Yao Qi + + * gdb.cp/annota2.exp: Allow multiple occurrences of the + frames-invalid annotation. + 2015-11-27 Yao Qi * gdb.cp/annota2.exp: Use ${frames_invalid}. diff --git a/gdb/testsuite/gdb.cp/annota2.exp b/gdb/testsuite/gdb.cp/annota2.exp index 041f65df2f4..ed3fd1b07bf 100644 --- a/gdb/testsuite/gdb.cp/annota2.exp +++ b/gdb/testsuite/gdb.cp/annota2.exp @@ -162,7 +162,7 @@ gdb_test_multiple "watch a.x" "set watch on a.x" { # annotate-watchpoint # gdb_test_multiple "next" "watch triggered on a.x" { - -re "\r\n\032\032post-prompt\r\n\r\n\032\032starting\r\n${frames_invalid}${breakpoints_invalid}\r\n\032\032watchpoint 3\r\n.*atchpoint 3: a.x\r\n\r\nOld value = 0\r\nNew value = 1\r\n\r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*$srcfile\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$decimal\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source .*$srcfile.*beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n.*$gdb_prompt$" { + -re "\r\n\032\032post-prompt\r\n\r\n\032\032starting\r\n\(${frames_invalid}\)*${breakpoints_invalid}\r\n\032\032watchpoint 3\r\n.*atchpoint 3: a.x\r\n\r\nOld value = 0\r\nNew value = 1\r\n\r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*$srcfile\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$decimal\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source .*$srcfile.*beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n.*$gdb_prompt$" { pass "watch triggered on a.x" } }