Chinaunix
标题:
帮忙分析一下/proc/pid/syscall
[打印本页]
作者:
linux菜鸟一级
时间:
2013-05-02 15:52
标题:
帮忙分析一下/proc/pid/syscall
原码:#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
是都是什么信息 ?
谢谢!
作者:
wenhq
时间:
2013-05-02 17:25
please refer linux programming manual for detail.
作者:
linux菜鸟一级
时间:
2013-05-03 15:05
哦,谢谢。。
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2