<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 --- - clang for iOS output very partial __debug_frame section"
   href="http://llvm.org/bugs/show_bug.cgi?id=16045">16045</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang for iOS output very partial __debug_frame section
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>other
          </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>qsr@chromium.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>With the following clang version:
% clang -v     
clang version 3.3 (trunk 179138)
Target: x86_64-apple-darwin12.3.0
Thread model: posix


 Given the following file:
---------------------------------------
void foo() {
}

int main() {
  foo();
}
---------------------------------------
I compile it for iOS:

% clang -target arm-apple-darwin7 -g -c /tmp/main.c -o /tmp/main.o

 Then looking at the __debug_frame section:

% otool -s __DWARF __debug_frame /tmp/main.o
/tmp/main.o:
Contents of (__DWARF,__debug_frame) section
0000025c        0000000c ffffffff 7c010001 0000000e 
0000026c        0000000c 00000000 00000000 00000004 
0000027c        0000000c 00000000 00000004 00000018 

 The section is useless to walk the stack.

 Debugger can use the fp to do it, so they don't seem to even care about the
debug_frame section, but is it an expected behavior, or should the
__debug_frame contains the information on how to unwind the stack and retrieve
the register values?</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>