I'd suggest trying out lldb [0] as an alternative to gdb. In general it has more sensible commands [1] and it can be scripted with python.
If you're willing to pay, CLion [2] is amazing and it includes an interactive debugger [3] which, IMO, completely blows away these CLI tools.
[0] https://lldb.llvm.org/index.html
[1] https://lldb.llvm.org/lldb-gdb.html