linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Include assembly entry points in TAGS
@ 2006-01-19 23:23 Peter Chubb
  2006-01-21 12:02 ` Ralf Baechle
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Chubb @ 2006-01-19 23:23 UTC (permalink / raw)
  To: linux-kernel, Sam Ravnborg


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 <peterc@gelato.unsw.edu.au> 
 

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Include assembly entry points in TAGS
  2006-01-19 23:23 Include assembly entry points in TAGS Peter Chubb
@ 2006-01-21 12:02 ` Ralf Baechle
  0 siblings, 0 replies; 3+ messages in thread
From: Ralf Baechle @ 2006-01-21 12:02 UTC (permalink / raw)
  To: Peter Chubb; +Cc: linux-kernel, Sam Ravnborg, linux-mips

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Include assembly entry points in TAGS
@ 2005-08-23  0:47 Peter Chubb
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Chubb @ 2005-08-23  0:47 UTC (permalink / raw)
  To: sam; +Cc: linux-kernel


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 <peterc@gelato.unsw.edu.au>

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -1187,7 +1187,7 @@ cscope: FORCE
 	$(call cmd,cscope)
 
 quiet_cmd_TAGS = MAKE   $@
-cmd_TAGS = $(all-sources) | etags -
+cmd_TAGS = $(all-sources) | etags --regex='{asm}/\(GLOBAL_\)?ENTRY(\([^)]+\))/\2/' -
 
 # 	Exuberant ctags works better with -I
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-01-23 12:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-19 23:23 Include assembly entry points in TAGS Peter Chubb
2006-01-21 12:02 ` Ralf Baechle
  -- strict thread matches above, loose matches on Subject: below --
2005-08-23  0:47 Peter Chubb

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).