[Bug debug/47217] New: builtin functions should emit debug data
fche at redhat dot com
gcc-bugzilla@gcc.gnu.org
Fri Jan 7 18:12:00 GMT 2011
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.
More information about the Gcc-bugs
mailing list