

{"id":31,"date":"2007-08-22T17:54:57","date_gmt":"2007-08-22T21:54:57","guid":{"rendered":"http:\/\/www.mpagano.com\/blog\/?p=31"},"modified":"2007-08-22T17:59:26","modified_gmt":"2007-08-22T21:59:26","slug":"browsing-the-linux-kernel-source","status":"publish","type":"post","link":"https:\/\/www.mpagano.com\/blog\/?p=31","title":{"rendered":"Browsing the Linux Kernel source"},"content":{"rendered":"<p>I recently started using <a href=\"http:\/\/cscope.sourceforge.net\/\">cscope<\/a> and I thought I&#8217;d briefly type up the quick start for browsing the kernel source<\/p>\n<p>1. emerge cscope<br \/>\n2. identify a directory to put your cscope generated files (~\/cscope)<br \/>\n3. run the command to extract the appropiate files that will included in the search. This command and more detailed instructions can be obtained from <a href=\"http:\/\/cscope.sourceforge.net\/large_projects.html\">here<\/a> thanks to Jason Duell.<\/p>\n<p><code><br \/>\nfind  $LNX                                                                \\<br \/>\n-path \"$LNX\/arch\/*\" ! -path \"$LNX\/arch\/i386*\" -prune -o               \\<br \/>\n-path \"$LNX\/include\/asm-*\" ! -path \"$LNX\/include\/asm-i386*\" -prune -o \\<br \/>\n-path \"$LNX\/tmp*\" -prune -o                                           \\<br \/>\n-path \"$LNX\/Documentation*\" -prune -o                                 \\<br \/>\n-path \"$LNX\/scripts*\" -prune -o                                       \\<br \/>\n-path \"$LNX\/drivers*\" -prune -o                                       \\<br \/>\n-name \"*.[chxsS]\" -print &gt;~\/cscope\/cscope.files<\/code><\/p>\n<p>4. execute <code>cscope -b -q -k in ~\/cscope<\/code><br \/>\n5. run <code>cscope -d<\/code><\/p>\n<p>I was looking for the define of module_param_named and cscope told me where was in sub-second time:<\/p>\n<p>Global definition: module_param_named<\/p>\n<p>File          Line<br \/>\n0 moduleparam.h 81 #define module_param_named(name, value, type, perm) \\<\/p>\n<p>Find this C symbol:<br \/>\nFind this global definition: module_param_named<br \/>\nFind functions called by this function:<br \/>\nFind functions calling this function:<br \/>\nFind this text string:<br \/>\nChange this text string:<br \/>\nFind this egrep pattern:<br \/>\nFind this file:<br \/>\nFind files #including this file:<\/p>\n<p>cscope home page:<br \/>\n<a href=\"http:\/\/cscope.sourceforge.net\/large_projects.html\">http:\/\/cscope.sourceforge.net\/large_projects.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I recently started using cscope and I thought I&#8217;d briefly type up the quick start for browsing the kernel source 1. emerge cscope 2. identify a directory to put your cscope generated files (~\/cscope) 3. run the command to extract&hellip; <br \/><a class=\"read-more-button\" href=\"https:\/\/www.mpagano.com\/blog\/?p=31\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-31","post","type-post","status-publish","format-standard","hentry","category-gentoo"],"_links":{"self":[{"href":"https:\/\/www.mpagano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/31","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mpagano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mpagano.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mpagano.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mpagano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=31"}],"version-history":[{"count":0,"href":"https:\/\/www.mpagano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/31\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.mpagano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=31"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mpagano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=31"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mpagano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=31"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}