When I search for a C symbol or global definition using cscope
, it displays the file-names and line numbers. I would like to see the full file-paths so that I can jump to my arch specific file. For example, when searching for global definition of __switch_to
on cscope
build on Linux code-base, I get:
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)
Now, the file process.c
is different for each arch
. How to make cscope
display the full file-paths?
Run cscope with args -pn
Running with cscope -p4 and searching for global definition of __switch_to results in