www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/09/23/10:34:43

Date: Thu, 23 Sep 93 09:56:49 -0400
From: DJ Delorie <dj AT ctron DOT com>
To: pi92ae AT pt DOT hk-r DOT se
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: debugger how to

> I don't have *any* hint of how to use the debug32 pprogram?  Anyone
> who could give me a fast tour of how to debug a simple c/c++
> program.  The only thing I know are, that I need to compile with -g
> to include debug information.  What I need to know for starters are:

Try reading docs/debug32.doc

gcc -g foo.c -o foo
debug32 foo

> *How to show the current c/c++ line I am on.

where

> *How to display a named variable, how does this work with c++?

d _my_global_var

> *set a breakpoint at a line/function

b 2 foo.c#123
("2" is the break number.  There are four, and avoid 0 and 3).

> *a way of slowing down execution so I can read the figures flashing at
> the rightmost top. (numbers)

Buy a slower computer :-)

> *how to step line by line.

t  step one asm at a time, into calls
n  step one asm, over calls

Keep doing that until the next line prints.


- Raw text -


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