I have tried to replicate what the dwarf and mark probes do as far as
handling target variable ($variable) for $counter in the perfmon probes.
The perfmon probe needs a read only value indicating which counter is
being used for that event. From what I understand discussing this with
Frank and examining the code here are the things that need to be done:
-allocate space for the variable
-generate a declaration for the synthesized function
-generate C code for the synthesized function
-replace the $target var use with a call to the synthesized function
It appears that I am not getting the function built in the latest patch
that is saved in bz#909. Where exactly does the creation of the
synthesized function occur for the dwarf and mark probes? I seem to be
missing the corresponding operation. Later the code gets a seg fault in
symresolution_info::visit_symbol(). Thus, for the this short example: