diff --git a/gdb/.gdbinit.d/auto b/gdb/.gdbinit.d/auto new file mode 100644 index 0000000..e666ba3 --- /dev/null +++ b/gdb/.gdbinit.d/auto @@ -0,0 +1,19 @@ +dashboard -enabled on +dashboard -layout breakpoints variables source stack threads +dashboard -style prompt 'gdb>' +dashboard -style max_value_length 0 +dashboard variables -style compact True +dashboard variables -style align True +dashboard variables -style sort True +dashboard expressions -style align True +dashboard stack -style sort True + +define expand + dashboard -style compact_values False +end + +define pack + dashboard -style compact_values True +end + +expand diff --git a/gdb/.gdbinit.d/hooks b/gdb/.gdbinit.d/hooks new file mode 100644 index 0000000..0269891 --- /dev/null +++ b/gdb/.gdbinit.d/hooks @@ -0,0 +1,67 @@ +define hookpost-up + dashboard +end + +define hookpost-down + dashboard +end + +define hookpost-frame + dashboard +end + +define hookpost-finish + dashboard +end + +define hookpost-return + dashboard +end + +define hook-quit + set confirm off +end + +define hookpost-enable + dashboard +end + +define hookpost-disable + dashboard +end + +define hookpost-break + dashboard +end + +define hookpost-tbreak + dashboard +end + +define hookpost-delete + dashboard +end + +define hookpost-watch + dashboard +end + +define hookpost-rwatch + dashboard +end + +define hookpost-awatch + dashboard +end + +define hookpost-condition + dashboard +end + +define hookpost-core-file + dashboard +end + +define hookpost-thread + dashboard +end diff --git a/gdb/.gdbinit.d/init b/gdb/.gdbinit.d/init new file mode 100644 index 0000000..fe76691 --- /dev/null +++ b/gdb/.gdbinit.d/init @@ -0,0 +1,17 @@ +set confirm off +set breakpoint pending on +set print pretty on +set auto-load safe-path / +set logging off + +# Adapted to use neovim from https://github.com/cyrus-and/gdb-dashboard/issues/20 +define vo +python +import os +sal = gdb.selected_frame().find_sal() +current_line = sal.line +if current_line != 0: + openInNvim = "nvr +" + str(current_line) + " " + sal.symtab.fullname() + os.system(openInNvim) +end +end