help-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detection of function calls in C and C++ codes


From: Shigio YAMAGUCHI
Subject: Re: Detection of function calls in C and C++ codes
Date: Tue, 11 Dec 2018 20:28:48 +0900

Hello,
> Where can i find the sqlite3 related database?

All tag files are SQLITE3 databases. Each database has a table named 'db'.
This is to realize SQLITE facility with less change.

$ sqlite3 GTAGS
sqlite> select count(*) from db;
11194
...

Regards,
Shigio
2016年8月20日(土) 7:58 Shigio YAMAGUCHI <address@hidden>:
>
> Hi,
> > We can see, that the occurence found in SimulationMPI.cxx file
> > on the line 32 is not a call, but a declaration.
>
> The current C++ built-in parser considers a declaration as a reference.
>
> > So, is there any way, how to detect only function calls?
>
> There is no way except for rewriting the parser.
>
> Regards,
> Shigio
>
>
> 2016-08-19 21:03 GMT+09:00 Martin Beseda <address@hidden>:
>>
>> To whom it may concern,
>>
>> I need to detect function calls in C and C++. I need to detect calls 
>> exclusively (with line numbers), without functions' declarations etc.
>>
>>
>>
>> I've tried to use it like this:
>>
>> gtags -f fileList.txt
>>
>> global -r -x exchangeSizes
>>
>>
>>
>> But when I'm trying to parse some C++ codes, I'm encountering problems like 
>> this:
>>
>>
>>
>> /projects/p_readex/amt/ProxyApps/FOO/lassen_FOO> 
>> /projects/p_readex/amt/libraries/global-6.5.4/global/global -r -x 
>> exchangeSizes
>>
>> exchangeSizes      22 SimulationMPI.cxx void exchangeSizes( MPI_Comm comm,
>> exchangeSizes      32 SimulationMPI.cxx void exchangeSizes( MPI_Comm comm,
>> exchangeSizes     319 SimulationMPI.cxx    exchangeSizes( comm, 
>> overlapDomains, isFacetNeighbor, recvIsFacetNeighbor);
>> exchangeSizes     519 SimulationMPI.cxx    exchangeSizes( comm, neighbors, 
>> sendSize, recvBufferSize );
>> exchangeSizes     533 SimulationMPI.cxx    exchangeSizes( comm, neighbors, 
>> sendBuffer, recvSizes );
>>
>>
>> SimulationMPI.cxx:
>>
>>  31 template<class T>
>>  32 void exchangeSizes( MPI_Comm comm,
>>  33                     const std::vector<int> &neighbors,
>>  34                     const std::vector< std::vector<T> > &sendBuffer,
>>  35                     std::vector<int> &recvBufferSize);
>>  36
>>  37
>>
>>
>> We can see, that the occurence found in SimulationMPI.cxx file on the line 
>> 32 is not a call, but a declaration.
>>
>> So, is there any way, how to detect only function calls?
>>
>>
>> Thank you very much.
>>
>> Best regards,
>> Martin
>>
>> P.s.: The parsed project is attached.
>>
>>
>>
>> _______________________________________________
>> Help-global mailing list
>> address@hidden
>> https://lists.gnu.org/mailman/listinfo/help-global
>>
>
>
>
> --
> Shigio YAMAGUCHI <address@hidden>
> PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3



-- 
Shigio YAMAGUCHI <address@hidden>
PGP fingerprint:
26F6 31B4 3D62 4A92 7E6F  1C33 969C 3BE3 89DD A6EB



reply via email to

[Prev in Thread] Current Thread [Next in Thread]