rhel - Unable to jump using GDB -
i'm successful using gdb debug code - although first project i've ever use in anger - 1 particular executable causing me problems. it's spawned separate process , want debug first few lines i've added loop can attach gdb process @ leisure, jump next line. problem is, jumps lot further next line. i'm sure code , source in sync addition of loop both visible @ source level , occurs (ie app "hangs" , cpu pegged @ 100%). app seems behaved when not being debugged (and when initial loop removed). how can start diagnose problem? it's latest version of gdb , i'm debugging c++ exes.
rather forcing process jump, why not write loop as
int loopflag = 0; while (loopflag == 0) sleep(1); and use gdb set loopflag non-zero?
Comments
Post a Comment