uVision debugging 'Watch' question

Hi,

I'm using the Keil uVision V4.03q.

I wonder if there's any setting to be able to watch all variables during debugging?
If I want to watch a function argument in a function it says: 'out of scope' so I have to define a static copy of that variable to be able to watch it

Optimization is set to minimum level.

Thanks

Henk

Parents
  • I wonder if there's any setting to be able to watch all variables during debugging?

    You can already watch all existing variables. Which is the root of your problem, of course, since you're trying to watch things that don't exist when you try to see them.

    Automatic variables and functions' actual arguments only exist while they're in scope. At all other time, they don't exist. The place where they existed (typically on the stack, or in overlaid memory regions) will be used to hold other data. That means those non-existing variables have no current value the debugger could possibly show you. If it tried, whatever those watches were to display would be utterly meaningless if you're lucky, totally misleading if you're not.

Reply
  • I wonder if there's any setting to be able to watch all variables during debugging?

    You can already watch all existing variables. Which is the root of your problem, of course, since you're trying to watch things that don't exist when you try to see them.

    Automatic variables and functions' actual arguments only exist while they're in scope. At all other time, they don't exist. The place where they existed (typically on the stack, or in overlaid memory regions) will be used to hold other data. That means those non-existing variables have no current value the debugger could possibly show you. If it tried, whatever those watches were to display would be utterly meaningless if you're lucky, totally misleading if you're not.

Children
More questions in this forum