This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
stucture element variable access problem
- From: "bibo,mao" <bibo dot mao at intel dot com>
- To: systemtap at sources dot redhat dot com
- Date: Fri, 19 May 2006 11:01:34 +0800
- Subject: stucture element variable access problem
Hi,
I encountered such problem when access structure element variable, if
the structure variable is pointer type, its element can be access, but
if the variable is structure type, there will be tapset translation
error when accessing its element. This is the test case:
It will be ok with this test case:
probe kernel.function("__elv_add_request")
{
if ($q->queue_tags){
tag_map = $q->queue_tags->tag_map
printf(" %d \n", tag_map);
}
}
But this test case will fail:
probe kernel.function("__elv_add_request")
{
elevator_name = $q->elevator.elevator_name
}
And there will be such error information:
probe __elv_add_request@drivers/block/elevator.c:171 pc=0xc02017e2
pattern 'kernel' matches module 'kernel'
keeping expression operator '=' at 1.stp:3:16 because it writes: elevator_name and/or embedded: 0
semantic error: unresolved target-symbol expression: identifier '$q' at 1.stp:3:18
semantic error: probe_0 with unresolved type for identifier 'elevator_name' at 1.stp:3:2
semantic error: unresolved target-symbol expression: identifier '$q' at 1.stp:3:18
Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 global(s) in 210usr/30sys/224real ms.
Pass 2: analysis failed. Try again with more '-v' (verbose) options.
thanks
bibo,mao