[LLVMbugs] [Bug 19005] New: DW_TAG_typedef and DW_TAG_structure_type missing

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Feb 28 02:44:23 PST 2014


http://llvm.org/bugs/show_bug.cgi?id=19005

            Bug ID: 19005
           Summary: DW_TAG_typedef and DW_TAG_structure_type missing
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: tim.besard at elis.ugent.be
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 12167
  --> http://llvm.org/bugs/attachment.cgi?id=12167&action=edit
C test case.

Hi all,

On the attached test cases, both defining two structs value_t and example_t but
only using variables of type value_t* (accesses to example_t happen through
pointer casts) Clang doesn't seem to emit the necessary DW_TAGs for the
example_t type, while GCC does.

How to reproduce:
$(CC) -g test.c
- OR -
$(CXX) -g test.cpp
objdump -g a.out | grep example_t

Expected behaviour:
for C: DW_TAG_typedef tags for both value_t and example_t
for C++: DW_TAG_structure_type tags for these types

This matters for debugging purposes:
$ gdb ./a.out
(gdb) break 30
Breakpoint 1 at 0x4006a7: file test.cpp, line 30.
(gdb) run
Breakpoint 1, main () at test.cpp:30
30      return 0;
(gdb) print *value
$1 = {
  kind = 1
}
(gdb) print *(example_t*)value
$2 = {
  kind = 1, 
  foo = 42
}

When compiling with clang(++), this latest cast doesn't work:
(gdb) print *(example_t*)value
No symbol "example_t" in current context.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140228/5be69e91/attachment.html>


More information about the llvm-bugs mailing list