English 中文(简体)
Running ctags for an external kernel module ( or pulling in tags from a separate related project )
原标题:

I m building a an external module ( device driver ), i.e. it s not in the Linux kernel source tree, but in a separate unrelated source tree.

I want to use ctags to browse variable / function declarations and definitions that are being pulled in from the kernel via header files.

For example assuming I have:

~/src/kernel-source
~/src/my_external_module

and I ve run make tags for the kernel then how can I run ctags against my module so that it will pick up the tags from what is effectively a separate project in a different directory tree, in this case the Linux kernel source?

最佳回答

If you care about tags files, you must be using them in an editor that uses them, such as vi. Instead of trying to combine tags files, how about telling vi about the additional tags file? Try adding the additional tags file to the tags option:

 :set tags=./tags,tags,/home/myhome/Work/linux-2.6.31/tags,/home/myhome/Work/driver/tags

This sets up a tags search path in vi. See :help tags for more information.

问题回答

暂无回答




相关问题
ctags generator for CORBA IDL?

I work in a multi-language environment and use Vim + ctags for navigating the code. However we also use CORBA and exuberant ctags does not parse IDL files. Does anyone know of a ctags compatible ...

vi command line equivalent to CTRL-]?

I m trying to map my own shortcuts in vi. I want to be able to open a splitted window containing the declaration of the function I m calling the shortcut on. something like this in my vimrc: nmap <...

Understanding the `ctags -e` file format (ctags for emacs)

I am using "ExuberantCtags" also known as "ctags -e", also known as just "etags" and I am trying to understand the TAGS file format which is generated by the etags command, in particular I want to ...

VIM: How to move between matching tags?

I m a big fan of ctags, but sometimes it is hard to use it. In case when I have a few declaration of the functions with the same name - "ctrl + ]" throws you to the first occurrence - which is not ...

gvim: Is there any way to get an array of strings?

I have in my .vimrc: let g:PROJECT1="/a/b/c" let g:PROJECT2="/d/e/f" I then do a bunch of operations on the above strings: let str=":!/usr/bin/ctags ".g:FLAGS_CPP." -f ".g:TAG_FILE." ".g:PROJECT1 ...

Single user mode in mac

I want to use the mac in single user mode. I want to use ctags and cscope in that mode. Could anyone help me with the setups required for this. Thank you. All i know is how to go to the single user ...

热门标签