Sunday, August 21, 2016

Quick gdb Tip: Enhance Debugging Experience with TUI or CGDB

I have been using gdb for quite some time, more than years in fact. Let's see... I first learned gdb in my sophomore class in Computer Systems Engineering's course, back in 2007. Wow, it's been almost 10 years now.

And yet, here I am, learning new features every day. In fact, I learned one feature in gdb today that will change my development completely: text user interface.

Try it yourself, if you don't already know.
$ gdb a.out -tui -q

I wonder why my class in 2007 never taught this feature. Maybe this feature was non-existent then?

Another option is to use cgdb. You could download the latest from git directly and compile:
$ git clone git://github.com/cgdb/cgdb.git
$ cd cgdb
$ ./autogen.sh
$ ./configure --prefix=/usr/local
$ make
$ sudo make install
$ cgdb -q a.out

2 comments:

  1. Wow, 10 years! Better late than never.
    Hope your studying goes well with the new TUI you learnt recently.

    ReplyDelete