This is an archive of the discontinued LLVM Phabricator instance.

[llvm-readobj] Add support for reading OpenBSD ELF core notes.
ClosedPublic

Authored by fcambus on Oct 17 2021, 9:19 AM.

Details

Summary

Notes generated in OpenBSD core files provide additional information about the kernel state and CPU registers. These notes are described in core.5, which can be viewed here: https://man.openbsd.org/core.5

Diff Detail

Event Timeline

fcambus created this revision.Oct 17 2021, 9:19 AM
fcambus requested review of this revision.Oct 17 2021, 9:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 17 2021, 9:19 AM
MaskRay added inline comments.Oct 18 2021, 10:24 PM
llvm/include/llvm/BinaryFormat/ELF.h
1614

one blank line

llvm/tools/llvm-readobj/ELFDumper.cpp
5334

By default a non-template variable of non-volatile const-qualified type belong to a namespace scope is internal, so static const can usually be written as const.

I simplified other variables.

5454

startswith("OpenBSD") If I understand it correctly

fcambus updated this revision to Diff 381779.Oct 24 2021, 6:10 AM
fcambus marked 3 inline comments as done.
MaskRay accepted this revision.Oct 29 2021, 8:20 PM

Thanks!

llvm/tools/llvm-readobj/ELFDumper.cpp
5455

The two if can be combined

This revision is now accepted and ready to land.Oct 29 2021, 8:20 PM
fcambus updated this revision to Diff 383903.Nov 1 2021, 2:59 PM

Combine the two if checks in getNoteTypeName().

fcambus marked an inline comment as done.Nov 1 2021, 2:59 PM
MaskRay accepted this revision.Nov 1 2021, 3:58 PM
This revision was landed with ongoing or failed builds.Nov 2 2021, 2:19 AM
This revision was automatically updated to reflect the committed changes.