Macros are usually replaced by their content by the preprocessor. So the compiler does no longer "see" the macro names and thus, can't create debug information for it in the ELF file. As a result any debugger can't know the macros' names.
However, some compilers support the generation of debug information for preprocessor macros. E.g. if you use GCC with debug level 3 (gcc -g3
), the compiler creates a section called ".debug_macro" in your ELF file.
If your ELF contains the ".debug_macro" section, you have to tell TRACE32 to consider this section when loading the ELF, by using the option "/MACRO". So you load your ELF e.g with
Data.LOAD.Elf * /MACRO
You can then see all your preprocessor macros in the sYmbol.List.MACRO
window or use any of them in the Var.WATCH
window, or access them with the Var.VALUE()
function or print them with the Var.PRINT
command. E.g.:
Var.Watch UINT32_MAX
Var.PRINT UINT32_MAX
PRINT %Decimal Var.VALUE(UINT32_MAX)