Giter Site home page Giter Site logo

newcomb-luke / kdump Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 0.0 306 KB

KDump is a small utility that disassembles and reads KSM and KO files for use with KerbalOS.

License: GNU General Public License v3.0

Rust 100.00%
kerbal-space-program kerbal-operating-system ksp kos krisc kasm assembly disassembly

kdump's Introduction

KDump

github github License

GitHub Workflow Status Libraries.io dependency status for GitHub repo Crates.io Downloads

KDump is a program that allows anyone with a command line to view the contents of KerboScript Machine Code (KSM) files, and KerbalObject (KO) files to view compiled code for Kerbal Operating System. KO and KSM files are fully supported.

KDump is the kOS equivalent to ELF's objdump or readelf programs.

screenshot

Features

  • Color terminal output
  • Human readable text
  • Debug line number display alongside disassembly

Installation

KDump can either be installed via cargo through crates.io, or as a standalone binary.

Windows

  • Download the installer .msi file from Releases on the right
  • Run the installer
  • kdump should now be added to your PATH and available from any CMD or Powershell window

Arch Linux

  • Download the PKGBUILD from Releases on the right

  • Copy it to a temporary folder

  • Run makepkg -si to install the kdump and all of its dependencies.

  • kdump should now be added to your PATH and available from any terminal

Standalone Executables

  • Download and extract the .zip file from Releases on the right
  • Place the executable in the desired location
  • Run the executable through the terminal, Powershell on Windows or the default terminal on Mac OS or Linux.

Cargo

To install using cargo:

cargo install kdump

kdump should then be added to your shell's PATH, and can be run from any terminal

Usage

KDump can be invoked after installation as kdump

Help can be accessed from the program itself by running:

kdump --help

KDump takes one .ko or .ksm file as input:

kdump program.ksm

However the default mode is to print nothing. Print options need to be specified.

Most of the time the most useful, even if it takes up the most space is to view the file's full contents. This can be specified by using the -x or --full-contents flags:

kdump program.ksm --full-contents

If only disassembly of function sections is the main concern, then use only the -D or --disassemble flags:

kdump lib.ko -D

When debugging compiled KerboScript files, debug information is stored in KSM files, and KDump is able to read and display this information. Line numbers are displayed to the left of disassembly and can be enabled using the -l or --line-numbers flags:

kdump launch.ksm -Dl

If a file was generated using the Kerbal Linker or similar programs, then there may be information about what tools were used to generate KerbalObject and KSM files, and this can be viewed by passing the -i or --info flags:

kdump script.ksm -i

kdump's People

Contributors

newcomb-luke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

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.