[LLVMbugs] [Bug 14610] New: Clang emits debug info for multiple (at least D1 and D2) dtor functions
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Dec 14 09:54:17 PST 2012
http://llvm.org/bugs/show_bug.cgi?id=14610
Bug #: 14610
Summary: Clang emits debug info for multiple (at least D1 and
D2) dtor functions
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Keywords: googler
Severity: enhancement
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: dblaikie at gmail.com
CC: dgregor at apple.com, echristo at gmail.com,
llvmbugs at cs.uiuc.edu
Blocks: 14330
Classification: Unclassified
Reduced from the GDB 7.5 test gdb.cp/mb-ctor.cc:
#include <cstdio>
struct Base {
~Base() {
printf("~Base\n");
}
};
struct Derived : virtual Base {
~Derived();
};
Derived::~Derived() {
printf("~Derived\n");
}
int main() {
Derived d;
}
breaking on "Derived::~Derived()" in GDB with Clang debug info causes this
program to break twice. With GCC's debug info the program only breaks once.
>From the DWARF dump it looks like Clang is emitting debug info
(DW_TAG_subprogram and line table entries) for both the D1 and D2 version of
the function, both with a DW_AT_specification of the DW_TAG_subprogram named
"~Derived". I assume this is why GDB breaks twice.
I can't quite do a direct comparison to GCC & see which function it's emitted
debug info for because it seems to have inlined the dtor call, even at -O0, so
I can't match it to a particular exported symbol.
--
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