Ah, thanks, I didn't realize there was a reference producer API. BTW I have been using the producer API to write a test suite for something, and would like to be able to create multiple compilation/type unit entries. Right now all DIEs get added to the same compilation unit entry with a hard-coded version. I don't see any functions in the LGPL implementation to provide multiple unit entries; what do you think of adding extensions to the elftoolchain libdwarf to do this?
I guess we'd need to add a dwarf_producer_init_c() and corresponding callback function type to fix this? I'm happy to do the work if there's agreement that this is the direction to take.
dwarf producer API lacks a context parameter