Set breakpoint on every line in GDB

后端 未结 3 1237
一个人的身影
一个人的身影 2021-02-15 06:04

Is there a way to set a breakpoint at every line in the code with GDB? Obviously I don\'t want to hit b *addr for every single line, so I\'m wondering if there\'s a

3条回答
  •  -上瘾入骨i
    2021-02-15 06:49

    Use si (stepi) to instruction step through the code. You can use ni (nexti) to step over library functions you're not interested in. If you accidentally step into one of them, finish should get you back to your original routine. People working at this level typically have gdb set to display the next few instructions that are about to be executed, e.g. disp/3i $pc.

提交回复
热议问题