问题描述
如何使用lldb打印FPU寄存器?
How do you print FPU registers using lldb?
在gdb中,您将执行类似 p $ st0
的操作,但是在lldb中执行相同操作会导致错误: error:使用未声明的标识符'$ st0'
In gdb, you would do something like p $st0
, however doing the same in lldb results in the error: error: use of undeclared identifier '$st0'
.
寄存器读取的st0
也不起作用,并给出错误 error:无效的寄存器名称'st0'.
.
register read st0
doesn't work either and gives the error error: Invalid register name 'st0'.
.
推荐答案
按照 paulsm4
的建议,使用 register读取--all
,我发现寄存器实际上是 stmm0
到 stmm7
,而不是 st0
到 st7
.
By using register read --all
as suggested by paulsm4
, I found that the name of the registers are actually stmm0
to stmm7
and not st0
to st7
.
因此,执行 register读取stmm0 --format b
将获得浮点数的二进制表示形式.
So doing register read stmm0 --format b
will get you the binary representation of the float.
这篇关于在lldb中打印FPU寄存器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!