免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1556 | 回复: 1
打印 上一主题 下一主题

[内核模块] struct module_sect_attrs 头文件是什么 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-08-27 18:23 |只看该作者 |倒序浏览
我编译linux内核 2.6.27,打开KGDB: kernel debugging with remote gdb 就会报如下错误:

  CC      kernel/module.o
kernel/module.c: In function 'free_sect_attrs':
kernel/module.c:1102: error: dereferencing pointer to incomplete type
kernel/module.c:1103: error: dereferencing pointer to incomplete type
kernel/module.c: In function 'add_sect_attrs':
kernel/module.c:1119: error: dereferencing pointer to incomplete type
kernel/module.c:1119: error: dereferencing pointer to incomplete type


经过查看modules.c代码,是struct module_sect_attrs 没有定义,搜索整个内核代码也找不到定义,

请教专家,这个类型是哪里的,谢谢。

论坛徽章:
9
辰龙
日期:2014-08-18 20:38:42未羊
日期:2014-09-04 08:50:45丑牛
日期:2014-09-06 00:12:55寅虎
日期:2014-12-22 20:50:56摩羯座
日期:2015-01-14 22:28:15巳蛇
日期:2015-01-23 20:39:272015年辞旧岁徽章
日期:2015-03-03 16:54:1515-16赛季CBA联赛之青岛
日期:2016-03-13 23:37:1915-16赛季CBA联赛之深圳
日期:2016-03-29 18:52:38
2 [报告]
发表于 2014-08-27 21:48 |只看该作者
回复 1# hwa_super

http://lxr.oss.org.cn/source/kernel/module.c?v=2.6.30#L1129
1121 #if defined(CONFIG_KALLSYMS) && defined(CONFIG_SYSFS)
1122 struct module_sect_attr
1123 {
1124         struct module_attribute mattr;
1125         char *name;
1126         unsigned long address;
1127 };
1128
1129 struct module_sect_attrs
1130 {
1131         struct attribute_group grp;
1132         unsigned int nsections;
1133         struct module_sect_attr attrs[0];
1134 };
   
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP