Thursday, March 16, 2017

Data Display Debugger

DDD is a really cool GUI front end to gdb and many other command line debuggers for Linux.  I am using it because I could not get Eclipse for C to work on LinuxCNC, and emacs and DDD work very well (although not as nice as an IDE).  There are a couple unobvious aspects to DDD that I am blogging about because someone else is probably getting bit by these as well.  If so, this is so you find it when searching.

When you File->open program, you get a list of your home directory.  Clicking on the directory where your program resides won't show your program in the list until you hit the Filter button.

Like all such debuggers, you need to give the command line arguments to use.  There is theoretically some way to set this through the menus.  Never got it to work that way.  Type run in the command line window, and copy and paste your arguments afterwards.  Then hit enter.  Otherwise, when you click the Run button, those arguments will not be used.  I spent a lot of frustrating time trying to figure out why the command line arguments (other than argv[0] (the program name) were not visible when they were clearly present when I ran make in a Terminal window.

No comments:

Post a Comment