Skip to content

Experimental MIPS CPU plugin for the Hopper Disassembler

License

Notifications You must be signed in to change notification settings

makigumo/MIPSCPU

Repository files navigation

MIPS CPU plugin for Hopper Disassembler

build

This is an experimental, unsophisticated plugin prototype using a custom disassembler and the capstone (http://www.capstone-engine.org/) engine for the MIPS architecture whose main purpose is to provide a play and learning ground for the Hopper plugin system and the MIPS architecture and some assembly language in general.

There are currently two disassembler engines:

  • capstone based engine for MIPS32
  • custom engine for MIPS I, II, III, IV and MIPS32/MIPS64

Requirements

Building

  • build with Xcode
  • or, via xcodebuild
  • or, using cmake
    mkdir build
    cd build
    cmake ..
    make
    make install
    

Linux

The Linux build requires the compilation of the Hopper SDK. Please also refer the official SDK Documentation.

Compile SDK

  • download and extract the Hopper SDK from https://hopperapp.com
    mkdir HopperSDK
    cd HopperSDK
    unzip HopperSDK-*.zip # your downloaded SDK file
    
  • build the SDK
    cd Linux
    ./install.sh
    
  • add the newly created bin-path to your PATH
    export PATH="$PATH":gnustep-Linux-x86_64/bin/
    

Build plugin

  • follow the instructions for building with cmake
  • or, run
    ./build.sh
    

Linux (Docker)

A docker image with a precompiled Hopper SDK for Linux is also available, just run

./docker/linux-build.sh

Status

  • Little and big endianess
  • MIPS I
  • MIPS II
  • MIPS III
  • MIPS IV
  • MIPS32 (release 1)
  • MIPS32 release 2
  • MIPS32 release 5
  • MIPS32 release 6
  • MIPS64 (release 1)
  • MIPS64 release 2
  • MIPS64 release 3
  • MIPS64 release 5
  • MIPS64 release 6
  • Branch typing is incomplete (still need to figure out the different DISASM_BRANCH_* types)
  • NOPping should work

TODO

  • Extend instruction analysis for Hopper to do its magic
  • Handle branch delay slots
  • Disassemble into pseudo instructions (ideally as a second syntax option)
    • Find a way to make syntax variant work
  • Add support for assembling instructions (using keystone)
  • Find ways to utilize some of performBranchesAnalysis:, performInstructionSpecificAnalysis:, performProcedureAnalysis:, hasProcedurePrologAt: etc.

Resources

About

Experimental MIPS CPU plugin for the Hopper Disassembler

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published