Re: why are "references" restricted to symbols for which we have definitions?
Gautam Thaker <[email protected]> Thu, 25 Feb 2021 10:08:12 -0500
| Newsgroups | gmane.comp.gnu.global.general |
|---|---|
| Message-ID | <CA+1+E3VRS9CKz=evnf-deE0pRHirA-oVmSgq9SD088sLMs2RkQ@mail.gmail.com> |
--000000000000c13f9805bc2a85c0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks Shigio. So global -s works well and gives me all the symbols, but I get too much output as every single variable , typename etc all get printed. I wish it were possible to restrict to symbols that are function/method calls. (One nice thing about universal ctags is it shows the "kind" of entry a tags line is (eg, macro, function, etc.) I can then restrict a tag search to entries of a certain kind, a very useful thing at times . GHT On Wed, Feb 24, 2021, 5:33 PM Shigio YAMAGUCHI <[email protected]> wrote: > Hello, > How about the following command? > > $ global -xrs '.*' > > -r, --reference > Print reference tags. Reference means the reference to a symbol > which > has definitions. > -s, --symbol > Print other symbol tags. Other symbol means the reference to > a symbol which > has no definition. > > Regards, > Shigio > > 2021=E5=B9=B42=E6=9C=8825=E6=97=A5(=E6=9C=A8) 4:23 Gautam Thaker <ghthake= [email protected]>: > > > > > > From man page for global: > > > > -r, --reference, --rootdir > > Print reference tags. Reference means the reference to = a > symbol which has definitions. With the -p option, print the root directo= ry > of > > the project. > > > > I have a use case where I want to know all function/method calls in my > large source tree. I don't have all functions defined, but I would like t= o > still know/find these symbols. > > > > Is this possible? I have read that C++ parser seems to be on way to > deprecation (!!), are there other means possible to seek out even undefin= ed > references? > > > > Thanks. > > > > > > > -- > Shigio YAMAGUCHI <[email protected]> > PGP fingerprint: > 26F6 31B4 3D62 4A92 7E6F 1C33 969C 3BE3 89DD A6EB > --000000000000c13f9805bc2a85c0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"auto"><div dir=3D"auto">Thanks Shigio.</div><div dir=3D"auto"><= br></div><div dir=3D"auto">So</div><div dir=3D"auto"><br></div><div dir=3D"= auto">global -s=C2=A0</div><div dir=3D"auto"><br></div><div dir=3D"auto">wo= rks well and gives me all the symbols, but I get too much output as every s= ingle variable , typename etc all get printed. I wish it were possible to r= estrict to symbols that are function/method calls.</div><div dir=3D"auto"><= br></div><div dir=3D"auto">(One nice thing about universal ctags is it show= s the "kind" of entry a tags line is (eg, macro, function, etc.) = I can then restrict a tag search to entries of a certain kind, a very usefu= l thing at times .</div><div dir=3D"auto"><br></div><div dir=3D"auto">GHT</= div><div dir=3D"auto"><br></div><div dir=3D"auto"><br></div></div><br><div = class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, Feb 24,= 2021, 5:33 PM Shigio YAMAGUCHI <<a href=3D"mailto:[email protected]">shigi= [email protected]</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style= =3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<b= r> How about the following command?<br> <br> $ global -xrs '.*'<br> <br> -r, --reference<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 Print=C2=A0 reference tags.=C2=A0 Reference mea= ns the reference to a symbol which<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 has definitions.<br> -s, --symbol<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 Print other symbol tags.=C2=A0 Other symbol mea= ns the reference to<br> a symbol which<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 has no definition.<br> <br> Regards,<br> Shigio<br> <br> 2021=E5=B9=B42=E6=9C=8825=E6=97=A5(=E6=9C=A8) 4:23 Gautam Thaker <<a hre= f=3D"mailto:[email protected]" target=3D"_blank" rel=3D"noreferrer">ghthak= [email protected]</a>>:<br> ><br> ><br> > From man page for global:<br> ><br> > -r, --reference, --rootdir<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Print=C2=A0 refe= rence tags.=C2=A0 Reference means the reference to a symbol which has defin= itions.=C2=A0 With the -p option, print the root directory of<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0the project.<br> ><br> > I have=C2=A0 a use case where I want to know all function/method calls= in my large source tree. I don't have all functions defined, but I wou= ld like to still know/find these symbols.<br> ><br> > Is this possible? I have read that C++ parser seems to be on way to de= precation (!!), are there other means possible to seek out even undefined r= eferences?<br> ><br> > Thanks.<br> ><br> ><br> <br> <br> -- <br> Shigio YAMAGUCHI <<a href=3D"mailto:[email protected]" target=3D"_blank" re= l=3D"noreferrer">[email protected]</a>><br> PGP fingerprint:<br> 26F6 31B4 3D62 4A92 7E6F=C2=A0 1C33 969C 3BE3 89DD A6EB<br> </blockquote></div> --000000000000c13f9805bc2a85c0--