Search code examples
c++vimstltagsgdb

Cannot generate c++ STL tag files for vim use


I'm a heavy vim user and often jump to function's implementation via ctrl-]. I wanna do the same thing for standard library. Here is how to generate tags file.

  1. I have two versions of gcc/g++, one is system default 4.4.4 with source at usr/include/c++/4.4.4, and 4.9.1 with source at /opt/gcc/include/c++/4.9.1.
  2. Command to generate tags file for 4.4.4 -

    ctags -R --c++-kinds=+px --fields=+iaS --extra=+q /usr/include/c++/4.4.4

    This works well. After adding the generated tags file to vim, I can use ctrl-] without problem.

  3. However I cannot get correct tags file for 4.9.1 with same command -

    ctags -R --c++-kinds=+px --fields=+iaS --extra=+q /opt/gcc/include/c++/4.9.1

    The generated file size is much smaller than above version. I checked the tags file and functions' tag is not there.

Surprisingly, I can step into the STL source code (4.9.1) when debugging my program with gdb. I have same problem under CentOS 6 and 7.

What am I missing? Can anyone share idea?


Solution

  • Looks few devs use tags file for STL. Still no clear answer and Closed.