How do you debug libc in OSX?
<p>I would expect to be able to statically link against a build of libc with debug symbols, then run my program through lldb.</p>

<p><code>otool -L &lt;my binary&gt;</code></p>

<p>makes it look like the only dynamically linked library (dll) is:</p>

<pre><code>/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
</code></pre>

<p>Which I would guess is the libc dll is (though <code>nm</code> doesn't list everything I'd expect in libc).  Maybe just some kind of stub loader.</p>

<p>In <code>/usr/lib/</code> it seems that Apple does not supply a debug build of libSystem.</p>

<p>How do you debug libc on OSX (10.11.3)?</p>

<p>Possible duplicate of:
<a href="https://stackoverflow.com/questions/1704648/on-mac-os-x-how-can-you-get-a-debug-build-of-system-libc-for-source-level-debug">On Mac OS X, how can you get a debug build of System/LibC for source level debugging?</a></p>