You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a "DW_TAG_subprogram" DIE contains an inlined function ("DW_AT_inline" = 1), it does not have a "DW_AT_low_pc" attribute which causes decode_funcname to ignore the "DW_TAG_subprogram" DIE. This leads to the non-inlined function that called the inlined function to be returned, instead of the inlined function .
I noticed this when my programs Reset_Handler() called __set_MSP(), which is a forced inlined CMSIS function. decode_funcname returned "Reset_Handler", whereas addr2line correctly returned "__set_MSP()".
The text was updated successfully, but these errors were encountered:
IsaacL2001
changed the title
decode_funcname in dwarf_decode_address.py does not handle inlined subroutines
decode_funcname in dwarf_decode_address.py does not handle inlined functions
Sep 16, 2024
When analyzing the DWARF info for the purposes of call stack recovery in a real life situation, inline functions should be by all rights treated separately from genuine ones. In GNU a2l, there is a command line switch to make the tool check for inline functions.
The purpose of dwarf_decode_address.py is educational rather than presenting an exhaustive a2l replacement. So I'd say this is functions as designed.
When a "DW_TAG_subprogram" DIE contains an inlined function ("DW_AT_inline" = 1), it does not have a "DW_AT_low_pc" attribute which causes decode_funcname to ignore the "DW_TAG_subprogram" DIE. This leads to the non-inlined function that called the inlined function to be returned, instead of the inlined function .
I noticed this when my programs Reset_Handler() called __set_MSP(), which is a forced inlined CMSIS function. decode_funcname returned "Reset_Handler", whereas addr2line correctly returned "__set_MSP()".
The text was updated successfully, but these errors were encountered: