<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 --- - missing debug info - clang does not respect debug levels?"
   href="http://llvm.org/bugs/show_bug.cgi?id=20741">20741</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>missing debug info - clang does not respect debug levels?
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

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

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

        <tr>
          <th>OS</th>
          <td>Windows NT
          </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>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>yaron.keren@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dblaikie@gmail.com, llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This program

 #include <string>
 int main() { std::string s; }

compiled with clang latest snapshot LLVM-3.6.0-r215932-win32.exe against
libstdc++ 4.9.1 and dumped with dwarf-dump produces a dump of 324 lines. When
compiled with gcc 4.9.1 the dump is 6879 lines. The commands to reproduce are:

 "c:\Program Files (x86)\LLVM\bin\clang.exe" -c -g -O0 -gdwarf-4 a.cpp -target
i686-pc-windows-gnu
 llvm-dwarfdump.exe a.o > a_clang.txt

 gcc -c -g -O0 a.cpp
 llvm-dwarfdump.exe a.o > a_gcc.txt

Most of the debug info is missing in the clang output, for example there are no
DW_TAG_members at all.

I tried various -g levels 0,1,2,3 with no change at all in the dump.
Maybe the -g debugging level logic is broken?</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>