ARM Technical Support Knowledge Articles

LOCAL VARIABLES NOT DISPLAYED

Applies to: uVision Debugger

Answer


Information in this article applies to:


QUESTION

I have a function foo which is written as follows:

void foo(void)
{
  unsigned char bar;
  bar = 4;
}

When I step through this function in the debugger, the variable bar is not displayed in the locals window. Is this a bug?

ANSWER

No. The optimizer removed the variable bar since you do not do anything with it. It is initialized but left unused, so all code related to the variable is removed.

You can either

SEE ALSO

Article last edited on: 2006-07-10 08:29:47

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential