This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/47217] New: builtin functions should emit debug data
- From: "fche at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 7 Jan 2011 17:56:43 +0000
- Subject: [Bug debug/47217] New: builtin functions should emit debug data
- Auto-submitted: auto-generated
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.