Can I use gdb to skip a line without having to type line numbers?

后端 未结 3 1886
执笔经年
执笔经年 2020-12-07 13:11

I know I can use jump to set the program counter to a specific line and so I can skip one or more lines (or execute some lines again). Can I easily just skip th

3条回答
  •  日久生厌
    2020-12-07 14:05

    To Skip Any Numbers of Lines during Execution:

    [Current Position -- in GDB] Line N
    .......... // Lines To Skip
    ..........
    ..........
    [Line To Execute - After Jumping] Line M
    

    Put a Breakpoint on Line M:

    gdb$b M
    

    Jump To Line M:

    gdb$jump M
    

提交回复
热议问题