-
Notifications
You must be signed in to change notification settings - Fork 510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
decode_funcname in dwarf_decode_address.py does not handle inlined functions #567
Comments
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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: