grepc
find declarations, definitions, and uses in source code
- Provided by: manpages (Version: 6.17-1)
- Report a bug
find declarations, definitions, and uses in source code
grepc [option ...] pattern [file ...]
grepc(1) searches for declarations, definitions, and/or uses of pattern in each source file.
pattern is a PCRE pattern. It normally represents an identifier, and word boundaries are implicitly added to it in most cases.
If no file is given, this program reads standard input. Otherwise, it reads all files specified, and searches under any specified directories, recursively, without following symbolic links.
In some cases, internal calls to pcre2grep(1) may fail after consuming too much resources. To solve that, use -t to restrict the types of code of your search.
Files specified in the command line must be seekable and able to be opened twice. If you need to read a non-seekable file, redirect it to the standard input.
alx@devuan:/usr/lib/gcc$ grepc -n alignof .; ./x86_64-linux-gnu/15/include/stdalign.h:33:#define alignof _Alignof