If you are debugging with gdb on Linux then you should seriously consider using rr: lightweight recording & deterministic debugging, which originated from Mozilla, where the lead developer was and still is Robert O'Callahan.