* Re:GDB infinite loop when stepping on "while (1) i++;"
@ 2007-03-22 8:58 Wenbo Yang
2007-03-22 9:04 ` GDB " Wenbo Yang
0 siblings, 1 reply; 2+ messages in thread
From: Wenbo Yang @ 2007-03-22 8:58 UTC (permalink / raw)
To: qinwei; +Cc: gdb
> (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.
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: GDB infinite loop when stepping on "while (1) i++;"
2007-03-22 8:58 Re:GDB infinite loop when stepping on "while (1) i++;" Wenbo Yang
@ 2007-03-22 9:04 ` Wenbo Yang
0 siblings, 0 replies; 2+ messages in thread
From: Wenbo Yang @ 2007-03-22 9:04 UTC (permalink / raw)
To: qinwei; +Cc: gdb
>> (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"?
I'm sorry. Step should not work too. I mean "stepi". :-)
Wenbo
--
Wenbo Yang
SimpLight Nanoelectronics Ltd.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-03-22 9:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-22 8:58 Re:GDB infinite loop when stepping on "while (1) i++;" Wenbo Yang
2007-03-22 9:04 ` GDB " Wenbo Yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox