[lkml]   [2001]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: dget() said:
> # cd /usr/src/linux
> # find -name '*.[ch]' | ctags -L- &
> On 15 May 2001, Xavier Bestel wrote:
> > # cd /usr/src/linux
> > # make tags
> No, I never use that one because it skips very useful entries like the
> ones from EXPORT_SYMBOL etc. Also, it only shows the current architecture.
> So, the tags target in the Makefile would only become useful when it is
> stripped of extra (unnecessary, imho) logic and turned into a plain one I
> suggested above.

You can use the -I feature to ignore some keywords, but not the
functions they modify. Without ignoring __initdata, for instance, you
get a couple hundred tags for it, and none for the actual variable,
e.g. cpu_vendor_names. My current ignore list for the kernel is at .
If you really want to see the EXPORT_SYMBOL(tag) lines, you'll want
to remove that one from the list (and be sure to do the sorting...),

Next, the wonderful editor Vim doesn't read my mind quite well enough.
When I want to see the tag for "page", for example, I really
want to look at the definition of the struct in include/linux/mm.h, not
at any of the 16 other places which declare a variable struct page *page;.
So I run the tags file through a perl script which percolates those
interesting items to the top when there are multiple entries for the
same identifier. It's here: .

Finally, I modify the Makefile to generate tags with these
modifications. Here's the snippet:

tags: dummy
( find include/asm-$(ARCH) -name "*.h" ;\
find include -type d \( -name "asm-*" -o -name config \) -prune \
-o -name "*.h" -print ; find $(SUBDIRS) init -name '*.[chS]' ) |\
ctags -I../ctags-ignore -L - -f - | sort-tags > tags

Note that this only generates tags for your current architecture,
and that your ctags must be Exuberant and version >= 5.0.

-- Pete
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:53    [W:0.065 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site