5
votes

I'm running through some assembly code in GDB trying to debug my program and I'd like to see what happens if I ignore an instruction entirely, is there a way to do this? (skip past it to the next line without executing it) without having to edit the source code and comment out the function and then recompile?

1
stackoverflow.com/questions/4037308/… gives a correct solution. The command is jump.Alexander Lin

1 Answers

6
votes

is there a way to do this

Sure: jump *0x1234 will jump to instruction at address 0x1234.

skip past it to the next line without executing it

"Next line" and assembly debugging rarely go together. As this answer shows, you can skip a line as well.