Git Product home page Git Product logo

bosce's Introduction

bosce

Bosce, or boost::statechart extractor, is a command line tool to extract information about boost::statecharts from an arbitrary binary with debug symbols and transform it to a user-friendly form, e.g. UML diagrams.

It relies on objdump to extract information from binaries and is primarily intended to be used in a Linux environment.

Demo

First, we need a binary with debug symbols to work on.

$ g++ demo.cpp -o demo

Then, we get a list of state machine in this binary.

$ bosce demo -l
Available state-machines:
    StopWatch

Now, we generate a StopWatch state-machine representation in a PlantUML format.

$ bosce demo -s StopWatch > uml.pu

Finally, we use PlantUML to generate a PNG file and open it.

$ plantuml uml.pu
$ xdg-open uml.png

Build Instructions

Bosce depends on Qt5Core and boost::program_options and requires a C++14 compatible compiler.

First, clone the repository.

$ git clone https://github.com/kanje/bosce.git
Cloning into 'bosce'...
remote: Enumerating objects: 48, done.
remote: Total 48 (delta 0), reused 0 (delta 0), pack-reused 48
Unpacking objects: 100% (48/48), done.

Then, create a build directory and run cmake to configure the project.

$ mkdir bosce-build
$ cd bosce-build
$ cmake -DCMAKE_BUILD_TYPE=Release ../bosce
-- The CXX compiler identification is GNU 9.2.1
...
-- Configuring done
-- Generating done
-- Build files have been written to: /.../bosce-build

Finally, build bosce.

$ make -j10
Scanning dependencies of target bosce
[ 12%] Building CXX object CMakeFiles/bosce.dir/src/ScModel.cpp.o
...
[100%] Built target bosce

Reporting Issues

If you have encountered a problem and want to report it, please do not forget to provide an objdump which shows the problem. If the objdump is too big or contains proprietary code, it can be stripped.

$ bosce -SO original.objdump > stripped.objdump
$ bosce -SX binary > stripped.objdump

The stripped objdump contains only information related to boost::statecharts. Note, this includes state-machine, state and event names as well as assembly for react() methods.

bosce's People

Contributors

cpeltz avatar kanje 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.