Marjan, >From that code snippet the compiler will determine that both gfg and rad do nothing (while values are assigned to them, they never appear on the rhs of an assignment nor are they used as arguments in a function call) and so will optimise those variables away.
aLUNZ -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Marjan Mrak Sent: Thursday, 23 November 2006 6:49 PM To: [email protected] Subject: [Mspgcc-users] Cannot read any variables in while debugging Hi all, I have a very simple code: **************************** #include <msp430x44x.h> /* Brute Force delay loop */ void delay(unsigned int d) { for (; d>0; d--) { nop(); nop(); } } int main( void ) { float gfg; int rad; /* Init watchdog timer to off */ WDTCTL = WDTPW|WDTHOLD; /* Init Output ports to GND */ P5SEL =0x00; P5DIR=0x02; gfg=0.2*100; rad=134; /* Loop until the universe breaks down */ while (1) { P5OUT ^= 0x02; gfg=5.5; /* Toggle P1.0 ouput pin */ /* Delay for a while before blinking */ delay(0x4fff); } /* while */ } ******************************* It compiles and it works allright (LED flashes). But when I debug with msp430gdb, I cannot see value neither of gfg, neither of rad. I can even determine breakpoints and step through it. I am using original Texis Instruments FET. BTW: If 'next' is first command in debugger after being loaded and initialised (if program is started with 'next' command), debugger hangs itself. And I am using Linux. Help will be much appriciated! Marjan ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Mspgcc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mspgcc-users
