From mboxrd@z Thu Jan 1 00:00:00 1970 From: jsitnicki@gmail.com (Jakub Sitnicki) Date: Wed, 27 Apr 2016 22:26:26 +0200 Subject: unable to find function definition In-Reply-To: <2cab8174b247724af07b444437ee423c@sillymon.ch> References: <20160420072625.GA27201@portege.ulakbim.gov.tr> <2cab8174b247724af07b444437ee423c@sillymon.ch> Message-ID: <87oa8u4x3h.fsf@frog.home> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Tue, Apr 26, 2016 at 12:45 PM CEST, Silvan Jegen wrote: > Am 2016-04-26 10:50, schrieb Gadre Nayan: >> Ctags can help. Ctags -R on the entire source. > > In the Kernel Makefile there is actually a target for this. It's called > either 'tags' or 'tag' so > > make tags [or tag] > > should create the ctag file for you. An alternative would be to use cscope: $ # build the index (will take a moment) $ make cscope $ # find all assignments to a symbol $ cscope -d -L -9 platform_gpio_blink_set drivers/leds/leds-gpio.c 130 led_dat->platform_gpio_blink_set = blink_set; $ # or find all occurrences of a symbol and grep for assignments $ cscope -d -L -0 platform_gpio_blink_set | grep = drivers/leds/leds-gpio.c 130 led_dat->platform_gpio_blink_set = blink_set; The latter, for some reason, runs faster for me. -Jakub