# KiwiSDR gdb init

# misc
set pagination off

# make a breakpoint print backtrace and continue
# comm <breakpoint #>
# bt
# cont
# end

# signals
handle SIGPIPE nostop noprint
handle SIGUSR1 nostop noprint
handle SIGUSR2 nostop noprint

# save breakpoints to a file
define bsave
    save breakpoints /root/.gdb_break
end

# load breakpoints from a file
define bload
    source /root/.gdb_break
end

define ng
    bload
    run -gps -leds
end

define asan
    break __sanitizer::Die
end

define k
    bload
    run -leds
end

# connect to a running valgrind
define vg
    source /root/.gdb_valgrind
end
