summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.base/cu-decl.exp
blob: 42e683cb9e5dd98824777da3fbdf5b5fec0256f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Check that we can dereference a type declaration that is
# defined in a separate CU from the function.
set test "cu-decl"

set script {
    probe process("cu-decl").function("print") {
        println($f->x * $f->y)
    }
}

set sources "$srcdir/$subdir/$test-1.c $srcdir/$subdir/$test-2.c"
set res [target_compile $sources $test executable "additional_flags=-g"]
if { $res != "" } {
    verbose "target_compile failed: $res" 2
    fail "$test target compilation"
    untested "$test"
} else {
    pass "$test target compilation"
}

stap_compile $test 1 "{$script}"

catch {exec rm $test}