* Non-web based LXR
@ 2017-10-30 21:55 Tobin C. Harding
2017-10-30 23:26 ` valdis.kletnieks at vt.edu
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Tobin C. Harding @ 2017-10-30 21:55 UTC (permalink / raw)
To: kernelnewbies
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Non-web based LXR
2017-10-30 21:55 Non-web based LXR Tobin C. Harding
@ 2017-10-30 23:26 ` valdis.kletnieks at vt.edu
2017-10-31 0:44 ` Rob Rennison
2017-10-31 2:14 ` Tobin C. Harding
2 siblings, 0 replies; 8+ messages in thread
From: valdis.kletnieks at vt.edu @ 2017-10-30 23:26 UTC (permalink / raw)
To: kernelnewbies
On Tue, 31 Oct 2017 08:55:10 +1100, "Tobin C. Harding" said:
> Does any one use a terminal based source code cross referencer to search
> the kernel tree?
Are you including 'git grep'?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Non-web based LXR
2017-10-30 21:55 Non-web based LXR Tobin C. Harding
2017-10-30 23:26 ` valdis.kletnieks at vt.edu
@ 2017-10-31 0:44 ` Rob Rennison
2017-10-31 2:14 ` Tobin C. Harding
2 siblings, 0 replies; 8+ messages in thread
From: Rob Rennison @ 2017-10-31 0:44 UTC (permalink / raw)
To: kernelnewbies
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 at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
^ permalink raw reply [flat|nested] 8+ messages in thread
* Non-web based LXR
2017-10-30 21:55 Non-web based LXR Tobin C. Harding
2017-10-30 23:26 ` valdis.kletnieks at vt.edu
2017-10-31 0:44 ` Rob Rennison
@ 2017-10-31 2:14 ` Tobin C. Harding
2017-10-31 9:53 ` François
2 siblings, 1 reply; 8+ messages in thread
From: Tobin C. Harding @ 2017-10-31 2:14 UTC (permalink / raw)
To: 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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Non-web based LXR
2017-10-31 2:14 ` Tobin C. Harding
@ 2017-10-31 9:53 ` François
2017-10-31 14:59 ` Mike Harless
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: François @ 2017-10-31 9:53 UTC (permalink / raw)
To: kernelnewbies
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_cscope.html
[2] https://home.regit.org/software/coccigrep/
--
Fran?ois
^ permalink raw reply [flat|nested] 8+ messages in thread
* Non-web based LXR
2017-10-31 9:53 ` François
@ 2017-10-31 14:59 ` Mike Harless
2017-11-01 0:13 ` Tobin C. Harding
2017-11-02 14:31 ` Mike Harless
2 siblings, 0 replies; 8+ messages in thread
From: Mike Harless @ 2017-10-31 14:59 UTC (permalink / raw)
To: kernelnewbies
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_cscope.html
> [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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Non-web based LXR
2017-10-31 9:53 ` François
2017-10-31 14:59 ` Mike Harless
@ 2017-11-01 0:13 ` Tobin C. Harding
2017-11-02 14:31 ` Mike Harless
2 siblings, 0 replies; 8+ messages in thread
From: Tobin C. Harding @ 2017-11-01 0:13 UTC (permalink / raw)
To: kernelnewbies
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Non-web based LXR
2017-10-31 9:53 ` François
2017-10-31 14:59 ` Mike Harless
2017-11-01 0:13 ` Tobin C. Harding
@ 2017-11-02 14:31 ` Mike Harless
2 siblings, 0 replies; 8+ messages in thread
From: Mike Harless @ 2017-11-02 14:31 UTC (permalink / raw)
To: kernelnewbies
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_cscope.html
> [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
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-11-02 14:31 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-30 21:55 Non-web based LXR Tobin C. Harding
2017-10-30 23:26 ` valdis.kletnieks at vt.edu
2017-10-31 0:44 ` Rob Rennison
2017-10-31 2:14 ` Tobin C. Harding
2017-10-31 9:53 ` François
2017-10-31 14:59 ` Mike Harless
2017-11-01 0:13 ` Tobin C. Harding
2017-11-02 14:31 ` Mike Harless
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).