Giter Site home page Giter Site logo

otm's Introduction

otm

otm - display static memory of an elf file in a treemap

Produces output like this: msb-430 space consumption

Needs python2, scipy, matplotlib, binutils (nm). Best used with an elf with debugging symbols as input.

usage

usage: otm.py [-h] [-d] [-fp FUNCTION_PATH_REGEX_IN]
              [-op OBJECT_PATH_REGEX_IN] [-fn FUNCTION_NAME_REGEX_IN]
              [-on OBJECT_NAME_REGEX_IN] [-Fp FUNCTION_PATH_REGEX_EX]
              [-Op OBJECT_PATH_REGEX_EX] [-Fn FUNCTION_NAME_REGEX_EX]
              [-On OBJECT_NAME_REGEX_EX] [-t SYMBOL_TYPE_LIST]
              [-m MINIMUM_SIZE]
              [filename]

otm - display static memory of an elf file in a treemap

positional arguments:
  filename              the elf file to parse

optional arguments:
  -h, --help            show this help message and exit
  -d, --documentation   print additional documentation and exit
  -fp FUNCTION_PATH_REGEX_IN, --function-path-regex-in FUNCTION_PATH_REGEX_IN
                        regular expression for function path inclusion
  -op OBJECT_PATH_REGEX_IN, --object-path-regex-in OBJECT_PATH_REGEX_IN
                        regular expression for object path inclusion
  -fn FUNCTION_NAME_REGEX_IN, --function-name-regex-in FUNCTION_NAME_REGEX_IN
                        regular expression for function name inclusion
  -on OBJECT_NAME_REGEX_IN, --object-name-regex-in OBJECT_NAME_REGEX_IN
                        regular expression for object name inclusion
  -Fp FUNCTION_PATH_REGEX_EX, --function-path-regex-ex FUNCTION_PATH_REGEX_EX
                        regular expression for function path exclusion
  -Op OBJECT_PATH_REGEX_EX, --object-path-regex-ex OBJECT_PATH_REGEX_EX
                        regular expression for object path exclusion
  -Fn FUNCTION_NAME_REGEX_EX, --function-name-regex-ex FUNCTION_NAME_REGEX_EX
                        regular expression for function name exclusion
  -On OBJECT_NAME_REGEX_EX, --object-name-regex-ex OBJECT_NAME_REGEX_EX
                        regular expression for object name exclusion
  -t SYMBOL_TYPE_LIST, --symbol-type-list SYMBOL_TYPE_LIST
                        list of symbol types to include
  -m MINIMUM_SIZE, --minimum-size MINIMUM_SIZE
                        mininum size for all types

documentation

Regular expression examples:
    display only functions that come from net or core:
        --function-path-regex-in "net|core"

    display only objects that nm could not look up
        --obj-path-regex "\?\?"

    do not display objects that end on _stack
        --object-name-regex-ex "_stack$"

    When combining these options, exclusion takes precedence over
    inclusion:

    display only objects from main.c filtering out stacks:
        -op "main\.c" -On "_stack$|_stk$"


Symbol type list:
    include text and BSS section symbols check the nm manpage for
    details:
        --symbol-type-list tTbB


Minumum size:
    The minimum-size argument is taken as an inclusion hurdle, i.e.
    symbols below that size are not taken into consideration at all.

otm's People

Contributors

ludwigknuepfer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

conservify

otm's Issues

ppati referenced before assignment

I try these command:
python otm.py app.elf
Traceback (most recent call last):
File "otm.py", line 307, in
elf = parse_elf(**vars(args))
File "otm.py", line 216, in parse_elf
if ppati and not re.search(ppati, pathname):
UnboundLocalError: local variable 'ppati' referenced before assignment

Did I do something wrong?

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.