Nice writeup! I've done some work with libdwarf and I agree that it isn't very pleasant. Do you have any suggestions for better interfaces that support writing?
Just something that writes DIE's?
Or do you need line info, accelerator tables, etc?
I've actually considered looking more at the LLVM dwarf writing components. Do you have any experience with that?