-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathcheck.dbx
39 lines (37 loc) · 924 Bytes
/
check.dbx
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
# See also dcheck.sh for wrapper helper.
#
#
# In comparison with `check -all` plus auto-continue setting enabled, this
# function additionally:
#
# - prints the offending for each issue
# - prints some context
# - doesn't redirect the output to a file
#
# Build for the DBX that is bundled with Solaris Studio 12.
#
# 2017, Georg Sauthoff <[email protected]>, WTFPL
rcheck() {
check -all
if [ 0 -eq 1 ]; then
# skip issues before main() is entered, e.g. caused by constructor
# functions in 3rd party shared lbraries.
# fails when there are multiple definitions of main
stop in main
dbxenv rtc_auto_continue on
run
delete 2
dbxenv rtc_auto_continue off
cont
else
run
fi
while [ -z "$exitcode" ]; do
where
list -w
cont
done
# At least with Solaris Studio 12.3, exitcode is just a boolean,
# meaning that exit-status != 0 are converted to 1.
exit $exitcode
}