Skip to contentSkip to conversation

kbuild: add sys_* entries for syscalls in tags

PATCH Superseded Rabin Vincent 3 participants 4 messages Jan 25, 2009 – Feb 15, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kbuild: add sys_* entries for syscalls in tags

Currently, it is no longer possible to use the tags file to jump to system call function definitions with sys_foo because the definitions are obscured by the use of the SYSCALL_DEFINE* macros.

This patch adds the appropriate option to ctags to make it see through the macro.

---
 scripts/tags.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
scripts/tags.sh +2 -1
index fdbe78b..0d58f48 100755
@@ -99,7 +99,8 @@ exuberant()
 	-I ____cacheline_internodealigned_in_smp                \
 	-I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL                      \
 	--extra=+f --c-kinds=+px                                \
-	--regex-asm='/^ENTRY\(([^)]*)\).*/\1/'
+	--regex-asm='/^ENTRY\(([^)]*)\).*/\1/'                  \
+	--regex-c='/^SYSCALL_DEFINE[[:digit:]]?\(([^,)]*).*/sys_\1/'
 
 	all_kconfigs | xargs $1 -a                              \
 	--langdef=kconfig --language-force=kconfig              \
Signature · 1 line
1.5.6.5
#1 lore raw
Quoted 17 lines · Rabin Vincent

Currently, it is no longer possible to use the tags file to jump to system call function definitions with sys_foo because the definitions are obscured by the use of the SYSCALL_DEFINE* macros.

This patch adds the appropriate option to ctags to make it see through the macro.

---
 scripts/tags.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
scripts/tags.sh +0 -0
index fdbe78b..0d58f48 100755

scripts/tags.sh exuberant() · line 103

Quoted 6 lines
scripts/tags.sh +2 -1
@@ -99,7 +99,8 @@ exuberant()
 	-I ____cacheline_internodealigned_in_smp                \
 	-I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL                      \
 	--extra=+f --c-kinds=+px                                \
-	--regex-asm='/^ENTRY\(([^)]*)\).*/\1/'
+	--regex-asm='/^ENTRY\(([^)]*)\).*/\1/'                  \
+	--regex-c='/^SYSCALL_DEFINE[[:digit:]]?\(([^,)]*).*/sys_\1/'

You should patch emacs() as well.

#2 lore raw

PATCH v2 1/1 kbuild: add sys_* entries for syscalls in tags

Currently, it is no longer possible to use the tags file to jump to system call function definitions with sys_foo, because the definitions are obscured by use of the SYSCALL_DEFINE* macros.

This patch adds the appropriate option to ctags to make it see through the macro. Also, it adds the ENTRY() work already done for Exuberant to Emacs too.

---
This version of the patch makes the modifications for emacs too.

 scripts/tags.sh |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
scripts/tags.sh +5 -2
index fdbe78b..fe7c99d 100755
@@ -99,7 +99,8 @@ exuberant()
 	-I ____cacheline_internodealigned_in_smp                \
 	-I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL                      \
 	--extra=+f --c-kinds=+px                                \
-	--regex-asm='/^ENTRY\(([^)]*)\).*/\1/'
+	--regex-asm='/^ENTRY\(([^)]*)\).*/\1/'                  \
+	--regex-c='/^SYSCALL_DEFINE[[:digit:]]?\(([^,)]*).*/sys_\1/'
 
 	all_kconfigs | xargs $1 -a                              \
 	--langdef=kconfig --language-force=kconfig              \
@@ -117,7 +118,9 @@ exuberant()
 
 emacs()
 {
-	all_sources | xargs $1 -a
+	all_sources | xargs $1 -a                               \
+	--regex='/^ENTRY(\([^)]*\)).*/\1/'                      \
+	--regex='/^SYSCALL_DEFINE[0-9]?(\([^,)]*\).*/sys_\1/'
 
 	all_kconfigs | xargs $1 -a                              \
 	--regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/\3/'
Signature · 1 line
1.5.6.5
#3 lore raw
Quoted 9 lines · Rabin Vincent

Currently, it is no longer possible to use the tags file to jump to system call function definitions with sys_foo, because the definitions are obscured by use of the SYSCALL_DEFINE* macros.

This patch adds the appropriate option to ctags to make it see through the macro. Also, it adds the ENTRY() work already done for Exuberant to Emacs too.

Applied to kbuild-fixes.git.

Sam