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

--- Comment #3 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=7aed4728e4d266f8e3c82f4689d90e53e9231f91

commit 7aed4728e4d266f8e3c82f4689d90e53e9231f91
Author: Indu Bhagat <[email protected]>
Date:   Fri Feb 6 12:21:34 2026 -0800

    objdump: sframe: fix multiple emission of SFrame and DWARF Frame

    Currently, when a user specifies both -WF (to dump DWARF Frame) and
    --sframe, the dump_dwarf () call is triggered twice,

    First, in dump_bfd ():
      if (dump_dwarf_section_info)
        dump_dwarf (abfd, is_mainfile);

    And then again in dump_bfd () via:
       if (dump_sframe_section_info)
         dump_sframe_section (abfd, dump_sframe_section_name, is_mainfile);
    Where dump_sframe_section () itself invokes dump_dwarf () to emit SFrame
    section.

    The original intent of making dump_sframe_section () to invoke
    dump_dwarf () was to reuse the existing (DWARF) machinery for relocation
    and emission of SFrame section (along with DWARF sections).  But this
    may cause duplicate emission as noted above (PR 33806).

    So, carve out the necessary work into dump_sframe_section () to make it
    not invoke dump_dwarf (): explicitly load the SFrame section and then
    invoke the associated display function directly.  This ensures that the
    SFrame textual dump is emitted exactly once as intended.

    Additionally, this patch removes:
      - the temporary "sframe-internal-only" debug option because it not
        needed anymore, now that we dont use dump_dwarf () for SFrame dumping
        anymore.
      - stubs from dump_dwarf_section () specific to SFrame, as it is not
        called for it anymore.

    While at it, xstrdup consistently and free the dump_sframe_section_name
    var.

    Update the existing sframe-func.s to ensure .eh_frame section is emitted
    as well.  Add new test objdump-sframe-2.d to verify that textual dump
    using objdump contains single textual dumps of .eh_frame and .sframe (if
    both --sframe and -WF are specified).

    PR libsframe/33806

    binutils/
            PR libsframe/33806
            * dwarf.c (debug_option_table): Remove sframe-internal-only.
            * objdump.c (dump_sframe_section): Call display function
            directly instead of dump_dwarf.
            (dump_bfd): Update call to dump_sframe_section.
            (main): Remove 'sframe-internal-only' hack.
    binutils/testsuite/
            * binutils-all/x86-64/sframe-func.s: Emit .eh_frame section as
            well.
            * binutils-all/x86-64/objdump-sframe-2.d: New test.

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

Reply via email to