Hello,
> when using gtags-cscope to lookup xxx reference in vim, It has not displaying 
> the function call xxx

You are right. Gtags-cscope(1) does not perfectly reproduce cscope(1).
Since Global doesn't recognize the function which is calling, the function field
is meaningless when referenced.
Do you think this should be changed to "unknown" to avoid misunderstandings?

$ man global
>>BUG
>>       The function field of the display is almost <unknown> since Global 
>> doesn't recognize it.
>>
>>       ´Find functions called by this function´ is not implemented.

Regards,
Shigio

On Wed, Jun 18, 2025 at 10:46 PM Chaohai Chen <[email protected]> wrote:
>
> when I use cscope to lookup the reference of "kernel_read", in kernel
> code, vim quickfix window is like:
> ==============================
>  1 arch/mips/kernel/elf.c|121| <<arch_elf_pt_proc>> ret = kernel_read(elf, 
> &abiflags, sizeof(abiflags), &pos);                                           
>                                                                               
>                                2 arch/um/drivers/mconsole_kern.c|152| 
> <<mconsole_proc>> len = kernel_read(file, buf, PAGE_SIZE - 1, &pos);
>   3 arch/x86/ia32/ia32_aout.c|414| <<load_aout_library>> error = 
> kernel_read(file, &ex, sizeof(ex), &pos);
>   4 drivers/mtd/nand/raw/nandsim.c|1364| <<read_file>> tx = kernel_read(file, 
> buf, count, &pos);
>   5 drivers/usb/gadget/function/f_mass_storage.c|694| <<do_read>> nread = 
> kernel_read(curlun->filp, bh->buf, amount,
>   6 drivers/usb/gadget/function/f_mass_storage.c|1028| <<do_verify>> nread = 
> kernel_read(curlun->filp, bh->buf, amount,
>   7 fs/binfmt_aout.c|350| <<load_aout_library>> error = kernel_read(file, 
> &ex, sizeof(ex), &pos);
>   8 fs/binfmt_elf.c|446| <<load_elf_phdrs>> retval = kernel_read(elf_file, 
> elf_phdata, size, &pos);
>   9 fs/binfmt_elf.c|768| <<load_elf_binary>> retval = kernel_read(bprm->file, 
> elf_interpreter,
>  10 fs/binfmt_elf.c|794| <<load_elf_binary>> retval = 
> kernel_read(interpreter, &loc->interp_elf_ex,
>  ================================
>
>  but use gtags-cscope, vim quickfix window is like:
>  ================================
> 1 drivers/crypto/ccp/sev-dev.c|295| <<kernel_read>> nread = kernel_read(fp, 
> sev_init_ex_buffer, NV_LENGTH, NULL);
> 2 drivers/mtd/nand/raw/nandsim.c|1352| <<kernel_read>> tx = kernel_read(file, 
> buf, count, &pos);
> 3 drivers/usb/gadget/function/f_mass_storage.c|684| <<kernel_read>> nread = 
> kernel_read(curlun->filp, bh->buf, amount,
> 4 drivers/usb/gadget/function/f_mass_storage.c|1021| <<kernel_read>> nread = 
> kernel_read(curlun->filp, bh->buf, amount,
> 5 fs/binfmt_elf.c|469| <<kernel_read>> rv = kernel_read(file, buf, len, &pos);
> 6 fs/binfmt_elf.c|786| <<kernel_read>> n = kernel_read(f, &note, 
> phdr->p_filesz, &pos);
>  ================================
>
>
> the function in "<<*>>" is different, I can't get the functon who call the 
> "kernel_read"
>
>


-- 
Shigio YAMAGUCHI <[email protected]>
PGP fingerprint:
26F6 31B4 3D62 4A92 7E6F  1C33 969C 3BE3 89DD A6EB

Reply via email to