Re: browsing the kernel source with ctags?

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

 



Yeah you're right... ^_^

I guess ideally, I'd want to find out *which* definition of do_gettimeofday() is being used for the function call I'm looking at. Maybe cscope would help with that.

I tried
   make tags

and then tried to look up do_gettimeofday() again, and I got directed to include/linux/time.h, which has the function prototype, which is helpful. It would still be even nicer to see the function body, perhaps another tool could help with that.

Thanks a lot!

-Tony


On Tue, Jan 19, 2010 at 7:34 PM, Greg KH <greg@xxxxxxxxx> wrote:
On Tue, Jan 19, 2010 at 07:13:59PM -0800, Tony Miller wrote:
> Is it possible to browse the kernel source with ctags? I used
> exuberant-ctags to generate a tags file for my kernel sources, but it
> doesn't really work as you expect. If you try to jump to the definition of a
> function it will often not jump to the right location, for example I tried
> to jump to the definition of do_gettimeofday() and i ended up in
> arch/alpha/kernel/time.c.

That is the right place for it :)

The issue is that you are searching all of the different architectures,
how is ctags supposed to know you don't want the alpha definition, but
really the ia64 definition of the function?

You should try to trim the files you are using, the kernel has a build
option for this:
       make tags
or if you use cscope:
       make cscope

Hope this helps,

greg k-h


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux