Know of any good links to get started with gdb? Tutorials, quickrefs,...
your friends:
gdb> run
(oooh a crash!)
gdb> bt
gdb> frame 1
(switches to stack frame #1)
gdb> print mylocalvar
(shows you some pointer to an object, to say an example)
gdb> print mylocalvar->something()
I don't know how to set breakpoints.. yet :P
maybe these links will help you:
http://heather.cs.ucdavis.edu/~matloff/debug.html
http://heather.cs.ucdavis.edu/~matloff/UnixAndC/CLanguage/Debug.html
pa3k: great,thx for the links.
also:
http://www.isi.edu/acal/documentation/Tools/gdb.refcard.ps
http://dsl.ee.unsw.edu.au/dsl-cdrom/gnutools/doc/gnu-debugger-quickref.pdf
http://ugweb.cs.ualberta.ca/~c201/resources/emacs/refcards/gdb-refcard.pdf
There is a nice GDB tutorial provided with Dev-C++ (:roll:), made by Richard Stallman himself ^^
why not ask him to refurbish it? :P "Code::Blocks. No proprietary compilers required" lol
Hmm about debugging in C::B...
Is it possible to debug and watch variables as we can do with VC++? I mean, without having to add manually the variable name in the "Watch" tab...
Quote from: Funto on August 17, 2005, 10:42:33 AM
Hmm about debugging in C::B...
Is it possible to debug and watch variables as we can do with VC++? I mean, without having to add manually the variable name in the "Watch" tab...
You can place the editor caret over the variable's name you want to watch and [right-click->Watch 'your var'].
Or you can provide more info on what you 'd like to do...
Yiannis.