Code::Blocks Forums

User forums => Help => Topic started by: hongxing on October 20, 2005, 03:55:34 am

Title: can not show variable's value when debugging
Post by: hongxing on October 20, 2005, 03:55:34 am
my environment is SuSE Linux Enterprise 9, my app type is a simplist c console app as following:
int main()
{
  int i = 1234;
  i++; // <--- run to here
  return 0;
}

when debugging to line 4, I add i to watch window, but can not see its value.

why?
Title: Re: can not show variable's value when debugging
Post by: hongxing on October 20, 2005, 04:41:25 am
btw:
I use cvs-head version C::B. bufore debugging, I checked the targets' option:
  generate debug info[-g]
and checked the gdb plugin's option:
  evaluate expression under cursor.

when debugging, I put cursor under variable i, but only "i = " displayed, none of its value

thanks!
Title: Re: can not show variable's value when debugging
Post by: mandrav on October 20, 2005, 08:54:06 am
One thing to check is that you shouldn't have optimizations turned on.
Also, do you use the ansi or unicode wxWidgets version? I tried it with the ansi version and it works as expected.
Title: Re: can not show variable's value when debugging
Post by: hongxing on October 21, 2005, 01:54:41 am
I have turned optimize options off.

I use the Unicode version of C::B.
Title: Re: can not show variable's value when debugging
Post by: hongxing on October 21, 2005, 03:38:22 am
just soon, I recompiled C::B to ansi version.
and it works.

but my project need to use Chinese/Korean characters, I must use unicode version of C::B.
can anyone solve this bug in unicode version of C::B?
Title: Re: can not show variable's value when debugging
Post by: rickg22 on October 21, 2005, 05:50:02 am
Hmmm I'm afraid this bug is new. Please report it at the sourceforge project page so we don't forget about it. In the meantime, here's a question: Is the variable shown via "watches"?
Title: Re: can not show variable's value when debugging
Post by: hongxing on October 21, 2005, 06:01:08 am
no, it is not showed in anyway.