GDB infinite loop when stepping on "while (1) i++;"
Wenbo Yang
wenbo.yang@simplnano.com
Thu Mar 22 08:58:00 GMT 2007
> (gdb) n
> 4 while (1) i++;
> (gdb) n
I think there is nothing wrong. You let GDB next, it next. And your line is a infinite loop, so it never stops.
If "while (1) i++;" in you source code is put in a line. I think the debugging information should be a line. If not, maybe you compiler has problems. It is different with a single line function, i.e. "int a() {}".
If you want to step into, why not use "step"?
Wenbo
--
Wenbo Yang
SimpLight Nanoelectronics Ltd.
More information about the Gdb
mailing list