Linux 中的所有系统调用都在哪里恢复?

发布于 2024-10-28 21:20:07 字数 148 浏览 5 评论 0原文

pstrace可用于跟踪所有SYSCALL,

但是所有SYSCALL都在哪里恢复?

我需要知道这一点,以便我可以使用 grep xxx 来知道 xxx 是否是系统调用。

pstrace can be used to trace all syscalls,

but where are all syscalls restored??

I need to know this so that I can use grep xxx to know whether xxx is a syscall..

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

摘星┃星的人 2024-11-04 21:20:07

我认为您参考strace,并且要过滤其输出。

-e strace的选项使您有能力决定应打印哪些呼叫。这是手册中的摘录:

-e trace=file
               Trace  all  system  calls  which  take  a  file  name  as  an  argument.   You  can  think of this as an abbreviation for
               -e trace=open,stat,chmod,unlink,...  which is useful to seeing what files the process is referencing.  Furthermore, using
               the abbreviation will ensure that you don't accidentally forget to include a call like lstat in the list.  Betchya woulda
               forgot that one.

   -e trace=process
               Trace all system calls which involve process management.  This is useful for watching the fork, wait, and exec steps of a
               process.

   -e trace=network
               Trace all the network related system calls.

   -e trace=signal
               Trace all signal related system calls.

   -e trace=ipc
               Trace all IPC related system calls.

   -e trace=desc
               Trace all file descriptor related system calls.

您还可以选择单个系统调用。

I think that you refer to strace and you want to filter its output.

The -e option of strace gives you the power to decide which calls should be printed. Here is an excerpt from the manual:

-e trace=file
               Trace  all  system  calls  which  take  a  file  name  as  an  argument.   You  can  think of this as an abbreviation for
               -e trace=open,stat,chmod,unlink,...  which is useful to seeing what files the process is referencing.  Furthermore, using
               the abbreviation will ensure that you don't accidentally forget to include a call like lstat in the list.  Betchya woulda
               forgot that one.

   -e trace=process
               Trace all system calls which involve process management.  This is useful for watching the fork, wait, and exec steps of a
               process.

   -e trace=network
               Trace all the network related system calls.

   -e trace=signal
               Trace all signal related system calls.

   -e trace=ipc
               Trace all IPC related system calls.

   -e trace=desc
               Trace all file descriptor related system calls.

You can also select individual system calls.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文