title: How to match precompiled static library's debugging symbols to source code with Xcode 5?
body: <p>I have to compile FFmpeg for iOS using an <a href="https://github.com/chrisballinger/FFmpeg-iOS" rel="nofollow noreferrer">external build script</a>, but when I am debugging I see assembler if I delve too deep into libavformat library functions:</p>
  
  <pre><code>0x109a73:  cmpl   $0, 1192(%ebp)
  0x109a7a:  jns    0x109a86                  ; mov_write_header + 198 at movenc.c:3539
  0x109a7c:  movl   $1, 1192(%ebp)
  0x109a86:  movl   16(%ebp), %eax
  0x109a89:  cmpl   $0, 84(%eax)
  0x109a8d:  movl   %edx, %ecx
  0x109a8f:  jne    0x109ad9                  ; mov_write_header + 281 at movenc.c:3548
  0x109a91:  testb  $2, 48(%ecx)
  0x109a95:  jne    0x109ac1                  ; mov_write_header + 257 at movenc.c:3541
  </code></pre>
  
  <p>There are clear debugging symbols left behind which would lead me to believe that there should be some way to tell Xcode the location of this source code to allow easier debugging.</p>
  
  <p>Is this even possible?</p>
  
  <p><strong>edit</strong>: I found a related question here <a href="https://stackoverflow.com/questions/12895922/no-symbols-source-for-external-library-in-xcode-4">No symbols/source for external library in Xcode 4</a></p>
  
  <p>So when I run <code>xcrun dwarfdump libavformat.a | grep "\.c"</code> I get a bunch of results like this:</p>
  
  <pre><code>AT_decl_file( "libavformat/movenc.c" )
  </code></pre>
  
  <p>So I tried putting the relevant source files in folders relative to both the .a file and my .xcodeproj file, but neither of those methods worked. Full source code is available here: <a href="https://github.com/openwatch/livestreamer-ios" rel="nofollow noreferrer">https://github.com/openwatch/livestreamer-ios</a></p>
  
  <p><strong>edit2</strong>: I found another question about how to set the source mapping for lldb but I'm not quite sure what to do... <a href="https://stackoverflow.com/questions/12973633/lldb-equivalent-of-gdb-directory-command-for-specifying-source-search-path">LLDB equivalent of gdb &quot;directory&quot; command for specifying source search path?</a></p>
  
  <p>It seems like I might need to do</p>
  
  <pre><code>(lldb) settings set target.source-map libavformat/movenc.c /path/to/libavformat/movenc.c 
  </code></pre>
  
  <p>for every file I need?</p>