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: unassig...@gcc.gnu.org ReportedBy: f...@redhat.com CC: aol...@gcc.gnu.org, rol...@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.