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

I am personnally a big fan of gdb. There are some things you need to know before it's usable.

1. Use TUI mode with gbdtui

2. Install the packages that will give you syntax coloring in TUI mode (source-higlight something)

3. learn about Ctrl+L or alias `refresh` to `r` t redraw after your program prints if it does

Bonus 4. gdb uses readline just like bash and rlwrap so its command line is configurable with the ~/.inputrc file. I personally enjoy the vi mode. Tons of other options.

Bonus 5. alias gdbtui to `gdb -q -ex start --args` so it shuts up and set a temp breakpoint on you main

Then you basically have a c interpreter under your hand. I remember writing a function for my class that would dump a .dot file based on the state of my tree that I could just call anytime in gdb and see my tree update in xdot. Wonderful time.



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

Search: