I'm using llvm-2.5 on OS X 10.5 and having a problem getting debug info from my compiler into a resulting executable.
My code flow is:
LLVM API -> Assembly file .s -> gcc to .dylib
I'm using DIFactory to generate the debug info, and my usage seems to match what clang's CGDebugInfo would do. In my resulting assembly file, I see the DWARF sections with apparently valid data:
.section __DWARF,__debug_info,regular,debug
etc.
As soon as I send my assembly to gcc it disappears. I can call 'as' directly as gcc does, and at this point the debug info disappears:
as -g -arch i386 -force_cpusubtype_ALL -o random.o random.s
Am I missing a step or not doing something properly to keep my debug info preserved?
Any tips or pointers would be appreciated!
Thanks,
Kyle