This repository was archived by the owner on Jul 3, 2022. It is now read-only.
Provide a sample app for the BakeBread tool#4
Open
paul-mc-arrow wants to merge 6 commits intoashtom:masterfrom
Open
Provide a sample app for the BakeBread tool#4paul-mc-arrow wants to merge 6 commits intoashtom:masterfrom
paul-mc-arrow wants to merge 6 commits intoashtom:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Instead of coding a fresh sample app, I decided to build on top of the sample app you are familiar with.
To build, I followed the outlines at
https://support.hockeyapp.net/kb/client-integration-android/hockeyapp-for-android-ndk-early-access
https://chromium.googlesource.com/breakpad/breakpad/+/master/README.md
To illustrate the capabilities of postmortem debugging, I replaced the simple "null dereference" crash with two more sophisticated examples: pointer sort based on a custom comparator. Variables in the "stack" example can be read from the kind of dump Breakpad creates by default: thread stacks, memory maps and a tiny tip of code around the instruction pointer. The "heap"/"off-stack" example demonstrates a flaw in an STL container. To debug it, we need the "sweet cuts" of the heap.
To separate the wrapper code from the purposefully faulty sample code, the former has been placed in
breakpad.cppand the latter incrash.cpp.native.cppstayed the only C++ source file aware of JNI types.