Giter Club home page Giter Club logo

das's Introduction

DAS - disassembler

DAS is an interactive disassembler inspired by perf annotate. It basically wraps the raw disassemly output from objdump -d and provides more information and functionality like instruction help, jump/call following, string lookup and function inlining info.

https://github.com/namhyung/das

screenshot

Usage

$ das <program>
  -d string
            Path to objdump tool (default "objdump")
  -i        Use inline info
  -v        Show version number

It supports following keys

  • UP/DOWN/PGUP/PGDOWN/HOME/END: move cursor
  • ENTER: fold/expand a section or move to a function
  • ESCAPE: return to previous function
  • v: toggle "raw" mode
  • l: list functions
  • q: quit
  • /: search
  • n: search next
  • p: search previous
  • s/S: save screen shot
  • r: focus register

How to install

If you have golang environment setup:

$ go get github.com/namhyung/das

Or, just download the binary:

$ wget https://github.com/namhyung/das/releases/download/v0.3/das-linux-amd64
$ sudo install -D das-linux-amd64 /usr/local/bin/das

das's People

Contributors

namhyung 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  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

das's Issues

Show inline information

The objdump has -l option which shows line numbers with function name. So we can deduce the inlined function information.

An example output is like below:

0000000000001201 <main>:
main():
/home/namhyung/tmp/hello.c:8
    1201:	55                   	push   %rbp
    1202:	48 89 e5             	mov    %rsp,%rbp
    1205:	48 83 ec 20          	sub    $0x20,%rsp
    1209:	ff 15 d9 2d 00 00    	callq  *0x2dd9(%rip)        # 3fe8 <mcount@GLIBC_2.2.5>
    120f:	89 7d ec             	mov    %edi,-0x14(%rbp)
    1212:	48 89 75 e0          	mov    %rsi,-0x20(%rbp)
/home/namhyung/tmp/hello.c:9
    1216:	48 8d 05 f1 0d 00 00 	lea    0xdf1(%rip),%rax        # 200e <_IO_stdin_used+0xe>
    121d:	48 89 45 f8          	mov    %rax,-0x8(%rbp)
/home/namhyung/tmp/hello.c:11
    1221:	83 7d ec 01          	cmpl   $0x1,-0x14(%rbp)
    1225:	7e 0c                	jle    1233 <main+0x32>

vim Bindings do not work in the binary

when pressing j/k the line is not moving.
I installed from the binary as advertised in the README.md
achlinux; 5.6.8-arch1-1 #1 SMP PREEMPT Wed, 29 Apr 2020 16:22:56 +0000 x86_64 GNU/Linux
I looked at the code, and there is apparently code to to that.
https://github.com/namhyung/das/blob/master/tui.go#L764

I am trying to compile it locally, but there are errors.

  1. Apparently, it needs capstone to be installed. (cannot find capstone/capstone.h) (fair. installed it)
  2. then it complains: in bnagy/gapstone/arm_64_constants.go "could not determine kind of name for C.ARM64_[]" but I think the problem is in gapstone itself. -> I'd like to have a list of dependencies in this repo anyway.

So I think the vim bindings should be mentioned in the README.
And they should work in the binary.

Would be happy to contribute, if necessary, (Mostly about more vim-like-user-experience).

Cannot handle vmlinux

It does't show meaningful result and prints following messages:

2019/12/13 17:13:33 strconv.ParseInt: parsing "ffffffff824f3573": value out of range
2019/12/13 17:13:33 strconv.ParseInt: parsing "ffffffff824f357f": value out of range
2019/12/13 17:13:33 strconv.ParseInt: parsing "ffffffff824f35a1": value out of range
2019/12/13 17:13:33 strconv.ParseInt: parsing "ffffffff824f35cf": value out of range
2019/12/13 17:13:33 strconv.ParseInt: parsing "ffffffff824f35db": value out of range
2019/12/13 17:13:33 strconv.ParseInt: parsing "ffffffff824f35f1": value out of range
2019/12/13 17:13:33 strconv.ParseInt: parsing "ffffffff824f35fd": value out of range

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.