Page MenuHomePhabricator

[Disassembler] MCELFNoteDisassembler abstraction
Needs ReviewPublic

Authored by tpr on Oct 3 2018, 1:30 AM.

Details

Summary

This commit adds a new abstraction that a target can register with
TargetRegistry to disassemble an ELF note record. This is different to
the ELFNoteDumper abstraction I added in an earlier change; this new one
takes an MCTargetStreamer to stream directives into, and is intended for
a disassembler that wants to show the note record in a form that is
editable and re-assemblable.

A subsequent commit will add an implementation of this in AMDGPU.

There is currently no in-tree user of this.

Change-Id: I6a46db4f88b0d27a1abd06c878c2bf092bb1665b

Diff Detail

Event Timeline

tpr created this revision.Oct 3 2018, 1:30 AM

See D52824 for the start of AMDGPU implementing this.

As there is currently no in-tree user, I would be happy with a review that says "LGTM subject to there being a testable in-tree user". Then I can keep the change in a holding pattern until we're in a position to upstream the code that uses it.

tpr added a reviewer: kzhuravl.Oct 3 2018, 1:58 AM
tpr added subscribers: dstuttard, timcorringham.
arsenm added a subscriber: arsenm.Oct 3 2018, 2:10 AM
arsenm added inline comments.
include/llvm/MC/MCDisassembler/MCELFNoteDisassembler.h
1

Missing - before * for the mode comment