免费注册 查看新帖 |

Chinaunix

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

[学习分享] 帮忙分析一下/proc/pid/syscall [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-05-02 15:52 |只看该作者 |倒序浏览
原码:#ifdef CONFIG_HAVE_ARCH_TRACEHOOK
489 static int proc_pid_syscall(struct task_struct *task, char *buffer)
490 {
491         long nr;
492         unsigned long args[6], sp, pc;
493         int res = lock_trace(task);
494         if (res)
495                 return res;
496
497         if (task_current_syscall(task, &nr, args, 6, &sp, &pc))
498                 res = sprintf(buffer, "running\n");
499         else if (nr < 0)
500                 res = sprintf(buffer, "%ld 0x%lx 0x%lx\n", nr, sp, pc);
501         else
502                 res = sprintf(buffer,
503                        "%ld 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx\n",
504                        nr,
505                        args[0], args[1], args[2], args[3], args[4], args[5],
506                        sp, pc);
507         unlock_trace(task);
508         return res;
509 }
510 #endif /* CONFIG_HAVE_ARCH_TRACEHOOK */
打印出来142 0x16 0xbf9bb1d0 0xbf9bb250 0xbf9bb2d0 0x0 0xbf9bb2d0 0xbf9bb180 0xb7762424
是都是什么信息 ?
谢谢!

论坛徽章:
16
IT运维版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每月发帖之星
日期:2015-09-11 19:30:52IT运维版块每周发帖之星
日期:2015-09-11 19:20:31IT运维版块每日发帖之星
日期:2015-08-26 06:20:00每日论坛发贴之星
日期:2015-08-20 06:20:00IT运维版块每日发帖之星
日期:2015-08-20 06:20:002015年辞旧岁徽章
日期:2015-03-03 16:54:15金牛座
日期:2014-05-04 16:58:09双子座
日期:2013-12-17 16:44:37辰龙
日期:2013-11-22 15:20:59狮子座
日期:2013-11-18 22:55:08射手座
日期:2013-11-12 10:54:26
2 [报告]
发表于 2013-05-02 17:25 |只看该作者
please refer linux programming manual for detail.

论坛徽章:
0
3 [报告]
发表于 2013-05-03 15:05 |只看该作者
哦,谢谢。。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP