←back to thread

376 points turrini | 7 comments | | HN request time: 0.421s | source | bottom
1. cassepipe ◴[] No.42147118[source]
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
replies(5): >>42147210 #>>42147594 #>>42150049 #>>42150533 #>>42153573 #
2. CarpaDorada ◴[] No.42147210[source]
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
replies(1): >>42147621 #
3. DSMan195276 ◴[] No.42147594[source]
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).

4. cassepipe ◴[] No.42147621[source]
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
5. EasyMark ◴[] No.42150049[source]
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.
6. skirge ◴[] No.42150533[source]
gef has tmux support so program's output goes to other tmux pane
7. billfruit ◴[] No.42153573[source]
gud-gdb frontend inside Emacs is quite convenient and easy to use.