sewardj | 8eb8bab | 2015-07-21 14:44:28 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | # Filters are not run for post-test check commands. |
| 4 | # Filter everything here. |
| 5 | |
| 6 | echo "---Status---" |
| 7 | echo "::status" | /usr/bin/mdb vgcore.* | \ |
| 8 | perl -p -e 's/from \S*$/from .../' | \ |
| 9 | perl -0 -p -e 's/^file: .+?^(initial argv:)/$1/ms' | \ |
| 10 | perl -p -e 's/addr=[0-9A-Fa-f]+/addr=......../g' |
| 11 | |
| 12 | echo "\n---Registers---" |
| 13 | echo "::regs" | /usr/bin/mdb vgcore.* | \ |
| 14 | perl -p -e 's/(%[cdsefg]s)\s+=\s+0x[0-9A-Fa-f]+/$1 = 0x......../' | \ |
| 15 | perl -p -e 's/%eip\s+=\s+0x[0-9A-Fa-f]+(.*)\+0x[0-9A-Fa-f]+$/%eip = 0x........ $1+0x......../' | \ |
| 16 | sed '/%ebp/ d' | \ |
| 17 | sed '/^%eflags/ d' | \ |
| 18 | sed '/id=/ d' | \ |
| 19 | sed '/status=/ d' |
| 20 | |
| 21 | echo "\n---Stack trace---" |
| 22 | echo "::stack ! perl -p -e 's/^(\S+)\+.*/\$1/g'" | /usr/bin/mdb vgcore.* |