generating tags using ctags seems to be very tricky.
I wanted make tag file for https://elixir.bootlin.com/linux/v5.4.21/source/arch/arm64/include/asm/sysreg.h
you can get this sysreg.h file by
wget https://elixir.bootlin.com/linux/v5.4.21/source/arch/arm64/include/asm/sysreg.h
Please see Can't add reg expression for a #define in ctags. I tried the same method in this answer as below.
ctags --excmd=pattern sysreg.h
I see tag for mrs_s or msr_s in the generated tags file. But I don't see the tag for __mrs_s or __msr_s that I originally wanted. What is wrong?
There is no simple way to satisfy the goal.
sysreg.h contains assembly language code that makes the C++ indexer of ctags confused. See https://elixir.bootlin.com/linux/v5.4.21/source/arch/arm64/include/asm/sysreg.h#L741
(It would be nice to add a feature to the C++ indexer to skip
__ASSEMBLY__and__ASSEMBLER__area.)I found one hacky technique that works only with Universal ctags (https://ctags.io). Your ctags may be Exuberant Ctags. So the technique I will write here may not work with your ctags.
The option
-D...replaces the wordsendmin the__ASSEMBLY__area withendm;. The appended semicolon characters mitigate the indexer's confusion.