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

--- Comment #1 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Vladimir Mezentsev
<vmeze...@sourceware.org>:

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

commit 470a0288a8180e4e66e0d239dc63d58f013f3d16
Author: Vladimir Mezentsev <vladimir.mezent...@oracle.com>
Date:   Fri May 2 00:15:37 2025 -0700

    gprofng: fix 32892 source line level information not available with "-g
-O2"

    gprofng ignored DW_AT_specification.
    As a result, gprofng skiped Dwarf for all functions declared as:
      < 2>:<0x0000f725> DW_TAG_subprogram(46)
          DW_AT_linkage_name(110)     "func_name"
          DW_AT_declaration*(60)      0x1 (1)
      < 1>:<0x00015acc> DW_TAG_subprogram(46)
           DW_AT_specification(71)    0xf725 (63269)

    Another problem was that gprofng ignored DW_AT_ranges.
    As a result, many functions are mapped to the <Unknown> module.

    gprofng/ChangeLog
    2025-05-01  Vladimir Mezentsev  <vladimir.mezent...@oracle.com>

            PR 32892
            * src/Dwarf.cc: Handle DW_AT_specification and DW_AT_ranges.
            * src/DwarfLib.cc: Likewise.
            * src/DwarfLib.h: Likewise.
            * src/Dwarf.h (get_ranges): New function.
            * src/Stabs.h (get_symbols): New function.
            * src/Stabs.cc: Move Symbol class to src/Symbol.cc.
            * src/Symbol.cc: New file.
            * src/Symbol.h: New file.
            * src/Makefile.am: Add Symbol.cc in build.
            * src/Makefile.in: Rebuild.
            * src/LoadObject.cc (dump_functions): Improve output for -dfunc
option.

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

Reply via email to