Once I had the same behavior and the problem was that the variable had been
optimized away by the compiler (it was allocated in a register). You can
easily check that by setting Insight to show mixed code (c + assembly).

Hope this helps. Regards.

                        Claudio

> -----Original Message-----
> From: HICHENS, David [SMTP:[email protected]]
> Sent: Tuesday, May 20, 2003 10:05 PM
> To:   '[email protected]'
> Subject:      [Mspgcc-users] Insight debugger problem
> 
> Hi,
> 
> I am having a problem with the Insight debugger in the latest MSP430
> Windows
> toolchain. It does not report the correct value for parameters that are
> passed on the stack.
> 
> For example, in the following piece of code:
> 
> int main(void);
> void subroutine(char c);
> void subroutine2(int i);
> 
> int main(void)
> {
>     subroutine('X');
>     subroutine2(1234);
> }
> 
> void subroutine(char c)
> {
>     char d;
>     
>     d = c;
> }
> 
> void subroutine2(int i)
> {
>     int j;
>     
>     j = i;
> }
> 
> the variables c and i in the subroutines do not show the correct value in
> the watch window. However, d and j are set to the correct values and
> display
> correctly in the watch window.
> 
> Any ideas?
> 
> Thanx and regards,
> 
> David Hichens
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: ObjectStore.
> If flattening out C++ or Java code to make your application fit in a
> relational database is painful, don't do it! Check out ObjectStore.
> Now part of Progress Software. http://www.objectstore.net/sourceforge
> _______________________________________________
> Mspgcc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to