On 19-12-07 21:31, Binyamin Dissen wrote:

I am looking at the kernel and I see a call to foobar.

How can I easily determine which source file has the foobar code?

The easiest way is using an editor that supports "tags". After you run "make tags" in the root of the source tree (and have the ctags program installed) "vim -t foobar" will take you to the definition of the "foobar" function.

Well, to _a_ definition of foobar at least. It doesn't work all that well when there's multiple things named foobar, which happens quite a lot.

The -t command line option is not the main tag usage in vim -- htting Ctrl-[ with the cursor on "foobar" is. Ctrl-T to return to the previous spot. ":ts" to select from a list of matching tags, and ":help tags" for more.

See "make TAGS" for equivalent Emacs functionality, "cscope" for another useful tool, "lxr" for generating hyperlinked HTML from the tree...

Rene,

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to