Author Topic: gdb tutorials  (Read 7742 times)

grv575

  • Guest
gdb tutorials
« on: August 16, 2005, 06:36:53 am »
Know of any good links to get started with gdb?  Tutorials, quickrefs,...

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: gdb tutorials
« Reply #1 on: August 16, 2005, 07:44:12 am »
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

pa3k

  • Guest

grv575

  • Guest
« Last Edit: August 16, 2005, 12:11:25 pm by grv575 »

Offline Funto

  • Multiple posting newcomer
  • *
  • Posts: 81
Re: gdb tutorials
« Reply #4 on: August 17, 2005, 12:46:14 am »
There is a nice GDB tutorial provided with Dev-C++ (:roll:), made by Richard Stallman himself ^^

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: gdb tutorials
« Reply #5 on: August 17, 2005, 04:01:25 am »
why not ask him to refurbish it? :P "Code::Blocks. No proprietary compilers required" lol

Offline Funto

  • Multiple posting newcomer
  • *
  • Posts: 81
Re: gdb tutorials
« Reply #6 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...

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: gdb tutorials
« Reply #7 on: August 18, 2005, 09:23:49 pm »
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.
Be patient!
This bug will be fixed soon...