]> sourceware.org Git - systemtap.git/commitdiff
PR12136: Add a statement probe for testing @cast scopes
authorJosh Stone <jistone@redhat.com>
Thu, 17 Nov 2011 20:32:03 +0000 (12:32 -0800)
committerJosh Stone <jistone@redhat.com>
Thu, 17 Nov 2011 20:32:03 +0000 (12:32 -0800)
There's still an issue with getting the entry value, but the rest looks
like it's working properly...

testsuite/systemtap.base/cast-scope.exp
testsuite/systemtap.base/cast-scope.stp

index cca535e24c994e33e61b415417b79b896db73781..c329f0a5b816d26b6cfd3528c511ad1c55366636 100644 (file)
@@ -1,6 +1,8 @@
 set test "cast-scope"
 set ::result_string {function direct: {._M_dataplus={._M_p="Hello World!"}}
 function cast: {._M_dataplus={._M_p="Hello World!"}}
+statement direct: {._M_dataplus={._M_p="Hello World!"}}
+statement cast: {._M_dataplus={._M_p="Hello World!"}}
 mark cast: {._M_dataplus={._M_p="Hello World!"}}
 }
 
index 8438ea1b057b0cc8a3e1d7af4ccbd036cd96cdc2..acbc4ecf5a679fe8582cdca9bf9cbc5d2dbd7bd3 100644 (file)
@@ -4,6 +4,12 @@ probe process("cast-scope.exe").function("length")
   println("function cast: ", @cast($str, "std::string")$$)
 }
 
+probe process("cast-scope.exe").statement("length@cast-scope.cxx+1")
+{
+  println("statement direct: ", $str$$)
+  println("statement cast: ", @cast($str, "std::string")$$)
+}
+
 probe process("cast-scope.exe").mark("length")
 {
   println("mark cast: ", @cast($arg1, "std::string")$$)
This page took 0.031543 seconds and 5 git commands to generate.