Hello, > search-> global dx_ > finds -> src/dataframe.cpp > > but > > search-> global index_ > finds -> (finds nothing)
Both of the above seem to be error. Currently, gtags's C++ parser does not know 'member initialization list' of C++. So, gtags accidentally treats the last initialization 'dx_(...)' as a function definition. I have added the following item to the Known Bug list. Known Bug list: Gtags(Cpp parser) does not support member initialization list. [report] Thanks, Shigio 2020年4月30日(木) 23:42 jan <[email protected]>: > > Hi, > this may be a bit difficult as I don't know how Global parses stuff. > I assume it does less than a compiler, but does more than a simple > parser as you are trying to keep relationships between symbols ("x is > declared here and used there"). > So I'm not sure what to expect. > > Anyway, the easiest way is just to git clone gromacs from > <https://github.com/gromacs/gromacs> and run gtags on it. You know > that it is complete and compiles (use the v2020.1 tag, which does > compile. HEAD may not). Then just run gtags and htags on it. > > Then in the HTML that htags has made go to > /src/gromacs/analysisdata/dataframe.cpp and you'll see stuff that is > not underlined. > > --- > > However, that is not a minimal example (and gromacs is big), so > instead get hold of these 2 files > dataframe.cpp > dataframe.h > > from <https://github.com/gromacs/gromacs/tree/master/src/gromacs/analysisdata> > > and put them in a directory "src" and run gtags and htags on them. > Then search. This finds something, correctly: > > search-> global dx_ > finds -> src/dataframe.cpp > > but > > search-> global index_ > finds -> (finds nothing) > > Both index_ and dx_ are defined in 'dataframe.h': > > class AnalysisDataFrameHeader > { > ... > private: > int index_; > real x_; > real dx_; > }; > > So they should be found. As I understand it, anyway. > > I've attached these 2 files but they may not get through as mailing > lists tend to delete attachments. > > --- > > Is this OK? If you want it even simpler I can set up a simple github > repo with just these files which you can pull from. > > Happy to do that if it makes things easier - let me know. > > thanks > > jan > > > On 30/04/2020, Shigio YAMAGUCHI <[email protected]> wrote: > > Hello, > > Could you please give me a reproduce method to understand the problem? > > It would be helpful if you could describe it as concisely as possible. > > > > Thanks, > > Shigio > > > > 2020年4月30日(木) 21:26 jan <[email protected]>: > >> > >> (if anything below is unclear, please shout! I will try to explain > >> better) > >> (also please acknowledge that it's been received, just so I know it's > >> not got lost) > >> > >> Hi, > >> this bug (if it is a bug) seems to have been around a long time. I can > >> see a reference to something like this here, from 2007 > >> <https://lists.gnu.org/archive/html/bug-global/2007-10/msg00004.html> > >> > >> I installed Global yesterday, as part of setting up emacs as a proper > >> IDE, and started to play. I built the tag table and the very first > >> thing I did was pick a random symbol and look for it. > >> Global couldn't find it, which caused me a couple of hours more > >> playing and reading the manual. I still don't get it. Maybe it's me. > >> > >> I am also very, very rusty with C++ so I may be getting things wrong > >> there. > >> > >> The project is gromacs <http://www.gromacs.org/>. > >> > >> The size of the project source is 43.6MB. The total size of > >> gpath/grtags/gtags is 17.4MB. The documentation implies these would > >> be about the size of the original source file, but this is ~1/3rd the > >> size so I'm surprised. > >> > >> I looked for a constructor > >> "AnalysisDataPointSetRef::AnalysisDataPointSetRef". It can't find this > >> or even "AnalysisDataPointSetRef" by itself. It can't seem to find a > >> number of symbols. > >> > >> If I generate the HTML it > >> AnalysisDataPointSetRef::AnalysisDataPointSetRef shows up, but without > >> underlining. In fact quite a number of symbols show up without > >> underlining in that source file. The following is from the HTML file > >> with recognised (underlined) items made upper case. > >> > >> AnalysisDataFrameHeader::AnalysisDataFrameHeader > >> (int index, REAL X_, REAL dx) : > >> index_(index), > >> X_(x), > >> DX_(dx) > >> { > >> GMX_ASSERT(index >= 0, "Invalid frame index"); > >> } > >> > >> Non underlined items are > >> AnalysisDataFrameHeader::AnalysisDataFrameHeader, index_, index, x and > >> dx. Therefore it seems not to be picking these up? > >> > >> Looking for these it can find the underlined ones: > >> > >> >>>global dx_ > >> gromacs_working/src/gromacs/analysisdata/dataframe.cpp > >> > >> but > >> > >> >>>global index > >> (nothing) > >> > >> > >> From the same file, another example; similar constructor but > >> conventional parameters are being inconsistenly picked up. As before > >> underlined items are made upper case here: > >> > >> AnalysisDataPointSetRef::AnalysisDataPointSetRef > >> (const AnalysisDataFrameHeader& HEADER, > >> const AnalysisDataPointSetInfo& pointSetInfo, > >> const ANALYSISDATAVALUESREF& values) > >> > >> So it can see HEADER and ANALYSISDATAVALUESREF but apparently nothing > >> else? > >> > >> OS is windows 2008R2. > >> Global version is 6.6.3 > >> The project compiles cleanly so it's not been confused by syntax errors. > >> > >> Happy to help further. > >> > >> thanks > >> > >> jan > >> > > > > > > -- > > Shigio YAMAGUCHI <[email protected]> > > PGP fingerprint: > > 26F6 31B4 3D62 4A92 7E6F 1C33 969C 3BE3 89DD A6EB > > -- Shigio YAMAGUCHI <[email protected]> PGP fingerprint: 26F6 31B4 3D62 4A92 7E6F 1C33 969C 3BE3 89DD A6EB
