[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gdb "hangs" on delay loop
From: |
Gene Smith |
Subject: |
gdb "hangs" on delay loop |
Date: |
Fri, 01 May 2009 15:03:10 -0400 |
User-agent: |
Thunderbird 2.0.0.6 (Windows/20070728) |
With -O0 opt level, gdb refuses to step (S) over a delay loop like this:
code1; //<-- steps over this OK
for(c=0; c<10000; c++); //<--- hangs here
code2;
If I control-c and examine c it seems to be increasing slowly.
When I change the code structure like this:
code1;
for(c=0; c<10000; )
c++;
code2;
then I can step.
This is with embedded arm. See the same thing with arm-insight and
arm-gdb. Haven't tried this with native.
Is this to be expected?
- gdb "hangs" on delay loop,
Gene Smith <=