Mark Wielaard a36539
commit c4ada110b0de0a56ec41ca0babc4effce4a4fc04
Mark Wielaard a36539
Author: mjw <mjw@a5019735-40e9-0310-863c-91ae7b9d1cf9>
Mark Wielaard a36539
Date:   Sun Apr 3 15:24:20 2016 +0000
Mark Wielaard a36539
Mark Wielaard a36539
    Update gdbserver_tests filter for newer GDB version.
Mark Wielaard a36539
    
Mark Wielaard a36539
    - Newer gdb say Thread .... hit Breakpoint, we expect just Breakpoint.
Mark Wielaard a36539
    - We expect "Program received" instead of "Thread .... received"
Mark Wielaard a36539
    - Ordering of '  Thread .... (tid .' might differ between gdb version,
Mark Wielaard a36539
      so remove all such lines except the "current" one (starts with '*').
Mark Wielaard a36539
    
Mark Wielaard a36539
    git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15844 a5019735-40e9-0310-863c-91ae7b9d1cf9
Mark Wielaard a36539
Mark Wielaard a36539
diff --git a/gdbserver_tests/filter_gdb b/gdbserver_tests/filter_gdb
Mark Wielaard a36539
index df9479f..7177720 100755
Mark Wielaard a36539
--- a/gdbserver_tests/filter_gdb
Mark Wielaard a36539
+++ b/gdbserver_tests/filter_gdb
Mark Wielaard a36539
@@ -62,6 +62,10 @@ sed -e '/^\ \ \ \ \.\.\.$/d'                                        |
Mark Wielaard a36539
 #	gdb might also try to show the "entry value" p=p@entry=0x...
Mark Wielaard a36539
 #	Some gdb versions don't show the source line:number after switching
Mark Wielaard a36539
 #		threads in #0  0x........ in do_burn ().
Mark Wielaard a36539
+#	Newer gdb say Thread .... hit Breakpoint, we expect just Breakpoint.
Mark Wielaard a36539
+#	We expect "Program received" instead of "Thread .... received"
Mark Wielaard a36539
+#	Ordering of '  Thread .... (tid .' might differ between gdb version,
Mark Wielaard a36539
+#	so remove all such lines except the "current" one (starts with '*').
Mark Wielaard a36539
 sed -e '/Remote debugging using/,/vgdb launched process attached/d'                                   \
Mark Wielaard a36539
     -e '/filter_gdb BEGIN drop/,/filter_gdb END drop/d'                                               \
Mark Wielaard a36539
     -e 's/^?\[?1034hReading symbols/Reading symbols/'                                                \
Mark Wielaard a36539
@@ -74,6 +78,8 @@ sed -e '/Remote debugging using/,/vgdb launched process attached/d'
Mark Wielaard a36539
     -e '/\[Switching to Thread ....\]/d'                                                              \
Mark Wielaard a36539
     -e 's/\(\[Switching to thread [1234] (Thread ....)\]\)#0/\1\n#0/'                                 \
Mark Wielaard a36539
     -e 's/^\([ \* ] [0-9] Thread .... (tid [0-9] VgTs_WaitSys)  0x........ in\).*$/\1 syscall .../'   \
Mark Wielaard a36539
+    -e 's/^Thread .... hit Breakpoint /Breakpoint /'                                                  \
Mark Wielaard a36539
+    -e 's/^Thread .... received /Program received /'                                                  \
Mark Wielaard a36539
     -e 's/#[0-9]\(  0x........ in sleeper_or_burner\)/#.\1/'                                          \
Mark Wielaard a36539
     -e 's/\(#0  0x........ in do_burn ()\) at sleepers.c:41/\1/'                                      \
Mark Wielaard a36539
     -e '/^Reading symbols from .*\.\.\.done\./d'                                                      \
Mark Wielaard a36539
@@ -115,6 +121,7 @@ sed -e '/Remote debugging using/,/vgdb launched process attached/d'
Mark Wielaard a36539
     -e 's/\(^Breakpoint 1, tls_ptr (p=0x........\) <tests[0-9+]*>\() at tls.c:55\)/\1\2/'         \
Mark Wielaard a36539
     -e '/Id   Target Id         Frame/d'                                                              \
Mark Wielaard a36539
     -e 's/^\([ \*] [1234] \) *Thread /\1Thread /'                                                     \
Mark Wielaard a36539
+    -e 's/^  [0-9] Thread .... (tid [0-9] .*$//'                                                      \
Mark Wielaard a36539
     -e 's/VgTs_WaitSys) 0x/VgTs_WaitSys)  0x/'                                                        \
Mark Wielaard a36539
     -e '/Cannot access memory at address 0x......../d'                                                \
Mark Wielaard a36539
     -e '/\[New Thread/d'                                                                              \
Mark Wielaard a36539
diff --git a/gdbserver_tests/nlcontrolc.stdoutB.exp b/gdbserver_tests/nlcontrolc.stdoutB.exp
Mark Wielaard a36539
index a1013ce..e334fd0 100644
Mark Wielaard a36539
--- a/gdbserver_tests/nlcontrolc.stdoutB.exp
Mark Wielaard a36539
+++ b/gdbserver_tests/nlcontrolc.stdoutB.exp
Mark Wielaard a36539
@@ -1,9 +1,6 @@
Mark Wielaard a36539
 Continuing.
Mark Wielaard a36539
 Program received signal SIGTRAP, Trace/breakpoint trap.
Mark Wielaard a36539
 0x........ in syscall ...
Mark Wielaard a36539
-  4 Thread .... (tid 4 VgTs_WaitSys)  0x........ in syscall ...
Mark Wielaard a36539
-  3 Thread .... (tid 3 VgTs_WaitSys)  0x........ in syscall ...
Mark Wielaard a36539
-  2 Thread .... (tid 2 VgTs_WaitSys)  0x........ in syscall ...
Mark Wielaard a36539
 * 1 Thread .... (tid 1 VgTs_WaitSys)  0x........ in syscall ...
Mark Wielaard a36539
 $1 = 0
Mark Wielaard a36539
 $2 = 0