Set breakpoint on every line in GDB

后端 未结 3 1228
一个人的身影
一个人的身影 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
    闹比i (楼主)
    2021-02-15 06:43

    PowerPC has hardware support for ranged breakpoints, and GCB offers:

    break-range start end
    

    in that arch. So I think you could just break on the entire memory address, or the entire text section (untested).

    The command fails on x86.

    Doc: https://sourceware.org/gdb/onlinedocs/gdb.html#index-break_002drange-1548

提交回复
热议问题