Andrew McGill on Thu, 4 May 2000 08:05:16 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: GLUG: C/C++ IDE


For those whose minds are too small to grok emacs and the grande unifiede
disaster, I present the instant gdb tutorial.  And it works without X and
other fancy stuff.

Debuging foobar with gdb

. Edit the Makefile, include -g in the COPTS define (or whatever is passed
to the cc).  This compiles with debugging information.  (If you want to get
rid of the debugging info later use "strip foobar").

. make clean ; make
. gdb ./foobar
. break main
. set args="the arguments we need today"
. run

The program will run up to the beginning of main(), so you can think.
. s : step:  step into function
. n : next:  step over function to next line
. print x  (or just p x)
. set x=300   (change value)
. b function_name : break function_name (set a breakpoint at rpaction)
. c : continue (run until break or breakpoint)
. bt : backtrace -- show how we got to where we are

You can also interrupt the execution with ctrl+C or Ctrl+Z, then type
"next" a few times,
which should get you to familiar parts of the program.

&:-)

(Oops - forgot about watches -- don't know how)


----- Original Message -----
From: <jvds@xxxxxxxxxxxxxx>
To: <glug@xxxxxxxxxxxx>
Sent: Wednesday 03 May 2000 17:17
Subject: GLUG: C/C++ IDE


Hi ppl,

Is there an IDE available for gcc with stepping / watches etc.
To view contents of variables etc. like borland c++ etc.

Debugging is a pain under linux... (please help)


Jaco van der Schyff
-jvds@xxxxxxxxxxxxxx
---
To unsubscribe from this list: send the line "unsubscribe glug" in
the body of a message to majordomo@xxxxxxxxxxxx