Difference between revisions of "Add Expressions to the Watch Window"

From SEGGER Wiki
Jump to: navigation, search
(Created page with "The watch window is a powerful tool in Ozone that can not only be used to display static symbol information but the live update feature and support for expressions make it a g...")
 
m
 
Line 1: Line 1:
  +
[[Category:Ozone]]
 
The watch window is a powerful tool in Ozone that can not only be used to display static symbol information but the live update feature and support for expressions make it a great companion during debugging.
 
The watch window is a powerful tool in Ozone that can not only be used to display static symbol information but the live update feature and support for expressions make it a great companion during debugging.
   
Line 20: Line 21:
   
 
[[File:Ozone_Watch_Array.PNG]]
 
[[File:Ozone_Watch_Array.PNG]]
 
[[Category:Ozone]]
 

Latest revision as of 16:09, 25 June 2019

The watch window is a powerful tool in Ozone that can not only be used to display static symbol information but the live update feature and support for expressions make it a great companion during debugging.

In most debug cases all symbol information is available so the symbol can directly be displayed with its name. However in some cases symbol information is not available and only addresses are known. Then the variable value can be displayed with an expression by only knowing the address location. The following example will showcase this. More information can be found in the Ozone user guide UM08025 in section Debugging with Ozone/Working With Expressions.

Watch window example

This example will show how to display an array by its symbol name, by only its address and via a pointer.

The array is defined as: static int _aCnt[10];

The used pointer is defined as: int* p;

Per default all values are initialized to 0. To display the values in _aCnt in the watch window the following expressions can be used:

  • _aCnt
  • (int[10])<_aCntAddress>
  • (int[10])p;

The resulting watch window will be as follows:

Ozone Watch Array.PNG