help-global
[Top][All Lists]
Advanced

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

Function Reference Question / Problem


From: Bruce Ashfield
Subject: Function Reference Question / Problem
Date: Wed, 4 Apr 2001 09:56:01 -0400

Hi,

I've been hacking the global / gtags / gctags source for a day
now trying to determine why some functions aren't showing up as
references during cross reference queries. My problem is similar
to the library function example in the docs, but not quite.

Here is the situation:

Project Source Code: /projects/project-1/src/switch/..
Third Party Code: /projects/project-1/src/lib/..

I do not have access to the third party code due to security issues, 
but that really isn't an issue. The problem is that calls to 
functions in that third party code aren't showing up as function 
references.

For example:

static void 
tcp_open(struct tcb *tcb_control_block)
{
    int index = (int) tcp_get_cookie(tcb_control_block);
    
    performProcessing(...);

    tcp_close( tcb_control_block );
}

The function calls: tcp_get_cookie and tcp_close do not show up as
anything during cross references on their names .. even though they
are called multiple times from the file in question.

The whole problem may be due to a misunderstanding on my part in the
way global generates function references. It appears to me that 
function references are only showing up if global has processed the 
function definition (in that file or another one previously processed).

As I mentioned, I've been hacking to code to determine why they aren't
showing up as function references (and I think it has something to do 
with the "nexttoken(interested, reserved)" calls in gctags main loop
i.e. the "interested" part is skipped in referenced, but not defined
functions. I'm going to continue poking, but I thought some hints might
be helpful.

My question can be summarized as:

- Is is possible to have global generate function references to "library"
  functions to which I don't have the source code ? (sort of like printf).
- Maybe this would clutter the database, make searches slower, etc, but 
  I'm just curious as to the logic and if there is a way to do this.

Thanks,

Bruce Ashfield



reply via email to

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