Giter Site home page Giter Site logo

whatthestack-rs's Introduction

WhatTheStack

A command line tool for parsing LLVM stack information, based on cargo-call-stack and stack-sizes.

Status

ci Crates.io Docs.rs

Usage

Enable -Zemit-stack-sizes by adding this to RUSTFLAGS in .cargo/config.toml

[build]
rustflags = [
    "-Z", "emit-stack-sizes",
]

Call wts with your compiled (ELF format) binary to retrieve a list of functions and stack sizes. Note that lto = "full" may result in LLVM inlining some methods (or your entire application), this may be influenced via the tactical addition of #[inline(never)] attributes to force the creation of separate stack frames.

> wts --help

WhatTheStack (wts), a tool for analysing stack use via LLVM `-Zemit-stack-sizes` information

Usage: wts [OPTIONS] <FILE>

Arguments:
  <FILE>
          ELF or object file for parsing

Options:
      --mode <MODE>
          ELF or object file mode
          
          [default: elf]

          Possible values:
          - elf:    Load ELF file
          - object: Load Object File

      --sort <SORT>
          Sort by function or stack size
          
          [default: stack]

          Possible values:
          - text:  Sort by function size
          - stack: Sort by stack size

      --min-size <MIN_SIZE>
          Minimum size for filtering
          
          [default: 16]

  -n, --lines <LINES>
          Number of lines to show
          
          [default: 10]

      --map-source
          Resolve addresses to source locations

      --long-names
          Disable function name shortening

      --log-level <LOG_LEVEL>
          Log level
          
          [default: info]

  -h, --help
          Print help (see a summary with '-h')

whatthestack-rs's People

Contributors

ryankurte 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.