File: valgrind.awk

package info (click to toggle)
gawk 1%3A5.3.2-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 24,120 kB
  • sloc: ansic: 56,743; awk: 14,966; sh: 6,985; yacc: 6,820; makefile: 3,144; sed: 119; python: 31; csh: 6
file content (43 lines) | stat: -rw-r--r-- 597 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
function show()
{
	error_count++
	if (cmd) {
		printf "%s: %s\n", FILENAME, cmd
		cmd = ""
	}
	printf "\t%s\n",$0
}

FNR == 1 {
	error_count = 0
}

{ $1 = "" }

$2 == "Command:" {
	incmd = 1
	$2 = ""
	cmd = $0
	next
}

incmd {
	if (/Parent PID:/)
		incmd = 0
	else {
		cmd = (cmd $0)
		next
	}
}

/ERROR SUMMARY:/ && !/: 0 errors from 0 contexts/ && error_count > 0 {
	show()
}

/definitely lost:/ && !/: 0 bytes in 0 blocks/		{ show() }

# /possibly lost:/ && !/: 0 bytes in 0 blocks/		{ show() }

# / suppressed:/ && !/: 0 bytes in 0 blocks/		{ show() }

/[Ii]nvalid (read|write)/				{ show() }