我正在尝试在汇编代码中进行调试,以检查高级SIMD向量寄存器中的值。为此,我运行gdb并在我的指令内设置断点,运行layout asm
并使用si
逐步执行我的指令。然而,当我到达所需的指令时,例如p v16
,它没有打印出该寄存器内部的值,并给了我一个类似以下的错误:
│0x4009d0 <Montmul512+80> umull2 v16.2d, v15.4s, v7.s[3] │
>│0x4009d4 <Montmul512+84> umull2 v17.2d, v13.4s, v7.s[3] │
│0x4009d8 <Montmul512+88> umull2 v18.2d, v14.4s, v7.s[3] │
│0x4009dc <Montmul512+92> umull2 v19.2d, v12.4s, v7.s[3] │
│0x4009e0 <Montmul512+96> umull v20.2d, v15.2s, v7.s[3] │
│0x4009e4 <Montmul512+100> umull v21.2d, v13.2s, v7.s[3] │
│0x4009e8 <Montmul512+104> umull v22.2d, v14.2s, v7.s[3] │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
(gdb) print v16
print v16
No symbol "v16" in current context.
我在调试汇编代码方面没有任何经验,所以这个问题对许多人来说可能非常简单。
$
开头。我不知道AArch64,但可以尝试使用p $v16
命令。或者查看info regs
命令。 - Tom Tromey