ColinKennedy / tree-sitter-disassembly

Parse disassembly files using tree-sitter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tree-sitter-disassembly

This library parses disassembly text using tree-sitter to produce a light-weight grammar of the file.

Screenshots

Assembly

tree_sitter_disassembly_full_screen

Memory Dumps

tree_sitter_disassembly_memory_dump

ARM

Limited ARM support

tree_sitter_arm_disassembly

nvim-dap-ui

Warning: WIP. This feature is not yet merged into nvim-dap-ui.

tree_sitter_disassembly_nvim_dap_ui

Disclaimer

This repository's parsing rules are subject to change.

Building + Using

Neovim

Make sure you include the following somewhere in your init.lua file.

require("nvim-treesitter.configs").setup {
    ensure_installed = {"disassembly"},
    parser_install_dir = installation_directory,
    highlight = { enable = true },

    -- More stuff
}

Testing

Unittests

cd {root}
tree-sitter test

All tests should pass.

Actual Disassembly

The best way to test tree-sitter-disassembly is to parse open gdb or another debugger and copy its output. Basically anything that a DAP server can output should in theory be parseable by tree-sitter-disassembly.

About

Parse disassembly files using tree-sitter

License:GNU General Public License v3.0


Languages

Language:C 90.9%Language:JavaScript 4.3%Language:Rust 3.0%Language:C++ 1.0%Language:Python 0.4%Language:Scheme 0.3%