that's true.
gdb cannot handle dead code . (gcc does not issue debugging info on it).
However, function params, and stack frame should be handeled correctly.
Yet gdb sometimes makes mistakes :)
(For example, on freebsd, gdb cannot always handle c++ code corectly.)

~d


On Wednesday 21 May 2003 18:33, Claudio Grasso wrote:
> 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

-- 
/********************************************************************
     ("`-''-/").___..--''"`-._     (\   Dimmy the Wild      UA1ACZ
      `6_ 6  )   `-.  (     ).`-.__.`)  Enterprise Information Sys 
      (_Y_.)'  ._   )  `._ `. ``-..-'   Nevsky prospekt,   20 / 44
    _..`--'_..-_/  /--'_.' ,'           Saint Petersburg,   Russia
   (il),-''  (li),'  ((!.-'             +7 (812)  3468202, 5585314
 ********************************************************************/


Reply via email to