https://sourceware.org/bugzilla/show_bug.cgi?id=33414

--- Comment #1 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Indu Bhagat <[email protected]>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=84c1e5cec0ec7d80d460db2b823d329e9759c642

commit 84c1e5cec0ec7d80d460db2b823d329e9759c642
Author: Indu Bhagat <[email protected]>
Date:   Fri Sep 5 15:01:52 2025 -0700

    gas: sframe: skip DW_CFA_GNU_args_size when safe to ignore

    Currently, gas warns and skips generating SFrame FDE when it sees:
         .cfi_escape 0x2e,XX

    From the documentation of DW_CFA_GNU_args_size:
     "The DW_CFA_GNU_args_size instruction takes an unsigned LEB128 operand
      representing an argument size. This instruction specifies the total of
      the size of the arguments which have been pushed onto the stack."

    With origins seemingly for VAX architecture, the usage of
    DW_CFA_GNU_args_size seems to have evolved.  The purpose of
    DW_CFA_GNU_args_size is to adjust SP when performing stack unwinding for
    exception handling.

    For the purpose of stack tracing using SFrame, DW_CFA_GNU_args_size is
    safe to skip, especially when the CFA restoration is known to be FP
    based.  A previous summary of the reasoning and intent was indicated
    here [1].

    [1] https://sourceware.org/pipermail/binutils/2025-August/143829.html

    This fixes PR gas/33414 - sframe: handle DW_CFA_GNU_args_size in gas better

    gas/
            PR gas/33414
            * gen-sframe.c (sframe_xlate_do_escape_gnu_args_size): New
            definition.
            (sframe_xlate_do_cfi_escape): Handle DW_CFA_GNU_args_size.
    gas/testsuite/
            PR gas/33414
            * gas/cfi-sframe/cfi-sframe.exp: New test.
            * gas/cfi-sframe/cfi-sframe-common-12.d: New test.
            * gas/cfi-sframe/cfi-sframe-common-12.s: New test.
            * gas/cfi-sframe/cfi-sframe-x86_64-3.d: New test.
            * gas/cfi-sframe/cfi-sframe-x86_64-3.s: New test.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to