This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

compile error accessing fn args


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]