[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gtags-cscope showing wrong Function
From: |
Shigio YAMAGUCHI |
Subject: |
Re: gtags-cscope showing wrong Function |
Date: |
Thu, 18 Feb 2021 20:45:37 +0900 |
Hello,
Gtags-cscope is a tool which just borrows the user interface of cscope.
Since Global has no information about the caller, it cannot show it.
Regards,
Shigio
2021年2月18日(木) 18:30 Jon Doron <arilou@gmail.com>:
>
> Hello,
>
> I have ran into an issue with gtags-cscope where it shows the wrong
> function (aka the caller).
>
> given the following source:
>
> void foo()
> {
> printf("hello foo\n");
> }
>
> int main(int argc, char *argv[])
> {
> printf("hello world\n");
> foo();
> return 0;
> }
>
> After you generate gtags, when you run gtags-cscope and look for the
> symbol foo, you will get the following output:
> Symbol: foo
>
> File Function Line
> 0 foo.c foo 3 void foo()
> 1 foo.c foo 11 foo(); <<<<<<<<<<<
>
>
> With cscope you would see under Function the caller i.e:
> C symbol: foo
>
> File Function Line
> 0 foo.c foo 3 void foo()
> 1 foo.c main 11 foo(); <<<<<<<<<<<
>
> My gtags version is 6.6.3, no special configurations
>
> Is there something I need to configure in order to get the same behavior
> as cscope?
>
> Thanks in advance,
> -- Jon.
>
--
Shigio YAMAGUCHI <shigio@gnu.org>
PGP fingerprint:
26F6 31B4 3D62 4A92 7E6F 1C33 969C 3BE3 89DD A6EB