Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道它ptrace用于实现,
ptrace
它可以在寄存器中获取参数,
但它们只是数字,
strace 如何将它们转换为文字信息?
它只是每个系统调用的硬代码吗?
基本上,是的,它是硬编码的。如果您查看源代码(详细信息),您会看到系统调用的大表和大 switch 语句,它们知道如何解码所有各种参数并返回多个不同操作系统和 CPU 的值