Re: gtags-cscope showing wrong Function
Jon Doron <[email protected]> Thu, 18 Feb 2021 13:52:32 +0200
| Newsgroups | gmane.comp.gnu.global.bugs |
|---|---|
| Message-ID | <20210218115232.GE1644816@jondnuc> |
On 18/02/2021, Shigio YAMAGUCHI wrote: >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 <[email protected]>: I see thank you! >> >> 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 <[email protected]> >PGP fingerprint: >26F6 31B4 3D62 4A92 7E6F 1C33 969C 3BE3 89DD A6EB