2020-03-04 01:49 AM
Do you plan to add support for parsing static variables declared in functions?
You already need to parse DWARF, maybe add location resolution for this type of variables also.
You do it in STM32CubeIDE:
We do it externally using pyelftools.
Yes, there is a lot of assumptions in our script (compression, dwarf format,...), but it works in our use case.
Kind regards,
Ziga
Code:
Dwarf parsing useing pyelftools (modified example of https://github.com/eliben/pyelftools/blob/master/examples/dwarf_die_tree.py) to output also all DIE properties
"current_" is on location:
DW_AT_location = [3, 44, 1, 0, 32]
DW_OP_addr = 0x03, next bytes are in little endian
0x2000012C
Solved! Go to Solution.
2020-03-04 05:45 AM
Hello
STM32CubeMonitor uses GDB to parse the elf files. This type of variables are listed in a section "Non-debugging symbols:" which has a different formatting and is skipped by the tool.
As a workaround, you can add the variable manually in the list of variables monitored, or use a global variable for debug purpose.
Best regards
Stephane
2020-03-04 05:45 AM
Hello
STM32CubeMonitor uses GDB to parse the elf files. This type of variables are listed in a section "Non-debugging symbols:" which has a different formatting and is skipped by the tool.
As a workaround, you can add the variable manually in the list of variables monitored, or use a global variable for debug purpose.
Best regards
Stephane
2020-03-05 12:14 AM
Hi,
thank you for clarifying.
Multiple functions can have same variable name. So name is not unique identifier.
Makes sense.