aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/CrashHandler.h
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2014-06-18 11:44:15 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-06-18 11:44:18 -0700
commit30e6e2af14e84216b1c113fd7500d0822bc81daa (patch)
tree16243d88ccd219ee59df299ad1304c2f566e1051 /tools/CrashHandler.h
parentf01a6c3663970ccd6e1882e76a887e0fda467b77 (diff)
Add basic stacktrace handler using libunwind.
This means we will all have to apt-get install libunwind8-dev on Linux. Mac comes with everything we need already. BUG=skia: R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/343583005
Diffstat (limited to 'tools/CrashHandler.h')
-rw-r--r--tools/CrashHandler.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/CrashHandler.h b/tools/CrashHandler.h
new file mode 100644
index 0000000000..6c22c8ee70
--- /dev/null
+++ b/tools/CrashHandler.h
@@ -0,0 +1,9 @@
+#ifndef CrashHandler_DEFINED
+#define CrashHandler_DEFINED
+
+// If possible (and not already done) register a handler for a stack trace when we crash.
+// Currently this works on Linux and Mac, hopefully Windows soon.
+// On Linux, you will get much better results than we can deliver by running "catchsegv <program>".
+void SetupCrashHandler();
+
+#endif//CrashHandler_DEFINED