PDA

View Full Version : debugging an OpenGL app



MathFan
07-08-2004, 10:22 AM
hi guys...
I have always wondered how to debug say an OpenGL or a SDL app. 'Cause what I experience every time I try to debug my game is that the debugger (i've tried both the native KDevelop debugger and kdbg) just runs the app until it crashes and I'm not able to use any of the useful functions like step in, step out, watch etc.

There is probably a very easy solution... so, ehh can anyone help me?

Oh, yes. there is one more thing. if i have a class in my code named glWorld. then i declare glWorld World=new glWorld(); how can I add a watch on some variable inside World now? I've tried World::var and World->var and so on, but it doesn't seem to work.

thnx

linuxdude
07-08-2004, 02:32 PM
the same way you debug any other program. Do you know how to use gdb? I can't answer your second question I only program in C right now.

MathFan
07-09-2004, 07:15 AM
Well, no I haven't used gdb, but I'll try it. thnx

But: r u sure it's that simple? u don't need to specify what libraries executable uses or anything?

and what if my game is running fullscreen?

linuxdude
07-09-2004, 04:30 PM
gdb tells you were your program goes arrai(I know that is wrong) It tells you what function or whatever screws with your memory. It doesn't matter what libraries. If all else fails post the code here.

MathFan
07-10-2004, 04:11 AM
Thanx, I've got it working all right now... :)

linuxdude
07-10-2004, 03:42 PM
what was wrong? Could you tell us?