This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Teach dwarfdump and lldb about ptrauth DWARF tags and attributes
ClosedPublic

Authored by JDevlieghere on Jul 20 2022, 5:55 PM.

Details

Summary

Teach llvm-dwarfdump and lldb about DWARF tags and attributes for pointer authentication.

Diff Detail

Event Timeline

JDevlieghere created this revision.Jul 20 2022, 5:55 PM
Herald added a project: Restricted Project. · View Herald Transcript
JDevlieghere requested review of this revision.Jul 20 2022, 5:55 PM
Herald added a project: Restricted Project. · View Herald Transcript
jhenderson added inline comments.Jul 21 2022, 12:16 AM
llvm/include/llvm/BinaryFormat/Dwarf.def
228

This section of the file seems to be in numerical value order, so this tag needs to be after the SUN* tags.

Has the value been finalised, and is the APPLE bit of this line correct (it might be, I'm not all that familiar with the tags)? It seems odd putting it here when we already have another block of LLVM tags (well one tag) further down which surely should be extended, rather than adding a second block?

603–609

Is APPLE actually correct here? These are LLVM attributes after all. Labelling them as coming from APPLE vendors seems wrong?

JDevlieghere marked an inline comment as done.Jul 21 2022, 9:01 AM
JDevlieghere added inline comments.
llvm/include/llvm/BinaryFormat/Dwarf.def
228

Yes, the values are finalized in the sense that this is what we've been generating for several years and the goal of this change is to make dwarfdump and friends understand existing binaries. I can move it into the LLVM block, but that doesn't fix the ordering problem. Do you want me to create another LLVM block between SUN and ALTIUM?

603–609

I'm fine either way. I went with Apple as the vendor to match the LLVM_apinotes which is another thing that's specific to our platform.

jhenderson added inline comments.Jul 22 2022, 12:00 AM
llvm/include/llvm/BinaryFormat/Dwarf.def
228

Do you want me to create another LLVM block between SUN and ALTIUM?

I think that would be the right thing to do.

603–609

I'll let someone more familiar with the DWARF stuff decide, as I'm a bit out of the loop these days. Just wanted to make sure there wasn't some copy/paste error or similar going on.

aprantl accepted this revision.Jul 26 2022, 11:10 AM
aprantl added inline comments.
llvm/include/llvm/BinaryFormat/Dwarf.def
228

sounds good to me.

This revision is now accepted and ready to land.Jul 26 2022, 11:10 AM
This revision was landed with ongoing or failed builds.Jul 27 2022, 11:49 AM
This revision was automatically updated to reflect the committed changes.
JDevlieghere marked an inline comment as done.
Herald added a project: Restricted Project. · View Herald TranscriptJul 27 2022, 11:49 AM