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.
我正在用 gdb 调试一些 C 代码。我的程序有一个类型为 的变量mpz_t * retval。如果我运行命令
mpz_t * retval
print *retval
我得到输出
$23 = {{ _mp_alloc = 6, _mp_size = 5, _mp_d = 0x1001008d0 }}
我还能做些什么来获取有关存储的值的更多信息retval吗?
retval
试试这些:
(gdb) set print object on (gdb) set print pretty on (gdb) ptype *retval (gdb) print *retval
你还想知道什么?