I have to compile FFmpeg for iOS using an external build script, but when I am debugging I see assembler if I delve too deep into libavformat library functions:
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
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.
Is this even possible?
edit: I found a related question here No symbols/source for external library in Xcode 4
So when I run xcrun dwarfdump libavformat.a | grep "\.c"
I get a bunch of results like this:
AT_decl_file( "libavformat/movenc.c" )
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: https://github.com/openwatch/livestreamer-ios
edit2: I found another question about how to set the source mapping for lldb but I'm not quite sure what to do... LLDB equivalent of gdb "directory" command for specifying source search path?
It seems like I might need to do
(lldb) settings set target.source-map libavformat/movenc.c /path/to/libavformat/movenc.c
for every file I need?