cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/24/23:37:17

From: Brian Osman <osmanb AT rpi DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: What is a debugger
Date: Wed, 19 Feb 1997 13:28:40 -0500
Organization: Rensselaer Polytechnic Institute, Troy NY, USA
Lines: 45
Message-ID: <330B4658.71AA@rpi.edu>
References: <2 DOT 2 DOT 32 DOT 19970219165043 DOT 006cbc8c AT delilah>
Reply-To: osmanb AT rpi DOT edu
NNTP-Posting-Host: darkwing.stu.rpi.edu
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Alan Wilson wrote:
> 
> I'm fairly new to DJGPP and programming and I've seen several posts
> regarding something called a debugger.  What is a debugger? And what does it
> do?  Does DJGPP come with one?  Rhide?  EMACS?  Is it necessary to use one?
> 
> If anyone could answer these questions, it would clear up alot of things
> with me.  Thanks!
> 
> Alan Wilson

A debugger is tool for (as the name implies) removing bugs from
programs.
Normally, if there is a problem with a program, you watch it crash, and
wonder what went wrong. Some people (myself included) put printf()
statements everywhere to figure out exactly what line crashed, and why.

Debuggers are much better. You can load your compiled code and "step"
through it, watching the values of variables and keeping track of
everything
that is happening, as the program runs. This allows errors to be caught
very easily.

In addition to the DJGPP compiler, there is also a package called GDB,
which is the Gnu Debugger. (Available from the same place.) This is not
the easiest debugger to use if you've never done anything like this
before.
A better option, (though I've never used it) is RHIDE. RHIDE is actually
a "devlopment environment." It handles editing, compiling (by calling
the
compiler) and other tasks. It also has integrated debugging features.

It may not be necessary to use a debugger for simple programs, but once
you are writing reasonably complex software, simple techniques no longer
work. (for example: I just finished writing a UNIX shell, which is
similar
to COMMAND.COM in DOS. It reads input from the user, and then starts
other
programs etc... The debugger was necessary to catch subtle logic errors
I
had made.)

Hope this helps.

Brian

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019