Skip to main content

Is it possible to see the value of a C macro in TRACE32? - Knowledgebase / TRACE32 PowerView - Lauterbach Support

Is it possible to see the value of a C macro in TRACE32?

Macros are generally not part of the DWARF debug information in the ELF file. The debugger can thus not know their values. But you can declare your macros in TRACE32:

sYmbol.CREATE.MACRO MACRO_1 < contents >
sYmbol.CREATE.MACRO MACRO_2 < contents >
sYmbol.CREATE.Done

You can display the list of manually created macros with:

sYmbol.List.MACRO

Sometimes, the compiler can also export the macro information into the ELF file. This is done for the GCC compiler using the command line -g3 option which exports the macro information in the ".debug_macinfo" section. If you are loading such an ELF file using the Data.LOAD.Elf command, use then the /MACRO option to import the macro information to TRACE32.

Helpful Unhelpful

7 of 9 people found this page helpful

Comments (2)

Neelakantappa M
How to use these declared macros in T32? I have tried like below but didn't get the desired output. Getting symbol not found error. sYmbol.CREATE.MACRO MACRO_1 (0x25) sYmbol.CREATE.Done local &temp &temp = MACRO_1 gosub func MACRO_1 Both the methods didn't work.
Khaled Jmal

You should use &temp=Var.Value(MACRO_1) instead of &temp = MACRO_1

I also do not recommend to use white spaces in PRACTICE expressions.



Add a comment

ID-0
To prove you are a human, please tell us the text you see in the CAPTCHA image