compile error accessing fn args

Keshavamurthy Anil S anil.s.keshavamurthy@intel.com
Fri Oct 28 23:35:00 GMT 2005


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




More information about the Systemtap mailing list