Sometimes step or next can get mixed up if it is not clear where the end of the source code line matches up with the end of the generated assembly.
Perhaps the reason this occurs here is that your code is wrong - the while loop does nothing, and may well have been completely removed by the optomiser. If you want to use simple loops to generate delays, then don't forget to make the loop variable volatile! > Hi, > > I am having some problems using msp430-gdb. In certain points of code, if I > issue a "next" or "step" command on msp430-gdb it doesn't return to prompt. > > int main(void) > { > WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer > P1DIR |= 0x01; // Set P1.0 to output direction > > for (;;) > { > unsigned int i; > > P1OUT ^= 0x01; // Toggle P1.0 using exclusive-OR > > i = 50000; // Delay > ==>do (i--); // It doesnt return if I type 'next' or 'step' here > while (i != 0); > } > return 0; > } > > I'm using gdb 5.1.1, gcc 3.2.3 and I got mspgcc from CVS at 09/09/2004. > > uname -a > Linux unlink 2.6.8-gentoo-r3 #3 SMP Thu Sep 9 17:04:28 BRT 2004 i686 Intel(R) > Pentium(R) 4 CPU 2.00GHz GenuineIntel GNU/Linux > > Thank you in advance, > > Marcos > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > _______________________________________________ > Mspgcc-users mailing list > Mspgcc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mspgcc-users > > >