This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]