I have an STM32 executable generated with GCC from C. In another life, I encountered a .txt file that was output by the compiler which would expand and list all global variables and structs, listing their hex address within the executable and their type - this was useful as it could be parsed by external tools and used to allow us to debug the values within fields in structs and variables that were declared globally without the need for GDB - i.e. we could build it into external tests and automate checks of internal values.
What is the term for this, and is it a default option of GCC or something similar?
The file in question looked somewhat like:
globalStruct->someField.subField T_UINT16 0x400297b31
globalStruct2->someField.subField[0] T_UINT16 0x400297555
globalStruct2->someField.subField[1] T_UINT16 0x400297556
globalStruct2->someField.subField[2] T_UINT16 0x400297557
And so on. Super easy to read and parse as it was space separated.