[prev in list] [next in list] [prev in thread] [next in thread] 

List:       llvm-bugs
Subject:    [LLVMbugs] [Bug 19005] New: DW_TAG_typedef and DW_TAG_structure_type missing
From:       bugzilla-daemon () llvm ! org
Date:       2014-02-28 10:44:23
Message-ID: bug-19005-206 () http ! llvm ! org/bugs/
[Download RAW message or body]

--1393584264.8fF243c21.17166
Date: Fri, 28 Feb 2014 04:44:24 -0600
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"

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@nondot.org
          Reporter: tim.besard@elis.ugent.be
                CC: llvmbugs@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.

--1393584264.8fF243c21.17166
Date: Fri, 28 Feb 2014 04:44:24 -0600
MIME-Version: 1.0
Content-Type: text/html; charset="UTF-8"

<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - DW_TAG_typedef and DW_TAG_structure_type missing"
   href="http://llvm.org/bugs/show_bug.cgi?id=19005">19005</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>DW_TAG_typedef and DW_TAG_structure_type missing
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs&#64;nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>tim.besard&#64;elis.ugent.be
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs&#64;cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=12167" \
name="attach_12167" title="C test case.">attachment 12167</a> <a \
href="attachment.cgi?id=12167&amp;action=edit" title="C test \
case.">[details]</a></span> 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 &quot;example_t&quot; in current context.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>

--1393584264.8fF243c21.17166--



_______________________________________________
LLVMbugs mailing list
LLVMbugs@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic