Debian Codegraph @

doc/SystemTap_Beginners_Guide/testsuite/systemtap.base/bitfield2.exp

raw
1
2 set ::result_string {-4 3 2 1
3 1 2 3 -4}
4
5 foreach dwarf [list -g -gdwarf-2 -gdwarf-3 -gdwarf-4 -gdwarf-5] {
6 set test "bitfield2 $dwarf"
7 set binary "./a.out$dwarf"
8 set res [target_compile ${srcdir}/${subdir}/bitfield2.c $binary executable \
9 "additional_flags=$dwarf"]
10 if {$res ne ""} {
11 verbose "target_compile failed: $res" 2
12 fail "$test compilation"
13 } else {
14 pass "$test compilation"
15 }
16
17 foreach runtime [get_runtime_list] {
18 if {$runtime != ""} {
19 stap_run3 "$test $runtime" --runtime=$runtime -g $srcdir/$subdir/bitfield2.stp -c $binary
20 } else {
21 stap_run3 $test -g $srcdir/$subdir/bitfield2.stp -c $binary
22 }
23 }
24 }