Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Export clink.out with cscope symbol database format #48

Open
pidgeon777 opened this issue Oct 28, 2021 · 3 comments
Open

[Feature] Export clink.out with cscope symbol database format #48

pidgeon777 opened this issue Oct 28, 2021 · 3 comments

Comments

@pidgeon777
Copy link

Many useful tools utilize the cscope output database for further code processing/searches.

It would be a great addition for your tool to export a clink.out file with the same format of the cscope symbol database.

More info follows here, section Symbol Database Format:

https://codecat.tistory.com/entry/cscope-manpage

@Smattr
Copy link
Owner

Smattr commented Oct 28, 2021

Can you give an example of something other than Cscope itself that consumes the Cscope database format? Its format has a number of shortcomings which directly motivated not reusing the same format for Clink. A related question is, if you want to produce a Cscope database, why not use Cscope itself?

@pidgeon777
Copy link
Author

Actually, here are some of the most useful C\C++ source code analyzers which make use of the cscope database:

  1. https://sites.google.com/site/vimcctree/

Vim plugin which builds a symbol tree for code navigation.

  1. http://ruben2020.github.io/codequery/

A great GUI and command-line tool for code navigation.

  1. https://sourceforge.net/projects/tceetree/

Extremely useful for visualizing the source code structure.

It would be great for your tool to generate a cscope.out database file, as an export option.

A related question is, if you want to produce a Cscope database, why not use Cscope itself?

Because cscope would be more limited in C\C++ code parsing.

Anyway, my suggestion was not to replace your clink internal database format, but to allow a user to export it in cscope format, for the reasons expressed above.

@Smattr
Copy link
Owner

Smattr commented Oct 29, 2021

It's certainly possible. A Python script using pycscope would probably be reasonably straightforward for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants