Mail Archives: djgpp/1993/09/23/10:34:43
> 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 -