[LLVMbugs] [Bug 12528] New: DW_AT_ranges not generated when compiled with -ffunction-sections
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Apr 11 22:34:08 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=12528
Bug #: 12528
Summary: DW_AT_ranges not generated when compiled with
-ffunction-sections
Product: clang
Version: 3.0
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: karthikthecool at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
DW_AT_ranges is not generated when compiled with -ffunction-sections.
E.g. In the below function -
int
f (void)
{
return 1;
}
when we compile this code with "-gdwarf-2 -ffunction-sections -w -dA" options.
In case of gcc DW_AT_ranges is generated. This tag is not generated when
compiled with clang.
Gcc Assembly snippet-
aranges-fnsec-1.c"
.long 0x0 # DW_AT_low_pc
.long 0x0 # DW_AT_entry_pc
.long .Ldebug_ranges0+0x0 # DW_AT_ranges
.long .Ldebug_line0 # DW_AT_stmt_list
.uleb128 0x2 # (DIE (0x25) DW_TAG_subprogram)
.byte 0x1 # DW_AT_external
.ascii "f\0" # DW_AT_name
.byte 0x1 # DW_AT_decl_file
Clang Assembly-
.byte 0
.byte 2 # Abbrev [2] 0x11f:0x16 DW_TAG_subprogram
.byte 102 # DW_AT_name
.byte 0
.byte 1 # DW_AT_decl_file
.byte 13 # DW_AT_decl_line
.byte 1 # DW_AT_prototyped
.long 309 # DW_AT_type
.byte 1 # DW_AT_external
.long .Lfunc_begin0 # DW_AT_low_pc
.long .Lfunc_end0 # DW_AT_high_pc
.byte 1 # DW_AT_frame_base
In case of clang DW_AT_ranges is not generated.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list