LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Which IDE should I ideally use for browsing Linux Kernel Source Code? (https://www.linuxquestions.org/questions/linux-newbie-8/which-ide-should-i-ideally-use-for-browsing-linux-kernel-source-code-4175624930/)

purnish_dave 03-04-2018 11:13 AM

Which IDE should I ideally use for browsing Linux Kernel Source Code?
 
If I come across a variable and function name which isn't defined in the same file it's practically impossible to find in other files.
Which command I can use or which IDEs can I use for this?

Thanks for your time.

AwesomeMachine 03-04-2018 01:03 PM

You can use grep.
Code:

$ grep -r string directory
will return every matching string in all files and subdirectories in directory.

pan64 03-04-2018 01:08 PM

originally it was ctags to do that, you do not need any kind of IDE.
https://en.wikipedia.org/wiki/Ctags
https://linux.die.net/man/1/ctags

xamaco 03-05-2018 03:35 AM

Just to add to pan64: Once you tags are generated, advanced editors like vim or emacs have commands to jump from the name of a function to it's definition, etc...

purnish_dave 03-05-2018 03:41 AM

Quote:

Originally Posted by xamaco (Post 5827399)
Just to add to pan64: Once you tags are generated, advanced editors like vim or emacs have commands to jump from the name of a function to it's definition, etc...

Thanks for the answer. I will use ctags and come back if I have any more questions.

purnish_dave 03-05-2018 04:39 AM

I set up CTags. It's really cool. I use it with vim.

purnish_dave 03-05-2018 04:54 AM

I have one strange issue with ctags.

There is a line in the code like this


Code:

struct bio *bio;
When I run

Code:

:tag bio
it returns to the same line.

I however want it to go to where the struct is defined.

How do I do this?

purnish_dave 03-05-2018 06:48 AM

I figured it out.

All I have to do is to type

Code:

:ts bio

pan64 03-05-2018 07:07 AM

great! glad to help you.
If you were satisfied please mark the thread solved.
Also if you want to say thanks just click on yes.


All times are GMT -5. The time now is 03:29 AM.