[RFC PATCH 1/2] Bug Translator 3016 : Error accessing members of anonymous structs / unions

Prerna Saxena prerna@linux.vnet.ibm.com
Thu Sep 4 05:55:00 GMT 2008


Frank Ch. Eigler wrote:
> Prerna Saxena <prerna@linux.vnet.ibm.com> writes:
>
>   
>> This patch modifies tapsets.cxx to enable members of anonymous
>> structs/ unions to be recognised by the systemtap translator.
>> Pls let me know your comments..
>>     
>
> It should be a nice improvement.  The code needs some test cases, and
> perhaps you could transcribe here "before & after" messages that could
> be summarized also into src/NEWS.
>
> The code that prints to clog needs to go back to throwing exceptions,
> or if absolutely necessary, to session.print_{warning,error}.
>
>
> - FChE
>   

Hi Frank,
I had deliberately changed code in function translate_components() to  
print  to clog instead of throwing exceptions.
 Initially  this function was called only once wherein it would search 
for the dwarf information for a member of a given parent struct / union 
; or flag an error if the member wasnt found or errors were encountered. 
I have modified the function to be called recursively for each anonymous 
structs/ unions encountered in the parent struct/ union.

I thought it would not be a good idea to make the code throw an 
exception if a there are issues determining the dwarf information for 
one search path traversing one of the nested structs ; there is a 
reasonably good chance this member may be discovered in another search 
path and the translation may succeed later on.
Pls let me know your comments..

Thanks & regards,
Prerna





More information about the Systemtap mailing list