I am looking for a command line utility on *nix, that can dump the names of all the functions, classes etc. defined in a file(C/C++/Java)
+5
A:
ctags can give you that (and much more). It is included with most Linux distributions...
http://ctags.sourceforge.net/whatis.html
Gilad Naor
2010-09-27 06:29:50
i know about ctags, but it generates its tags file, which then is needed to be imported to an editor e.g. vim. I was asking for a simple utility, that just prints the function names on console, if ctags does that I am not sure
Anonymous
2010-09-27 06:34:23
then you want `ctags -x`, which prints a human readable summary of stuff.
TokenMacGuy
2010-09-27 06:39:55
Also `ctags -f -` prints the output to stdout, and not a tag file. You can then use `awk` or something similar...
Gilad Naor
2010-09-27 06:41:32
A:
It is not clear which language you refer to: if:
- complied elf file then you have readelf utility providing that you compiled file with debug information "-g"
Gadolin
2010-09-27 06:30:48
A:
Not sure if it would be useful for your exact purpose, but take a look at GCC-XML
Antonio Perez
2010-09-27 07:49:13