- 论坛徽章:
- 0
|
原帖由 balabalacha 于 2005-11-20 10:34 发表
在看<<apue>书的时候,记不住某个结构定义(或是类型定义,或是宏,或是函数)...
就想在/usr/src/里面找源文件看,可同时我也不清楚其具体的定义在哪个文件.
因此,我想问一下,在UNIX系统下(我的是FreeBSD),有 ...
FreeBSD下面查结构体定义用cscope比较简单快捷,根据你要查找的范围,
cd /usr/src 或是 cd /sys,然后cscope -R 即可。
- Global definition: sockaddr_in
- File Line
- 0 in.h 92 struct sockaddr_in {
- 1 ip_output.c 108 (struct ifnet *, struct mbuf *, struct sockaddr_in *, int );
- 2 krpc.h 9 struct sockaddr_in;
- Find this C symbol:
- Find this global definition:
- Find functions called by this function:
- Find functions calling this function:
- Find this text string:
- Change this text string:
- Find this egrep pattern:
- Find this file:
- Find files #including this file:
复制代码 |
|