c - macOS ptrace PT_GETREGS 似乎不存在
问题描述
我想尝试使用ptrace
. 似乎大多数实现ptrace
都有某种PTRACE_GETREGS
返回 a 的选项struct user_regs_struct
。
但是在查看ptrace 的 macOS 文档后,我有点困惑,因为没有选项可以PT_GETREGS
作为request
参数的选项列出。但是在“错误”的底部,文档说:
[EINVAL] oo PT_GETREGS, PT_SETREGS, PT_GETFPREGS, or PT_SETFPREGS was attempted on a process with no valid register set. (This is normally true only of system processes.)
这似乎意味着PT_GETREGS
存在。我试过使用它,但我得到了
error: use of undeclared identifier 'PT_GETREGS'
PT_GETREGS
macOS ptrace 中确实存在吗?
解决方案
推荐阅读
- lambda - 不使用 map 和 lambda 等函数的 Racket 中的排列列表
- python - 只有在命令成功后才开始冷却 discord.py
- python - 使用时区将日期字符串解析为日期时间
- spring - 使用 Apache Camel 发送多个 http 请求
- html - 如何创建 GWT 页面?
- reactjs - SvgUri 导入失败。反应原生
- spring - Spring Hibernate Criteria API Builder 将列表参数传递给函数
- uno-platform - Uno-platform:画布不是像素,而是按比例缩放
- html - 使用图像指示器更改 Bootstrap 轮播中的不透明度
- java - 在方法之后调用调度程序