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: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
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.