[Ubuntu-BD] Graphical frontend of GDB

Nasimul Haque nasim.haque at gmail.com
Mon Feb 20 10:40:07 UTC 2012


On 20 February 2012 09:36, Junayeed Ahnaf Nirjhor
<zombiegenerator at aol.com> wrote:
> On 02/19/2012 10:13 PM, Nasimul Haque wrote:
>>
>> DDD is a good frontend for gdb. http://www.gnu.org/software/ddd/
>
> BTW, I really loved the interface of "Nemiver" . Unfortunately, I can't use
> a debugger, yet. Can someone give me some tips on how to use a C++ debugger?

The steps are simple. You need to compile your C++ program with
debugger symbols on. By default, the binary does not include debug
information to make it fast and reliable. Then load the executable in
the debugger, if the debugger is smart it will find the related code
file otherwise show it the source code also. Put some breakpoints and
hit 'step', 'next' or 'continue'.

> In ruby, we use various test over debugging. Cucumber, Shoulda, Test::Unit
> etc. I've never really used any debugger at all :(

Dynamic languages differ from static languages very much.
Ruby/Python/Perl etc. are very different than C/C++. It is a very good
habit to code in TDD/BDD or whatever test-first/test-oriented
development. But still sometimes debugging is necessary. Yes, even in
Ruby or Python. C++ users are already writing too much code that's why
they avoid writing unit tests. C++ also has great unit testing tools.
You can use cucumber to test C++. In fact, people are writing more
unit tests in C++ also.

To summarize: yes, you should be writing code with unit tests. Still,
you need to debug sometimes.

-- 
M. Nasimul Haque
Appliansys, Coventry, UK
http://www.nasim.me.uk



More information about the ubuntu-bd mailing list