gem5-users@gem5.org

The gem5 Users mailing list

View all threads

Noob question about cscope with vim

LZ
Libo Zhou
Mon, Oct 28, 2019 3:00 AM

Hi all,

There is a python script that generates cscope.file and cscope.out in gem5.
When I use ctags, I generate tags in the src root and then "set tags=./tags;" in my .vimrc to make all sub-directories find my tags.
In cscope tutorial, "cs add cscope.out" apparently doesn't do that. I know I can make it work with script, but I'm not sure if there is a more elegant way, just like "set tags=./tags;".

Hi all, There is a python script that generates cscope.file and cscope.out in gem5. When I use ctags, I generate tags in the src root and then "set tags=./tags;" in my .vimrc to make all sub-directories find my tags. In cscope tutorial, "cs add cscope.out" apparently doesn't do that. I know I can make it work with script, but I'm not sure if there is a more elegant way, just like "set tags=./tags;".
CS
Ciro Santilli
Mon, Oct 28, 2019 8:39 AM

I am not familiar with cscope, but I'll give the following advice:

  • the question is welcome here, but for questions that are not
    strictly linked to gem5, you will get better answers faster by asking
    directly on Stack Overflow or https://vi.stackexchange.com/
  • use Eclipse CDT. It is not perfect, and there is a setup / learning
    cost, but the "C++ class awareness" is really worth it, e.g. finding
    only usages of members only for for the right class class and viewing
    virtual methods in the class hierarchy. Some setup tips at:
    https://cirosantilli.com/linux-kernel-module-cheat/#gem5-eclipse-configuration

On Mon, Oct 28, 2019 at 3:00 AM Libo Zhou <zhlb29(a)foxmail.com> wrote:

Hi all,

There is a python script that generates cscope.file and cscope.out in gem5.
When I use ctags, I generate tags in the src root and then "set tags=./tags;" in my .vimrc to make all sub-directories find my tags.
In cscope tutorial, "cs add cscope.out" apparently doesn't do that. I know I can make it work with script, but I'm not sure if there is a more elegant way, just like "set tags=./tags;".


gem5-users mailing list
gem5-users(a)gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

I am not familiar with cscope, but I'll give the following advice: - the question is welcome here, but for questions that are not strictly linked to gem5, you will get better answers faster by asking directly on Stack Overflow or https://vi.stackexchange.com/ - use Eclipse CDT. It is not perfect, and there is a setup / learning cost, but the "C++ class awareness" is really worth it, e.g. finding only usages of members only for for the right class class and viewing virtual methods in the class hierarchy. Some setup tips at: https://cirosantilli.com/linux-kernel-module-cheat/#gem5-eclipse-configuration On Mon, Oct 28, 2019 at 3:00 AM Libo Zhou <zhlb29(a)foxmail.com> wrote: > > Hi all, > > There is a python script that generates cscope.file and cscope.out in gem5. > When I use ctags, I generate tags in the src root and then "set tags=./tags;" in my .vimrc to make all sub-directories find my tags. > In cscope tutorial, "cs add cscope.out" apparently doesn't do that. I know I can make it work with script, but I'm not sure if there is a more elegant way, just like "set tags=./tags;". > _______________________________________________ > gem5-users mailing list > gem5-users(a)gem5.org > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users