How to debug

Dear List :

I telneted from  PC_A to PC_B for debugging graphic-program. 

PC_A is used for debugging_output ,PC_B is for display output from graphic-program.

I found it’s well-done if I just execute the program :
PC_A showed debug-message .PC_B shows output from the program.

But if I step into it by gdb ,then the program often hangs when I step over a function from SDL.

It's un-believable that a GUI library is written just through the tiring process

( write , compile , execute ,print debug_message ) again & again .

Does someone has such a experience : 

Could you tell me
if I am too lazy
or
there is a better way to do it ? like using a skelton of code , library for debugging

Thanks in Advance !
Henry

Hi.

But if I step into it by gdb ,then the program often hangs when I step
over a function from SDL.

and in what exactly state your program is then? (hint: try ps axl)

It's un-believable that a GUI library is written just through the 

tiring process

( write , compile , execute ,print debug_message ) again & again .

Not sure of GUI libraries, but all of my projects go this way. It takes
quite an effort to lock up SDL and X11 to the point where you’re unable
to kill the program or X server. If you managed that, you’ve likely
got major problems in critical piece of code, which had to be debugged
as the very first thing to do, and debugged to the state of bullet-proofness,
no matter how much compile/exec/analyse_output cycles it is going to take.

After that, an xterm with gdb is sufficient, and even not necessary if you
put enough printfs (syslogs) into your code.

Does someone has such a experience :

Could you tell me

if I am too lazy

I’m afraid yes.

./lxnt