How to go to the previous line in GDB?

前端 未结 9 819
北荒
北荒 2020-11-29 16:33

Is it possible in gdb to go to a line before the currently executing line. e.g:


void my_fun( somePtrType** arr,int start,int end)
{
 // arr is an array of p         


        
9条回答
  •  孤街浪徒
    2020-11-29 17:29

    If your program is short, the usual trick is,

    1. Place a new breakpoint at the previous line
      • fire r to restart the debug

    GDB was made to do that!

提交回复
热议问题