2012-12-18 26 views
7

cscope kullanarak bir C simgesi veya genel tanımı ararken, dosya adlarını ve satır numaralarını görüntüler. Tam dosya yollarını görmek istiyorum, böylece arşivime özel dosyama atlayabilirim. Linux kod tabanı üzerinde cscope yapı üzerinde __switch_to küresel tanımı ararken Örneğin, ben alıyorum:Cscope, arama sırasında tam dosya yollarını görüntülemeyi nasıl sağlar

Global definition: __switch_to 

    File   Line 
0 process.c 297 struct task_struct *__switch_to(struct task_struct *prev, 
1 switch_to.h 44 #define __switch_to(prev,next,last) do { \ 
2 process.c 202 struct task_struct *__switch_to(struct task_struct *old, 
3 process.c 400 struct task_struct *__switch_to(struct task_struct *prev, 
4 process_32.c 211 __switch_to(struct task_struct *prev, struct task_struct *next) 
5 process.c  80 void *__switch_to(struct task_struct *from, struct task_struct *to) 
6 process_32.c 248 __switch_to(struct task_struct *prev_p, struct task_struct *next_p) 
7 process_64.c 272 __switch_to(struct task_struct *prev_p, struct task_struct *next_p) 

Şimdi, dosya process.c her arch için farklıdır. Tüm dosya yollarını görüntülemek cscope nasıl yapılır? args ile

cevap

6

Çalıştır cscope

varsayılan yerine geçen n dosya yolu bileşenlerini görüntüler -pn -pn (1). Dosya adını hiç görüntülemek için 0 kullanmayın.

cscope P4 ile Koşu ve

Global definition: __switch_to 

    File       Line 
0 arch/arm64/kernel/process.c 297 struct task_struct *__switch_to(struct task_struct *prev, 
1 ia64/include/asm/switch_to.h 44 #define __switch_to(prev,next,last) do { \ 
2 arch/openrisc/kernel/process.c 202 struct task_struct *__switch_to(struct task_struct *old, 
3 arch/powerpc/kernel/process.c 400 struct task_struct *__switch_to(struct task_struct *prev, 
4 arch/sh/kernel/process_32.c 211 __switch_to(struct task_struct *prev, struct task_struct *next) 
5 arch/um/kernel/process.c  80 void *__switch_to(struct task_struct *from, struct task_struct *to) 
6 arch/x86/kernel/process_32.c 248 __switch_to(struct task_struct *prev_p, struct task_struct *next_p) 
7 arch/x86/kernel/process_64.c 272 __switch_to(struct task_struct *prev_p, struct task_struct *next_p) 
yılında __switch_to sonuçlarının küresel tanımı için arama