On 06/08/2021 23:25, Grant Edwards wrote:
Would anybody care to recommend a tool for browsing around (and
editing) a tree of somebody-else's C code?

I prefer emacs for day-to-day editing of my code (when I know what's
where), but I'm looking for something to browse around a tree of
unfamiliar source code and make minor changes. I briefly tried
emacs+cscope at a few points in the past, but it just never worked
very well.

It would be nice to have something that I can just point at a tree of
source files and not to have to spend a lot of time setting up a
"project" or "workspace" or whatever...

If emacs has support for compilation databases (a "compile_commands.json" file), then you can generate one. The easiest way to do that is with dev-util/bear:

  $ bear -- make -j16

This will build the project as usual, but a compile_commands.json file will be generated in the current directory. Load that file into an editor or IDE that supports compilation databases.


Reply via email to