mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-09 00:53:10 +00:00
gas: sframe: warn when skipping SFrame FDE generation
Fix PR gas/31213.
gas/
PR gas/31213
* gen-sframe.c (sframe_do_cfi_insn): Add new warning.
gas/testsuite/
* gas/cfi-sframe/common-empty-1.d: Test the new warning as well.
* gas/cfi-sframe/common-empty-2.d: Likewise.
This commit is contained in:
@@ -1247,25 +1247,33 @@ sframe_do_cfi_insn (struct sframe_xlate_ctx *xlate_ctx,
|
|||||||
case DW_CFA_GNU_window_save:
|
case DW_CFA_GNU_window_save:
|
||||||
err = sframe_xlate_do_gnu_window_save (xlate_ctx, cfi_insn);
|
err = sframe_xlate_do_gnu_window_save (xlate_ctx, cfi_insn);
|
||||||
break;
|
break;
|
||||||
|
/* Other CFI opcodes are not processed at this time.
|
||||||
|
These do not impact the coverage of the basic stack tracing
|
||||||
|
information as conveyed in the SFrame format.
|
||||||
|
- DW_CFA_register,
|
||||||
|
- etc. */
|
||||||
|
case DW_CFA_register:
|
||||||
|
if (cfi_insn->u.rr.reg1 == SFRAME_CFA_SP_REG
|
||||||
|
#ifdef SFRAME_FRE_RA_TRACKING
|
||||||
|
|| cfi_insn->u.rr.reg1 == SFRAME_CFA_RA_REG
|
||||||
|
#endif
|
||||||
|
|| cfi_insn->u.rr.reg1 == SFRAME_CFA_FP_REG)
|
||||||
|
err = SFRAME_XLATE_ERR_NOTREPRESENTED;
|
||||||
|
break;
|
||||||
case DW_CFA_undefined:
|
case DW_CFA_undefined:
|
||||||
case DW_CFA_same_value:
|
case DW_CFA_same_value:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
{
|
/* Following skipped operations do, however, impact the asynchronicity:
|
||||||
/* Other CFI opcodes are not processed at this time.
|
- CFI_escape. */
|
||||||
These do not impact the coverage of the basic stack tracing
|
err = SFRAME_XLATE_ERR_NOTREPRESENTED;
|
||||||
information as conveyed in the SFrame format.
|
|
||||||
- DW_CFA_register,
|
|
||||||
- ...
|
|
||||||
|
|
||||||
Following skipped operations do, however, impact the asynchronicity:
|
|
||||||
- CFI_escape */
|
|
||||||
|
|
||||||
err = SFRAME_XLATE_ERR_NOTREPRESENTED;
|
|
||||||
// printf (_("SFrame Unsupported or unknown Dwarf CFI number: %#x\n"), op);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* An error here will cause no SFrame FDE later. Warn the user because this
|
||||||
|
will affect the overall coverage and hence, asynchronicity. */
|
||||||
|
if (err)
|
||||||
|
as_warn (_("skipping SFrame FDE due to DWARF CFI op %#x"), op);
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#as: --gsframe
|
#as: --gsframe
|
||||||
|
#warning: skipping SFrame FDE due to DWARF CFI op 0xa
|
||||||
#objdump: --sframe=.sframe
|
#objdump: --sframe=.sframe
|
||||||
#name: Uninteresting cfi directives generate an empty SFrame section
|
#name: Uninteresting cfi directives generate an empty SFrame section
|
||||||
#...
|
#...
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#as: --gsframe
|
#as: --gsframe
|
||||||
|
#warning: skipping SFrame FDE due to DWARF CFI op 0xe
|
||||||
#objdump: --sframe=.sframe
|
#objdump: --sframe=.sframe
|
||||||
#name: SFrame supports only FP/SP based CFA
|
#name: SFrame supports only FP/SP based CFA
|
||||||
#...
|
#...
|
||||||
|
|||||||
Reference in New Issue
Block a user