Go to file
Mike Klein 1b4602bd9b ok, backtrace support on Android
This adds a fallback backtracer for use on Android where <execinfo.h>
ins't present, instead using <unwind.h> to unwind and <dlfcn.h> to
lookup function names and addresses.

lockf() wasn't available until NDK API 24, so I've just no-op'd file
locking on older targets.  I tried switching from lockf() to flock(),
but flock() didn't see to _do_ anything, neither on Android nor on my
Mac laptop.  I think I should be able to use the lower-level fcntl()
APIs to restore file locking uniformly in a follow-up.  The upshot is
until then, we'll have interlaced logs and stack traces on Android
devices unless you set ndk_api=24 in GN.

We need to add a couple build flags to make backtraces useful:

   * -funwind-tables makes the call to _Unwind_Backtrace() actually
     traverse the call stack.  This is a small extra binary size cost.
   * -rdynamic makes symbols linked into the main executable visible
     to dladdr().  We do this on Linux already for the same reason.

Here's an example where I made aaxfermodes call SK_ABORT():

    650 ok, 1 crashed
    caught signal SIGABRT while running 'aaxfermodes'
        0x76ed936288 [unknown]+308
        0x76eec014e0 [unknown]+510811706592
        0x76ed367b2c tgkill+8
        0x76ed364f50 pthread_kill+68
        0x76ed31ff5c raise+28
        0x76ed318814 abort+56
        0x76edebd070 sk_out_of_memory()+12
        0x76ed99f664 AAXfermodesGM::draw_pass(SkCanvas*, AAXfermodesGM::DrawingPass)+96
        0x76ed99f4e4 AAXfermodesGM::onDraw(SkCanvas*)+36
        0x76ed9e8550 skiagm::GM::drawContent(SkCanvas*)+224
        0x76ed9e82ac skiagm::GM::draw(SkCanvas*)+288
        0x76ed93b10c GMStream::GMSrc::draw(SkCanvas*)+96
        0x76ed937b08 SWDst::draw(Src*)+284
        0x76ed936ca0 [unknown]+112
        0x76ed939b4c ForkEngine::spawn(std::function<Status ()>)+88
        0x76ed934d00 main+2200
        0x76ed316598 __libc_init+92
        0x76ed93434c [unknown]+510791992140

Change-Id: Ica4849d99a3b97f48d778f4c15a7fa36275b8133
Reviewed-on: https://skia-review.googlesource.com/40802
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-08-30 17:50:07 +00:00
animations first cut at a checkbox 2009-10-21 19:41:10 +00:00
bench Threaded generation of software paths 2017-08-30 15:27:42 +00:00
bin add a Win/Clang build bot 2017-07-31 19:53:51 +00:00
debugger Add Make[backend] calls for creating GrContexts 2017-07-25 14:33:03 +00:00
dm Threaded generation of software paths 2017-08-30 15:27:42 +00:00
docs fix param return descriptions 2017-08-30 13:16:12 +00:00
example Add Make[backend] calls for creating GrContexts 2017-07-25 14:33:03 +00:00
experimental Add Make[backend] calls for creating GrContexts 2017-07-25 14:33:03 +00:00
fuzz Fuzz: use SkNullWStream 2017-08-29 17:41:36 +00:00
gm Rename methods and enum on SkClipStack::Element to indicate "device space" 2017-08-30 15:58:12 +00:00
gn ok, backtrace support on Android 2017-08-30 17:50:07 +00:00
include Remove kDefault_GrSurfaceOrigin 2017-08-30 11:30:32 +00:00
infra Threaded generation of software paths 2017-08-30 15:27:42 +00:00
platform_tools Enable ios on Raspberry Pi 2017-04-25 16:56:41 +00:00
resources Move lang to list in Android font manager. 2017-08-14 19:29:05 +00:00
samplecode simplify path validate 2017-08-29 18:37:11 +00:00
site fix param return descriptions 2017-08-30 13:16:12 +00:00
src Rename methods and enum on SkClipStack::Element to indicate "device space" 2017-08-30 15:58:12 +00:00
tests Rename methods and enum on SkClipStack::Element to indicate "device space" 2017-08-30 15:58:12 +00:00
third_party GIF: Use SkTArray instead of std::vector 2017-08-30 15:06:54 +00:00
tools ok, backtrace support on Android 2017-08-30 17:50:07 +00:00
.clang-format Mark flatennable macros as block beginning/ending in .clang-format 2017-01-09 15:31:36 +00:00
.gitignore clang on windows support 2017-07-31 18:39:23 +00:00
.gn Basic standalone GN configs. 2016-07-21 12:25:45 -07:00
AUTHORS Added support for building for tvOS 2017-03-14 22:55:04 +00:00
BUILD.gn Reland "skia: add heif decoding support" 2017-08-18 14:40:29 +00:00
codereview.settings Make uploading to Gerrit the default for Skia 2016-11-09 19:07:56 +00:00
CONTRIBUTING Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
CQ_COMMITTERS Moved committer list to chrome-infra-auth and deleted it from the repo 2015-09-02 13:37:54 -07:00
DEPS Roll skia/third_party/externals/angle2/ 7c2e6a96a..e8ef2bc4b (1 commit) 2017-08-30 10:27:12 +00:00
Doxyfile Make the housekeeper upload doxygen to a newer bucket 2016-10-04 13:23:57 -07:00
LICENSE BUG=skia:5602 2016-09-02 11:19:34 -07:00
PRESUBMIT.py Update CQ extra trybots after switch to Debian 2017-06-29 19:35:40 +00:00
public.bzl Revert "Revert "8-bit jumper on armv8"" 2017-08-29 17:04:47 +00:00
README Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
README.chromium Update README.chromium. 2015-06-11 13:19:24 -07:00
whitespace.txt Revert "Revert "Make GrAtlasTextOp a non-legacy GrMeshDrawOp"" 2017-07-19 12:17:34 +00:00

Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

See full details, and build instructions, at https://skia.org.