• huangs's avatar
    [Courgette] Refactor: Unify Disassembler::Disassemble() and instantiate AssemblyProgram there. · 257f9fb0
    huangs authored
    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.
    Review-Url: https://codereview.chromium.org/2771753004
    Cr-Commit-Position: refs/heads/master@{#459272}
disassembler_win32.cc 22.4 KB