Skip to content

Generating multiple CUs in a single pass with libdwarfp #202

@Victorious3

Description

@Victorious3

I'm trying to use libdwarfp to generate debug information for my compiler project.
The output is used to create an ELF object file. Now, I do have multiple compilation units which all end up in a single file. This seems to work fine for the most part by calling dwarf_producer_init for every compilation unit and dealing with the data accordingly.
Now the problem I ran into was that in the dwarf header for a compilation unit there's an offset into the abbrev section. Having 0 here works just fine for the first CU but when I add multiple ones (simply concatinating the sections) it doesn't yield the correct result.
I could probably patch the debug_info section as a workaround but maybe it would be a good idea to add a way of specifying the right offset with the api.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions