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.
如何使用 lldb 打印 FPU 寄存器?
在 gdb 中,您会执行类似的操作p $st0,但是在 lldb 中执行相同操作会导致错误:error: use of undeclared identifier '$st0'.
p $st0
error: use of undeclared identifier '$st0'
register read st0也不起作用并给出错误error: Invalid register name 'st0'.。
register read st0
error: Invalid register name 'st0'.
通过register read --all按照建议使用paulsm4,我发现寄存器的名称实际上是stmm0tostmm7而不是st0to st7。
register read --all
paulsm4
stmm0
stmm7
st0
st7
这样做register read stmm0 --format b会给你浮点数的二进制表示。
register read stmm0 --format b