I have a build program with multiple labels on different lines. I need to set gdb breakpoint on two lines after line with label. How to do this in gdb without adding an extra label to the program?
gdb
gdb supports adding breakpoints X bytes after the label, and since each instruction has 4 bytes, I needed to do the following:
*&labelname + 8
b foo , where foo is the line number in the source.
b foo
foo