This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
compile error accessing fn args
- From: Keshavamurthy Anil S <anil dot s dot keshavamurthy at intel dot com>
- To: systemtap at sources dot redhat dot com
- Cc: anil dot s dot keshavamurthy at intel dot com
- Date: Fri, 28 Oct 2005 16:35:30 -0700
- Subject: compile error accessing fn args
- Reply-to: Keshavamurthy Anil S <anil dot s dot keshavamurthy at intel dot com>
Hi,
The systemtap snapshot 20051022 can't
compile the below script. However the
same script can be compiled from systemtap snapshot
20051008.
-------------------------------------
#!stap -v
#test script
probe kernel.function("blk_rq_map_sg") {
print("nr sectors = " . string($rq->nr_sectors) . "\n")
exit()
}
probe begin {
print ("Probe Begin\n")
}
probe end {
log("Probe End")
}
-----------------------------------------
Here is error output
------------------
Pass 3: translated to C into "/tmp/stapMyOVmJ/stap_21402.c"
Running make -C "/lib/modules/2.6.9-prep.rcu/build" M="/tmp/stapMyOVmJ" modules
make: Entering directory `/home/askeshav/linux/RHEL4u3/linux-2.6.9'
CC [M] /tmp/stapMyOVmJ/stap_21402.o
/tmp/stapMyOVmJ/stap_21402.c: In function `function_get_rq_0':
/tmp/stapMyOVmJ/stap_21402.c:170: error: syntax error before '}' token
/tmp/stapMyOVmJ/stap_21402.c:174: error: syntax error before '}' token
Inspecting the generated c code, looks like
translator is missing a semicolon on that line.
Cheers,
-Anil