Tuesday, May 20, 2008

GDB hidden gem

Well at least it was hidden to me :D

Sometimes it's difficult to keep in view the surrounding lines of code when you are using GDB. list command helps but it's not that user friendly. So the other day a coworker told me about GDB TUI. You can enable it with Ctrl+X A and voilĂ  you get the full listing of the code in a nice browseable view on the top :-)

And a screenie for your viewing pleasure:

4 comments:

  1. Or launch it by "gdb -tui"

    ReplyDelete
  2. I much prefer cgdb. It gives you syntax highlighting and vim keybindings while navigating the source. Just be sure to add:

    set autosourcereload

    to ~/.cgdb/cgdbrc

    ReplyDelete
  3. Hi there Albert

    I accidentally discovered this a few weeks ago while debugging a program :P

    ReplyDelete