[all-commits] [llvm/llvm-project] 340b0c: [llvm] Add DW_CC_nocall to function debug metadata...
Venkata Ramanaiah Nalamothu via All-commits
all-commits at lists.llvm.org
Tue Jun 14 15:00:31 PDT 2022
Author: Venkata Ramanaiah Nalamothu <VenkataRamanaiah.Nalamothu at amd.com>
Date: 2022-06-15 (Wed, 15 Jun 2022)
[llvm] Add DW_CC_nocall to function debug metadata when either return values or arguments are removed
Adding the `DW_CC_nocall` calling convention to the function debug metadata is needed when either the return values or the arguments of a function are removed as this helps in informing debugger that it may not be safe to call this function or try to interpret the return value.
This translates to setting `DW_AT_calling_convention` with `DW_CC_nocall` for appropriate DWARF DIEs.
The DWARF5 spec (section 188.8.131.52 Calling Convention Information) says:
If the `DW_AT_calling_convention` attribute is not present, or its value is the constant `DW_CC_normal`, then the subroutine may be safely called by obeying the `standard` calling conventions of the target architecture. If the value of the calling convention attribute is the constant `DW_CC_nocall`, the subroutine does not obey standard calling conventions, and it may not be safe for the debugger to call this subroutine.
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D127134
More information about the All-commits