I have a script which debugs my application and it does set 2 breakpoints. If I would be debugging it manually I would be able to see which one got triggered. But doing it in an automatic manner, I don't know which breakpoint was reached, is there a way to write if conditions or something to detect which one was reached?
If this feature is not possible with vanilla gdb but only with python gdb I would be happy to switch/upgrade the process.
Edit: With Tom's help I can have
break main
commands
set $gdb_breakpoint=1
end
break main.cpp:4053
commands
set $gdb_breakpoint=2
end
break fault_handler.cpp:55
commands
set $gdb_breakpoint=3
end
break unit_tests_complete
commands
set $gdb_breakpoint=4
end
And then when the breakpoints got triggered I can check the variable to know where I got halted. In a pure software context this could be easier and maybe multiple breakpoints wouldn't be needed to begin with. This is testing hardware where the fault could happen erratically then this approach should do the trick.