2006-01-19 23:24:01

by Peter Chubb

[permalink] [raw]
Subject: Re: Include assembly entry points in TAGS


As it stands, etags doesn't find labels in the IA64 or i386 assembler source
code, because they're disguised inside a preprocessor macro.

I propose the attached fix, which adds a regular expression to enable
labels disguised by ENTRY() and GLOBAL_ENTRY() macros.

There's a similar problem for MIPS, which needs to match LEAF(entrypoint)

Signed-off-by: Peter Chubb <[email protected]>


If you're using Emacs and TAGS, it's useful to be able to get the
global assembler variables as tags into the TAGS file. But they're
hidden by a macro. This patch teaches etags about the macro.

Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6-vmm/Makefile
===================================================================
--- linux-2.6-vmm.orig/Makefile 2006-01-17 11:38:27.544972040 +1100
+++ linux-2.6-vmm/Makefile 2006-01-17 11:42:02.587956460 +1100
@@ -1251,7 +1251,7 @@ define cmd_TAGS
echo "-I __initdata,__exitdata,__acquires,__releases \
-I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \
--extra=+f --c-kinds=+px"`; \
- $(all-sources) | xargs etags $$ETAGSF -a
+ $(all-sources) | xargs etags $$ETAGSF -a --regex='{asm}/^\(GLOBAL_\)?ENTRY(\([^)]*\))/\2/'
endef

TAGS: FORCE


2006-01-23 12:30:41

by Ralf Baechle

[permalink] [raw]
Subject: Re: Include assembly entry points in TAGS

On Fri, Jan 20, 2006 at 10:23:53AM +1100, Peter Chubb wrote:

> As it stands, etags doesn't find labels in the IA64 or i386 assembler source
> code, because they're disguised inside a preprocessor macro.
>
> I propose the attached fix, which adds a regular expression to enable
> labels disguised by ENTRY() and GLOBAL_ENTRY() macros.
>
> There's a similar problem for MIPS, which needs to match LEAF(entrypoint)

There's also NESTED. I don't use etags, so I won't try to cook a patch.

Ralf