[coreboot] I am reading the source code of coreboot, how do I understand the functions

She, Kerry Kerry.She at amd.com
Tue Sep 13 04:39:13 CEST 2011



> -----Original Message-----
> From: coreboot-bounces at coreboot.org
[mailto:coreboot-bounces at coreboot.org]
> On Behalf Of Patrick Georgi
> Sent: Tuesday, September 13, 2011 3:18 AM
> To: coreboot at coreboot.org
> Subject: Re: [coreboot] I am reading the source code of coreboot, how
do
> I understand the functions
> 
> Am Mo 12 Sep 2011 17:48:07 CEST schrieb Jianmin Pan:
> > I am used to use vim.
> > So, anybody have good suggestions?
> Install ctags, run "ctags -R src" in the toplevel directory, which
> creates the "tags" file.
> 
> Then in vi, use ":ta identifier" to look up the declaration of
> identifier, ctrl-] to look up the current word
> (see
http://ctags.sourceforge.net/ctags.html#HOW%20TO%20USE%20WITH%20VI)

Cscope is another choice also,
cscope provice more search types than ctags
http://cscope.sourceforge.net/
http://cscope.sourceforge.net/cscope_vim_tutorial.html
cscope -Rbk to build the database first,
add following section to the ~/.vimrc, then can use the hotkey.
 
if has("cscope")
    " use both cscope and ctag for 'ctrl-]', ':ta', and 'vim -t'
    set cscopetag

    " check cscope for definition of a symbol before checking ctags: set
to 1
    " if you want the reverse search order.
    set csto=0
    
    " add any cscope database in current directory
    if filereadable("cscope.out")
    	""if $CSCOPE_DB != ""
           cs add cscope.out .
        ""endif
    " else add the database pointed to by environment variable
    elseif $CSCOPE_DB != ""
        cs add $CSCOPE_DB
    endif

    " show msg when any other cscope db added
    set cscopeverbose

    " To do the first type of search, hit 'CTRL-\', followed by one of
the
    " cscope search types above (s,g,c,t,e,f,i,d).  The result of your
cscope
    " search will be displayed in the current window.  You can use
CTRL-T to
    " go back to where you were before the search.
    nmap <C-\>s :cs find s <C-R>=expand("<cword>")<CR><CR>
    nmap <C-\>g :cs find g <C-R>=expand("<cword>")<CR><CR>
    nmap <C-\>c :cs find c <C-R>=expand("<cword>")<CR><CR>
    nmap <C-\>t :cs find t <C-R>=expand("<cword>")<CR><CR>
    nmap <C-\>e :cs find e <C-R>=expand("<cword>")<CR><CR>
    nmap <C-\>f :cs find f <C-R>=expand("<cfile>")<CR><CR>
    nmap <C-\>i :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
    nmap <C-\>d :cs find d <C-R>=expand("<cword>")<CR><CR>
endif

thanks
Kerry
> 
> Patrick
> 
> --
> coreboot mailing list: coreboot at coreboot.org
> http://www.coreboot.org/mailman/listinfo/coreboot






More information about the coreboot mailing list