zig icon indicating copy to clipboard operation
zig copied to clipboard

WIP Dwarf: Added stroffsetsptr support

Open kdchambers opened this issue 1 year ago • 1 comments

Dwarf FORM types strx1, strx2, strx3 and strx4 are now handled. This (for me) fixes #12120

However, I'm unsure if getStringOffset is correct as I'm unsure how to test it. At the very least it won't cause a regression as the current behaviour is that error.InvalidDebugInfo is returned when a strx* FORM is encountered.

kdchambers avatar Jul 28 '22 07:07 kdchambers

However, I'm unsure if getStringOffset is correct as I'm unsure how to test it. At the very least it won't cause a regression as the current behaviour is that error.InvalidDebugInfo is returned when a strx* FORM is encountered.

Maybe it'd be possible to find an attribute that uses the new forms and then check the string against the output of llvm-dwarfdump?

topolarity avatar Jul 29 '22 00:07 topolarity

I believe I have created a merge conflict for you - apologies! It should be trivial to adjust to the new MachO linker, and as a bonus, I've completely removed the unneeded DebugInfo structure.

kubkon avatar Aug 04 '22 19:08 kubkon

@kubkon No worries at all, I've have a look at your changes and rebase. Unfortunately I've been very busy this week but hopefully can spare some time this weekend to finish and get it merge-able.

kdchambers avatar Aug 04 '22 21:08 kdchambers

This is ready to be reviewed and merged. I managed to test getStringOffset and it seems to be returning the correct strings.

kdchambers avatar Aug 09 '22 11:08 kdchambers

Thanks for the PR @kdchambers - Congrats on your first contribution 🙂

I've updated #12120 to include any loose threads from this PR.

topolarity avatar Aug 23 '22 16:08 topolarity