X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=run-test-gdb.sh;h=3cd2bd1dd6f5e88388bfff3f1d412fe5782c26a1;hb=a3d3979b7daaf22ea63ca356edbfa8047dff7b78;hp=34dc2ba112dc8262a7f5a4824ced48dee0b2d6d9;hpb=494e197e719a49fba726d90f668c2d96c02c744b;p=senf.git diff --git a/run-test-gdb.sh b/run-test-gdb.sh index 34dc2ba..3cd2bd1 100755 --- a/run-test-gdb.sh +++ b/run-test-gdb.sh @@ -39,25 +39,41 @@ EOF # also truncate the backtrace at the first stackframe within the unit # test subsystem since we are only interested in the user code. gdb -batch -x .run-test-gdb.cmd ./.test.bin 2>/dev/null | perl -e ' + $mode=0; while () { - if (/^$/) { - $_=; + if ($mode==0) { + if (/^$/) { + $mode=1; + } else { + print; + } + } + elsif ($mode==1) { if (/^Breakpoint 1, exception/) { + $mode=2; @l=(); - while () { - last unless /^#?[0-9]|^ /; - push @l,$_ if /^#/; - $l[$#l] .= $_ if /^ /; - } + } else { + print "\n"; + print; + $mode=0; + } + } + elsif ($mode==2) { + if (/^(#?[0-9]| )/) { + push @l,$_ if /^#/; + $l[$#l] .= $_ if @l && /^ /; + } else { + $mode=0; if (/: fatal error in /) { for (@l[1..$#l]) { - last if /^#[0-9]+ +0x[0-9a-f]+ in boost::unit_test/; + last if /^#[0-9]+ +0x[0-9a-f]+ in boost::unit_test::ut_detail::invoker/; print; } + print; + } else { + redo; } } - else { print "\n"; } } - print; } -' \ No newline at end of file +'