我想在gdb中运行以下命令:
while 1
x $pc
stepi
end
但我不想输出stepi命令。有没有办法只禁用stepi命令输出?
答案 0 :(得分:0)
您可以尝试gdbpython:
while True:
gdb.execute("x/i $pc") # you can see the output on terminal
gdb.execute("stepi", to_string=True) # so that you cannot see its output
# some stop criteria here?
像这样输入gdb:
python
while True:
gdb.execute("x/i $pc")
gdb.execute("stepi", to_string=True)
end