From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Richard F Weber" To: Thomas Stroesslin Cc: sourcenav@sources.redhat.com Subject: Re: Xref and find declaration of variables Date: Tue, 01 May 2001 10:32:00 -0000 Message-id: <3AEEF30F.6050805@link.com> References: X-SW-Source: 2001-q2/msg00123.html Don't know if it's a problem persay with SourceNavigator as compared to the C-Parser itself not registering the proper variable & keeping track of the scope of the current variable that's being worked with. However, this could explain some of the hang-ups I've been having with the Ada Parser if the database back-end doesn't do associations correctly. --Rich Thomas Stroesslin wrote: >consider the following "project": > >myfile.c : > >int myglobalvar; >int myfunc(int myarg) { > int mylocalvar; > int myvar; > > myvar = 1; > mylocalvar = 1; > myarg = 1; > myglobalvar=1; >} > >myotherfile.c : > >int myvar; // which is global >... > >I am working on myfile.c and try to find out things about my variables: > >1) find declaration of myvar on the assignment line -> leads me to myvar > of myotherfile.c (don't you have scope info in the db?) > >2) same as 1) for mylocalvar > -> doesn't find anything, doesn't report error -> does nothing! > >3) same as 1) for myarg > -> same as 2) > >4) myglobalvar referred by -> finds nothing > >5) myvar or mylocalvar or myarg referred by in function myfunc() > -> same as 4 > > >all these features are available in sniff+. IMHO, they are among the top >10 most importand code analysis features (the other 5 are working in >sourcenavigator, good stuff) > >do you plan to include such features in future releases of >sourcenavigator? If so, when - roughly - can I expect them to be >implemented? > >cheers, >tom > >