New diffgdbfilt.
[nethome.git] / bin / diffgdb
1 #! /bin/sh
2 filt=true
3 if [ "$1" = "-r" ];then
4   filt=false
5   shift
6 fi
7 if [ "$1" = "-f" ];then
8   filt=true
9   shift
10 fi
11 exec diff $(if false && $filt;then echo "-U999999";else echo "-u";fi) \
12         -I '^Test Run By ' \
13         -I '^gnatbind ' \
14         -I '^gnatlink ' \
15         -I '^gnatlink: ' \
16         -I '^gnatmake: ' \
17         -I '^gcc ' \
18         -I '^/usr/bin/ld: .* architecture of input file .* is incompatible with .* output$' \
19         -I '^collect2: ' \
20         -I '^UNSUPPORTED: ' \
21         -I '^UNTESTED: ' \
22         -I '^UNRESOLVED: ' \
23         -I '^ERROR: ' \
24         -I '^WARNING: ' \
25         -I '^Running ' \
26         -I '^[^:]*[.]ad[sb]:[0-9]' \
27         -I '^\(PASS\|FAIL\): gdb.server/ext-run.exp: get process list$' \
28         -I '^\(PASS\|FAIL\): gdb.base/checkpoint.exp: info checkpoints with at least 600 checkpoints$' \
29         -I '^\(PASS\|FAIL\): gdb.base/checkpoint.exp: break2 with many checkpoints$' \
30         -I '^\(PASS\|FAIL\): gdb.base/interrupt.exp: ' \
31         -I '^\(PASS\|FAIL\): gdb.base/gdb1250.exp: ' \
32         -I '^KFAIL: gdb.threads/watchthreads2.exp: gdb can drop watchpoints in multithreaded app (PRMS: gdb/10116)$' \
33         -I '^PASS: gdb.threads/watchthreads2.exp: all threads incremented x$' \
34         -I '^FAIL: gdb.base/sigbpt.exp: Verify that SIGSEGV occurs at the last STEPI insn (none 0x[a-f0-9]*)$' \
35         -I '^PASS: gdb.threads/threadcrash.exp: core file: ' \
36         -I '^PASS: gdb.threads/watchthreads.exp: disable [0-9]*$' \
37         -I '^FAIL: gdb.mi/mi-nsmoribund.exp: unexpected stop$' \
38         -I '^PASS: gdb.mi/mi-nsmoribund.exp: resume all, program exited normally$' \
39         -I '^gdb compile failed, ' \
40         -I '^gdb compile failed, /usr/bin/ld: /tmp/[a-zA-Z0-9]*.o: relocation R_X86_64_32S against `a local symbol. can not be used when making a shared object; recompile with -fPIC$' \
41         -I '^/tmp/[a-zA-Z0-9]*.o: could not read symbols: Bad value$' \
42         -I '^# of ' \
43         -I '^/home/' \
44         -I '^PASS: gdb.arch/i386-biarch-core.exp: core-file /home/.*/i386-biarch-core.core$' \
45         -I '^\.\./as-new [0-9.]*$' \
46         -I '^ld/ld-new [0-9.]*$' \
47         -I '^\(PASS\|FAIL\): gdb.mi/mi-break.exp: test hitting breakpoint with commands$' \
48         -I '^\(PASS\|FAIL\): gdb.threads/attach-stopped.exp: threaded: attach2, exit leaves process sleeping$' \
49         -I '^\(PASS\|FAIL\): gdb.threads/attachstop-mt.exp: attach3, exit leaves process stopped$' \
50         -I '^\(PASS\|FAIL\): gdb.threads/attachstop-mt.exp: attach4 stop by interrupt\(\| (timeout)\)$' \
51         -I '^\(PASS\|FAIL\): gdb.threads/attachstop-mt.exp: attach4, exit leaves process sleeping$' \
52         -I '^\(PASS\|FAIL\): gdb.threads/manythreads.exp: info threads$' \
53         -I 'gdb version  [0-9][^ ]* -nw -nx $' \
54         -I '^\(PASS\|FAIL\): gdb.threads/attach-stopped.exp: threaded: attach1, exit leaves process stopped$' \
55         -I '^\(PASS\|FAIL\): gdb.threads/local-watch-wrong-thread.exp: local watchpoint automatically deleted\(\| (timeout)\)$' \
56         -I '^\(PASS\|FAIL\): gdb.server/server-run.exp: continue to main$' \
57         -I '^\(PASS\|FAIL\): gdb.mi/mi-nonstop.exp: w1,i0 stop\(\| (timeout)\)$' \
58         -I '^\(PASS\|FAIL\): gdb.reverse/i387-env-reverse.exp: set reverse direction\(\| (timeout)\)$' \
59         -I '^\(PASS\|FAIL\): gdb.mi/mi-file-transfer.exp: compare intermediate binary file$' \
60         -I '^\(PASS\|FAIL\): gdb.mi/mi-file-transfer.exp: compare binary file$' \
61         -I '^\(PASS\|FAIL\): gdb.mi/mi-file-transfer.exp: deleted binary file$' \
62         -I '^\(PASS\|FAIL\): gdb.mi/mi-simplerun.exp: continue to end\(\| (failed to resume)\)$' \
63         -I '^\(PASS\|FAIL\): gdb.mi/mi-simplerun.exp: continue to end\(\| (unknown output after running)\)$' \
64         -I '^\(PASS\|FAIL\): gdb.server/file-transfer.exp: verified deleted binary file$' \
65         -I '^\(PASS\|FAIL\): gdb.server/file-transfer.exp: deleted binary file$' \
66         -I '^\(PASS\|FAIL\): gdb.threads/attachstop-mt.exp: attach1, post-gdb sanity check of the sleeping state - Red Hat BZ 197584$' \
67 -ru "$@" | if $filt;then diffgdbfilt;else grep -v '^diff ';fi
68
69 #       -I '^"uplevel #0 source .*gdb/testsuite/gdb.threads/watchthreads-thr.*\.\.\."$' \