diff --git a/valgrind-3.11.0-gdb-test-filters.patch b/valgrind-3.11.0-gdb-test-filters.patch new file mode 100644 index 0000000..739c58c --- /dev/null +++ b/valgrind-3.11.0-gdb-test-filters.patch @@ -0,0 +1,59 @@ +commit c4ada110b0de0a56ec41ca0babc4effce4a4fc04 +Author: mjw +Date: Sun Apr 3 15:24:20 2016 +0000 + + Update gdbserver_tests filter for newer GDB version. + + - Newer gdb say Thread .... hit Breakpoint, we expect just Breakpoint. + - We expect "Program received" instead of "Thread .... received" + - Ordering of ' Thread .... (tid .' might differ between gdb version, + so remove all such lines except the "current" one (starts with '*'). + + git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15844 a5019735-40e9-0310-863c-91ae7b9d1cf9 + +diff --git a/gdbserver_tests/filter_gdb b/gdbserver_tests/filter_gdb +index df9479f..7177720 100755 +--- a/gdbserver_tests/filter_gdb ++++ b/gdbserver_tests/filter_gdb +@@ -62,6 +62,10 @@ sed -e '/^\ \ \ \ \.\.\.$/d' | + # gdb might also try to show the "entry value" p=p@entry=0x... + # Some gdb versions don't show the source line:number after switching + # threads in #0 0x........ in do_burn (). ++# Newer gdb say Thread .... hit Breakpoint, we expect just Breakpoint. ++# We expect "Program received" instead of "Thread .... received" ++# Ordering of ' Thread .... (tid .' might differ between gdb version, ++# so remove all such lines except the "current" one (starts with '*'). + sed -e '/Remote debugging using/,/vgdb launched process attached/d' \ + -e '/filter_gdb BEGIN drop/,/filter_gdb END drop/d' \ + -e 's/^\[?1034hReading symbols/Reading symbols/' \ +@@ -74,6 +78,8 @@ sed -e '/Remote debugging using/,/vgdb launched process attached/d' + -e '/\[Switching to Thread ....\]/d' \ + -e 's/\(\[Switching to thread [1234] (Thread ....)\]\)#0/\1\n#0/' \ + -e 's/^\([ \* ] [0-9] Thread .... (tid [0-9] VgTs_WaitSys) 0x........ in\).*$/\1 syscall .../' \ ++ -e 's/^Thread .... hit Breakpoint /Breakpoint /' \ ++ -e 's/^Thread .... received /Program received /' \ + -e 's/#[0-9]\( 0x........ in sleeper_or_burner\)/#.\1/' \ + -e 's/\(#0 0x........ in do_burn ()\) at sleepers.c:41/\1/' \ + -e '/^Reading symbols from .*\.\.\.done\./d' \ +@@ -115,6 +121,7 @@ sed -e '/Remote debugging using/,/vgdb launched process attached/d' + -e 's/\(^Breakpoint 1, tls_ptr (p=0x........\) \() at tls.c:55\)/\1\2/' \ + -e '/Id Target Id Frame/d' \ + -e 's/^\([ \*] [1234] \) *Thread /\1Thread /' \ ++ -e 's/^ [0-9] Thread .... (tid [0-9] .*$//' \ + -e 's/VgTs_WaitSys) 0x/VgTs_WaitSys) 0x/' \ + -e '/Cannot access memory at address 0x......../d' \ + -e '/\[New Thread/d' \ +diff --git a/gdbserver_tests/nlcontrolc.stdoutB.exp b/gdbserver_tests/nlcontrolc.stdoutB.exp +index a1013ce..e334fd0 100644 +--- a/gdbserver_tests/nlcontrolc.stdoutB.exp ++++ b/gdbserver_tests/nlcontrolc.stdoutB.exp +@@ -1,9 +1,6 @@ + Continuing. + Program received signal SIGTRAP, Trace/breakpoint trap. + 0x........ in syscall ... +- 4 Thread .... (tid 4 VgTs_WaitSys) 0x........ in syscall ... +- 3 Thread .... (tid 3 VgTs_WaitSys) 0x........ in syscall ... +- 2 Thread .... (tid 2 VgTs_WaitSys) 0x........ in syscall ... + * 1 Thread .... (tid 1 VgTs_WaitSys) 0x........ in syscall ... + $1 = 0 + $2 = 0 diff --git a/valgrind.spec b/valgrind.spec index 76b77e0..03205d3 100644 --- a/valgrind.spec +++ b/valgrind.spec @@ -148,6 +148,9 @@ Patch32: valgrind-3.11.0-amd64-fcom.patch # s390: Recognise machine model z13s (2965) Patch33: valgrind-3.11.0-z13s.patch +# Update gdbserver_tests filter for newer GDB version. +Patch34: valgrind-3.11.0-gdb-test-filters.patch + %if %{build_multilib} # Ensure glibc{,-devel} is installed for both multilib arches BuildRequires: /lib/libc.so.6 /usr/lib/libc.so /lib64/libc.so.6 /usr/lib64/libc.so @@ -289,6 +292,7 @@ chmod 755 memcheck/tests/arm64-linux/filter_stderr %patch31 -p1 %patch32 -p1 %patch33 -p1 +%patch34 -p1 %build # We need to use the software collection compiler and binutils if available. @@ -489,6 +493,7 @@ echo ===============END TESTING=============== - Add valgrind-3.11.0-ppc64-128bit-mod-carry.patch - Add valgrind-3.11.0-amd64-fcom.patch - Add valgrind-3.11.0-z13s.patch +- Add valgrind-3.11.0-gdb-test-filters.patch * Mon Mar 14 2016 Mark Wielaard - 3.11.0-18 - Update valgrind-3.11.0-libstdc++-supp.patch.