Giter Site home page Giter Site logo

makigumo / mipscpu Goto Github PK

View Code? Open in Web Editor NEW
25.0 3.0 0.0 265 KB

Experimental MIPS CPU plugin for the Hopper Disassembler

License: GNU General Public License v3.0

Objective-C 92.00% CMake 1.79% Assembly 5.87% Shell 0.14% C 0.20%
hopper-disassembler hopper cpu plugin mips hopper-plugins

mipscpu's Introduction

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

mipscpu's People

Contributors

makigumo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mipscpu's Issues

I can’t use this plug-in to complete mips disassembly

Hello there! I can’t use this plug-in to complete mips disassembly, but the plug-in can read the symbol table. My hopper version is 4.5.29 and macos catalina 10.15.7. I don’t know what went wrong, I hope I can get your help. Thank you.

Confusing build instructions for Linux

Linux

Run install.sh from the Hopper-SDK. Then adjust your PATH to include the created gnustep-Linux-x86_64/bin/ path. Follow above instructions for building with cmake.

It's unclear that Hopper-SDK refers to your fork of the Hopper SDK, not the original HopperSDK.

Also for this reason gnustep-Linux-x86_64/bin/ path gets confusing, too. It needs to be recompiled from your fork.

IDK, maybe it's me but I found this confusing, maybe you can consider rephrasing it. Thanks for the plugin!

Linux build broken

The version of GNUstep used by Hopper doesn't support NSRegularExpression.

Unable to load plugin

I'm able to successfully build the plugin and it installs itself into the correct directory in Application Support but when I start up Hopper the plugin isn't listed in the Plugins list.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.