diff options
Diffstat (limited to 'pkg/report/freebsd.go')
-rw-r--r-- | pkg/report/freebsd.go | 31 |
1 files changed, 10 insertions, 21 deletions
diff --git a/pkg/report/freebsd.go b/pkg/report/freebsd.go index 1a6f38205..7e84cbea1 100644 --- a/pkg/report/freebsd.go +++ b/pkg/report/freebsd.go @@ -9,12 +9,16 @@ import ( ) type freebsd struct { - *config + kernelSrc string + kernelObj string + ignores []*regexp.Regexp } -func ctorFreebsd(cfg *config) (Reporter, []string, error) { +func ctorFreebsd(kernelSrc, kernelObj string, ignores []*regexp.Regexp) (Reporter, []string, error) { ctx := &freebsd{ - config: cfg, + kernelSrc: kernelSrc, + kernelObj: kernelObj, + ignores: ignores, } return ctx, nil, nil } @@ -36,12 +40,14 @@ func (ctx *freebsd) Parse(output []byte) *Report { next = len(output) } for _, oops1 := range freebsdOopses { - if !matchOops(output[pos:next], oops1, ctx.ignores) { + match := matchOops(output[pos:next], oops1, ctx.ignores) + if match == -1 { continue } if oops == nil { oops = oops1 rep.StartPos = pos + rep.Title = string(output[pos+match : next]) } rep.EndPos = next } @@ -85,14 +91,6 @@ var freebsdOopses = []*oops{ "\\+{{ADDR}}\\r?\\n)*#[0-9]+ {{ADDR}} at {{FUNC}}{{ADDR}}"), fmt: "Fatal trap %[1]v in %[2]v", }, - { - title: compile("(Fatal trap [0-9]+:.*) while in (?:user|kernel) mode\\r?\\n(?:.*\\n)+?" + - "KDB: stack backtrace:\\r?\\n" + - "(?:[a-zA-Z0-9_]+\\(\\) at [a-zA-Z0-9_]+\\+0x.*\\r?\\n)*" + - "--- trap 0x[0-9a-fA-F]+.* ---\\r?\\n" + - "([a-zA-Z0-9_]+)\\(\\) at [a-zA-Z0-9_]+\\+0x.*\\r?\\n"), - fmt: "%[1]v in %[2]v", - }, }, []*regexp.Regexp{}, }, @@ -103,15 +101,6 @@ var freebsdOopses = []*oops{ title: compile("panic: ffs_write: type {{ADDR}} [0-9]+ \\([0-9]+,[0-9]+\\)"), fmt: "panic: ffs_write: type ADDR X (Y,Z)", }, - { - title: compile("panic: ([a-zA-Z]+[a-zA-Z0-9_]*\\(\\)) of destroyed (mutex|rmlock|rwlock|sx) @ " + - "/.*/(sys/.*:[0-9]+)"), - fmt: "panic: %[1]v of destroyed %[2]v at %[3]v", - }, - { - title: compile("panic: No chunks on the queues for sid [0-9]+\\.\\r?\\n"), - fmt: "panic: sctp: no chunks on the queues", - }, }, []*regexp.Regexp{}, }, |