The Symbols page of the Debug Options dialog allows you to manipulate symbolic information loaded from download files.
Debug Options dialog, Symbols page
Remove Symbol Prefix
Some compilers prepend underscores (or similar characters) to global symbols which usually get in the way during a debug session. You can instruct winIDEA to remove such prefixes from functions, global variables and code labels.
When a watch expression is changed, it's color is changed until the next modification. To make the color change persist longer, the Change Gradients can be set to a higher value. After every change of execution point, the changed color will fade a little.
Preserve symbols between winIDEA sessions
WinIDEA per default saves the symbol table from the previous download session alongside the workspace file.
This allows symbol navigation and reconstruction of analyzer recordings immediately when workspace is opened.
If saving of symbols is not desired, the option can be switched off.
Display memory area in pointer prototypes
If checked, the memory area that the pointer points to is displayed in the pointer prototype.
Dereference char * automatically
Normally, the char* is automatically dereferenced (i.e. the string pointed to is shown). In some cases this can lead to exceptions, if the pointer address is not valid, and debugging is no longer possible. In this case automatic dereferencing can be turned off with this option.
Display char arrays as zero terminated strings
Arrays of type char can be displayed in watch window as zero terminated strings.
If the option is not checked, the string is displayed as a array of 8-bit characters. Individual elements are displayed according to Character display configuration in the same dialog.
Display array and structured type values
Array and structured type values are shown as comma separated values of consecutive elements.
If this option is disabled, then values of these types are not shown, which improves winIDEA responsiveness when high speed real-time access updates are required. In this case, the watch window will display: array/struct type display disabled
Max. number bytes read for a watch
To improve winIDEA responsiveness when high speed real-time access updates are required, the upload of memory to display the value of a large data object can be limited. Maximum evaluation upload is 64kB.
Floating point compare precision
When comparing floating point numbers using vague precision, the precision can be specified.
Integer Type Display - defines preferential number base system for displaying integer values.
Character Type Display - defines how values of types 'char' and 'unsigned char' are displayed.
Values of 'char' type variables can be displayed as:
•ASCII - displays the value as a character
•Integer - displays the value as a number
•ASCII (Int) - displays value in both representations.
ANSI format - defines whether non-printable characters will be shown as ANSI characters
Binary Type Display - this format should be used if one intends to modify binary values in the watch window. Other binary display formats cannot be used to modify the value.
Enum Type Display - defines how values of types 'Enum' are displayed.
Values of Enum type variables can be displayed as:
•Enum - displays the value as a Enum
•Integer - displays the value as a number
•Enum (Int) - displays value in both representations.
Programming languages such as C and C++ allow collisions between symbol names. This means that multiple symbols use the same name, but are in different scopes. C allows collisions of file and function static objects, whereas C++ allows additional collisions on multiple levels (namespaces, classes, function overloads). To avoid ambiguity when multiple symbols use the same name, but are in different scopes, qualified names should be used. When winIDEA displays symbols it could happen that several different symbols with the same name are shown. To avoid confusion winIDEA offers two levels of symbol qualification:
Unique (avoid collisions)
The symbol is qualified to a point where it becomes unique. It always contains the namespace and the naked symbol name, and if it is object is function static, it will contain the qualified function name.
If this is not yet unique, then additional information is added: function signature, filename, download file.
Minimally qualified name will look like this:
f for a C function
N::N::A::B::f for a C++ function or
N::N::A::B::f##s_n for a function static variable.
Fully qualified name would look like this:
“test1.cpp#”N::N::A::B::f(int,int),,test.elf for a C++ function or
“test1.cpp#N::N::A::B::f(int,int)##”s_n,,test.elf for a C++ function static variable.
If the source code is changed, e.g. a function is added, which collides with an existing name, winIDEA will automatically qualify the name to make them distinct. This can cause problems when scripts rely on the original name (the way it was originally qualified).
C/C++, function static
Another method of qualification (C/C++, function static) is available, which qualifies the names by default to an extent where only major changes to the application (e.g. new download file) would cause additional collisions and are therefore unlikely. This is the preferred name when winIDEA output is processed by scripts. By default it contains:
- for a function: the filename (if the symbol is file static), namespace, naked name, function signature
- for a variable: the filename (if the symbol is file static), naked name
- for a function static variable: qualified function name, naked name
If the application only has one download file, the download file will not be added. If there are multiple download files, then the download file will be listed for all symbols (even if there are no collisions).
Examples of such qualified names:
“test1.cpp#”N::N::A::B::f(int,int) for a file static function
“test1.cpp#N::N::A::B::f(int,int)##”s_n for a function static variable
Examples of qualified names when multiple download files are present:
s_n,,test.elf for a global variable