Consider a case where a function has 10 lines of code and you are doing a step debugging via GDB and are on line six. You realize that function call at line 4 did some goof up due to which you are at line 5.
Assuming that line 4 function call does not do anything drastic (mem free, etc) you wish to make your SP point @ line 4 and step into that func without re-running that test case.
I have been able to do it by doing registry modification.
What I wanted to know, are there some gdb commands which can help me achieve the above without manual registry mod.
Thanks,
使用此处所述的jump
命令。
只需在您需要的行上设置一个断点(使用 break 命令)并跳转到它(使用 jump 命令)。
If I understand correctly, you want to "step back". This is supported by GDB since version 7. See manual , tutorial or related Stackoverflow topic .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.