[LLVMbugs] [Bug 13942] New: Clang doesn't emit debug info for _GLOBAL__I_a
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Sep 27 06:48:06 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=13942
Bug #: 13942
Summary: Clang doesn't emit debug info for _GLOBAL__I_a
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: samsonov at google.com
CC: echristo at gmail.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Clang doesn't emit debug info entry for __GLOBAL__I_a function that calls
constructors for global objects.
$ cat a.cc
class A {
public:
A() { val_ = 42; }
int val_;
};
A glob;
int main() {
return glob.val_;
}
$ clang++ -g a.cc
$ objdump -d a.out | grep "_GLOBAL__I_a"
0000000000400570 <_GLOBAL__I_a>:
$ readelf -wi a.out | grep "_GLOBAL__I_a"
$
g++ does this:
$ g++ -g a.cc
$ objdump -d a.out | grep "_GLOBAL__"
00000000004004e9 <_GLOBAL__sub_I_glob>:
$ readelf -wi a.out | grep "_GLOBAL__"
<10d> DW_AT_name : (indirect string, offset: 0x0):
_GLOBAL__sub_I_glob
This DIE is important when we build address range table (a list of instruction
address ranges for each compile unit). If DIE for _GLOBAL__I_a is not a child
of corresponding CompileUnit DIE, then its instructions will not be considered.
--
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