This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug debug/47217] New: builtin functions should emit debug data


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47217

           Summary: builtin functions should emit debug data
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: fche@redhat.com
                CC: aoliva@gcc.gnu.org, roland@redhat.com


Consider functions such as __builtin_memcpy, _strlen, etc.  These functions
often expand into just a handful of assembly instructions that allow fast
execution.  However, they preclude debugging because there is no debugging
data emitted for them, so there is no metadata left to identify the
source-level memcpy.  So users can't put a breakpoint there via function
name, such as to count or test run-time memcpy uses.

It would be helpful if gcc were to arrange emission of dwarf data for 
some or all builtins.  One possibility would be to represent them as 
inlined-instances of the standard memcpy etc. functions, with DWARF
data such as DW_AT_artificial and no DECL coordinates.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]