Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

After trying many frontends for gdb I find that the TUI is the best. You just need to know about Ctrl + L to redraw if your program is printing stuff because the interface then become garbled.

I just put :

   layout src
   set confirm off
in my $XDG_CONFIG_HOME/gdb/gdbinit


I like a colored prompt with

  set prompt \001\033[01;36m\002(gdb)\001\033[0m\002
and I save history with

  set history save on
  set history size 500000
  set history filename ~/.cache/gdb/history


I like to do that as well. Just want to keep it short :) Also I use vim mode for bash and since it's in .inputrc I also have a vim mode in gdb which I like a lot even though it's as good as zsh's


I've used "gdb-dashboard" a lot, would recommend it. It's similar to the TUI (though I haven't used the TUI much), but you can pick and choose to display a large variety of information and the colors make the output much easier to read.

You can also make the dashboard display on another or across multiple terminals, letting you create a much nicer window layout. I've scripted this up with tmux before to have it automatically create the terminal layout and connect them to gdb, you can create really nice layouts that way (though it can be a lot of effort).


ctrl+l is a must know for TUI stuff, including when vim messes up. that fixed so many mysterious "crashes" for me after I found out about it.


gef has tmux support so program's output goes to other tmux pane


gud-gdb frontend inside Emacs is quite convenient and easy to use.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: