Hi,
> Is it possible to make c global variable as a tag?
>
> Would be better if the fields of c structs are also recorded in tag file.
Yes, it is. Please use -s option of global(1).
There is no distinction between definitions and references, though.
$ cat -n test.c
1 int gv;
2 struct {
3 int m1;
4 } gv2;
5 main() {
6 gv = 1;
7 gv2.m1 = 2;
8 }
$ gtags
$ global -xs '.*'
gv 1 test.c int gv;
gv 6 test.c gv = 1;
gv2 4 test.c } gv2;
gv2 7 test.c gv2.m1 = 2;
m1 3 test.c int m1;
m1 7 test.c gv2.m1 = 2;
Regards,
Shigio
2017-04-18 12:42 GMT+09:00 Shiyao Ma <[email protected]>:
> Hi,
>
> Is it possible to make c global variable as a tag?
>
> Would be better if the fields of c structs are also recorded in tag file.
>
>
> Best.
>
> _______________________________________________
> Help-global mailing list
> [email protected]
> https://lists.gnu.org/mailman/listinfo/help-global
>
--
Shigio YAMAGUCHI <[email protected]>
PGP fingerprint:
26F6 31B4 3D62 4A92 7E6F 1C33 969C 3BE3 89DD A6EB (Currently in use)
D1CB 0B89 B346 4AB6 5663 C4B6 3CA5 BBB3 57BE DDA3 (Used until 2017/2)
_______________________________________________
Help-global mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-global