CC'd Thomas because I read online recently him commenting on web based cross reference tools. Hi, Does any one use a terminal based source code cross referencer to search the kernel tree? thanks, Tobin.
If you use vim or emacs then cscope is very useful for spelunking the sources. At the top level of your kernel source tree use the cscope target under make make cscope Vim from 7 ish onwards is compiled with +cscope so it automatically recognizes cscope.out files. Within vim you can use the default keybindings of CTRL-] to jump to a definition of a variable or function and CTRL-t to jump back. There are many more for finding for ex who calls a given function. Just make sure you open vim in the top level directory, the same one as the cscope.out file which was created when you invoked "make cscope" Works with emacs too, but I'm not an emacs user. The documentation on cscope can be a bit confusing, since cscope may be used in an interactive curses mode, this is not something I've ever found useful. So focus on investigating vim cscope bindings and vimrc mappings. Cheers Rob Rennison Regarding "searching On 10/31 08:55, Tobin C. Harding wrote:
CC'd Thomas because I read online recently him commenting on web based cross reference tools.
Hi,
Does any one use a terminal based source code cross referencer to search the kernel tree?
thanks, Tobin.
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
On Tue, Oct 31, 2017 at 08:55:10AM +1100, Tobin C. Harding wrote:
CC'd Thomas because I read online recently him commenting on web based cross reference tools.
Hi,
Does any one use a terminal based source code cross referencer to search the kernel tree?
thanks, Tobin.
Responding to all responses in single email. Thanks for the responses. Apologies, I need to learn to be more explicit when asking questions to be more respectful of other peoples time. I already use grep (various versions, git grep, egreg, and ack). I also already use ctags in emacs (or is it called etags when in emacs). I [too] often still find myself going to http://elixir.free-electrons.com I just attempted to recreate an example search that fails using grep or ctags but was unable to. Perhaps the problem is a user error, i.e I come across a code search that is not fully serviced by grep/ctags, go to free-electros, then go back to it from habit only later realizing that I am doing so when I get annoyed with having to use a web browser. So, thank you for your ideas. I'll consider this issue resolved by; Use git grep Use ctags/etags Use free-electrons as a last resort thanks, Tobin.
On Tue, Oct 31, 2017 at 01:14:30PM +1100, Tobin C. Harding wrote:
So, thank you for your ideas. I'll consider this issue resolved by;
Use git grep Use ctags/etags Use free-electrons as a last resort
Also, there's a tool called cscope [1]. There are also occurences of coccigrep [2] in the kernel. [1] https://courses.cs.washington.edu/courses/cse451/12sp/tutorials/tutorial_csc... [2] https://home.regit.org/software/coccigrep/ -- François
François <fser@code-libre.org> wrote:
On Tue, Oct 31, 2017 at 01:14:30PM +1100, Tobin C. Harding wrote:
So, thank you for your ideas. I'll consider this issue resolved by;
Use git grep Use ctags/etags Use free-electrons as a last resort
Also, there's a tool called cscope [1]. There are also occurences of coccigrep [2] in the kernel.
[1] https://courses.cs.washington.edu/courses/cse451/12sp/tutorials/tutorial_csc... [2] https://home.regit.org/software/coccigrep/
and another to add to the list is gscope, which is based off of cscope: * https://github.com/tefletch/gscope --Mike
On Tue, Oct 31, 2017 at 10:53:58AM +0100, François wrote:
On Tue, Oct 31, 2017 at 01:14:30PM +1100, Tobin C. Harding wrote:
So, thank you for your ideas. I'll consider this issue resolved by;
Use git grep Use ctags/etags Use free-electrons as a last resort
Also, there's a tool called cscope [1]. There are also occurences of coccigrep [2] in the kernel.
Cool, thanks François
François <fser@code-libre.org> wrote:
On Tue, Oct 31, 2017 at 01:14:30PM +1100, Tobin C. Harding wrote:
So, thank you for your ideas. I'll consider this issue resolved by;
Use git grep Use ctags/etags Use free-electrons as a last resort
Also, there's a tool called cscope [1]. There are also occurences of coccigrep [2] in the kernel.
[1] https://courses.cs.washington.edu/courses/cse451/12sp/tutorials/tutorial_csc... [2] https://home.regit.org/software/coccigrep/
and another to add to the list is gscope, which is based off of cscope: * https://github.com/tefletch/gscope --Mike
participants (6)
-
François -
Mike Harless -
Mike Harless -
Rob Rennison -
Tobin C. Harding -
valdis.kletnieks@vt.edu