bart | 33f6482 | 2011-10-22 16:29:11 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | # Remove the three lines after "<fn>start_thread</fn>" if these start with |
| 4 | # "<dir>...</dir>" since these last three lines are not generated on all |
| 5 | # platforms. |
| 6 | ../../memcheck/tests/filter_xml | |
| 7 | awk '{ |
| 8 | if ($0 == " <fn>start_thread</fn>") { |
| 9 | line1 = $0 |
| 10 | getline |
| 11 | if ($0 == " <dir>...</dir>") { |
| 12 | line2 = $0 |
| 13 | getline |
| 14 | if ($0 == " <file>pthread_create.c</file>") { |
| 15 | line3 = $0 |
| 16 | getline |
| 17 | if ($0 == " <line>...</line>") { |
| 18 | $0 = line1 |
| 19 | } else { |
| 20 | print line1 |
| 21 | print line2 |
| 22 | print line3 |
| 23 | } |
| 24 | } else { |
| 25 | print line1 |
| 26 | print line2 |
| 27 | } |
| 28 | } else { |
| 29 | print line1 |
| 30 | } |
| 31 | } |
| 32 | print |
| 33 | }' |