Git Product home page Git Product logo

bakebread's Introduction

BakeBread

Copyright (c) Microsoft Corporation

All rights reserved. Released under MIT License.

What's it?

BakeBread is a collection of tools that facilitate postmortem debugging of Minidump files, such as those captured by Breakpad. It's originally been developed to complement HockeyApp for Android.

Naive stack scanning - based on the assumption that every valid code address found in the stack denotes a call frame - is simple and straightforward, but in many cases produces false positives and unrealistic results. Dump processing on the cloud side adds to the complications because platform binaries (especially on fragmented platforms such as Android) stay out of scope. It would be just natural to utilize the intimate knowledge of frame and object layout shared between the compiler and the debugger from the same NDK toolchain. Unfortunately, the minidump format is not native to Android NDK toolchains; the core dump format is. The primary functionality of BakeBread is conversion of minidumps into core dumps for further high-level postmortem debugging; no longer bits and hexadecimals, but code lines and variables.

If you use HockeyApp for Android NDK or a similar native crash reporting solution, you can start using BakeBread straight away. To improve analysis quality, we suggest reporting memory areas referenced from the stack of the crashed thread in addition to the crashed thread stack itself (if you are concerned about the upload size, HockeyApp understands and processes dumps uploaded with GZip compression). If, for instance, your libraries use smart pointers, such an enhancement is really a must. See MOREDUMP.md for details.

Getting started

BakeBread has been tested on Ubuntu Linux and Microsoft Windows host operating systems; it should seamlessly work on OS X.

Make sure you have Java 1.7+ and Ant installed. Check out (clone) the code. Run ant in the root of the local copy folder; bakebread.jar would be built. (Alternatively, open the project in IntelliJ IDEA and build it into a single artifact.)

Assuming mini.dmp is a minidump captured on ARM/Linux, application libraries (with symbols, ideally) are placed in app/lib/unstripped and device libraries are pulled from the device (or expanded from a firmware image) into device/sysroot, the following command

java -jar bakebread.jar -Dc -CS ./out -CC core.dump -P app/lib/unstripped:device/sysroot -Vdh -Mea -Or mini.dmp

displays crash information (-Dc), splits the dump into individual streams and sections into out (-CS) and converts the minidump into core.dump (-CC). A "courtesy" GDB session loading script will be written to core.dump.gdb. Differences between host and target binaries, if encountered, would be summarized in core.dump.diff.

Caveats

BakeBread's goal is not to enforce any specification authoritatively, but to adjust to existing diverse and imperfect implementations of multiple specifications based on incomplete and sometimes mutually contradictory information. Rather than a consumer product, it's an "ad-hoc" tool intended for conscious use by a developer roughly capable of doing a similar job, however slower, manually. In a nutshell, the tool is released in source so that you could debug it in place.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

bakebread's People

Contributors

paul-mc-arrow avatar dryganets avatar prodoelmit 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.