[Courgette] Refactor: Unify Disassembler::Disassemble() and instantiate AssemblyProgram there.
This is part of AssemblyProgram reduction effort. Details:
- Add Disassembler::Disassemble() and dedup separate PE/ELF versions.
- Instantiate AssemblyProgram there; replaces old behavior where
caller (program_detector.cc) instantiates and passes as out param.
- Add virtual Disassembler::GetInstructionGenerator().
- Remove InstructionGenerator's AssemblyProgram* param; update tests.
- Move InstructionReceptor and InstructionGenerator from AssemblyProgram
to new file instruction_utils.h.
- Rename ParseAbs32Relocs() to ExtractAbs32Locations(); make common.
- Rename ParseRel32Relocs() to ExtractRel32Locations(); make common.
- Make DisassemblerElf32::abs32_locations_ non-mutable.
BUG=660980
Review-Url: https://codereview.chromium.org/2771753004
Cr-Original-Commit-Position: refs/heads/master@{#459272}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 257f9fb084fd9c3a660ef8d7fd2948cb3d3fd1fb
15 files changed