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.
在.gdbinit我调用函数
.gdbinit
call open("tmp/test",1)
然后我得到了返回值
$15 = 1
我想使用$15到下一个操作。
$15
我怎样才能把这个 var 放到.gdbinit下一行?
您可以简单地将返回值分配给具有您选择的名称的变量:
(gdb) call $ret = open("tmp/test", 1) (gdb) print $ret -1