stucture element variable access problem

bibo,mao bibo.mao@intel.com
Fri May 19 03:02:00 GMT 2006


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



More information about the Systemtap mailing list