2012-12-18 7 views
7

जब मैं cscope का उपयोग कर सी प्रतीक या वैश्विक परिभाषा की खोज करता हूं, तो यह फ़ाइल-नाम और रेखा संख्या प्रदर्शित करता है। मैं पूर्ण फ़ाइल-पथ देखना चाहता हूं ताकि मैं अपनी आर्क विशिष्ट फ़ाइल पर जा सकूं। उदाहरण के लिए, जब लिनक्स कोड आधार पर cscope निर्माण पर __switch_to के वैश्विक परिभाषा के लिए खोज, मैं मिलता है:खोज के दौरान सीएससीओपी पूर्ण फ़ाइल पथ को कैसे प्रदर्शित करें

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) 

अब, फ़ाइल process.c प्रत्येक arch के लिए अलग है। cscope कैसे पूर्ण फ़ाइल-पथ प्रदर्शित करने के लिए? आर्ग के साथ

उत्तर

6

भागो cscope -pn

-pn डिफ़ॉल्ट के बजाय पिछले n फ़ाइल पथ घटकों प्रदर्शित (1)। फ़ाइल का नाम बिल्कुल प्रदर्शित न करने के लिए 0 का प्रयोग करें।

cscope -p4 साथ चल रहा है और

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) 
में __switch_to परिणामों की वैश्विक परिभाषा के लिए खोज
संबंधित मुद्दे