folly: symbolizer: small terse write fix + colorize signal handler output if printing...
authorLucian Grijincu <lucian@fb.com>
Tue, 14 Jan 2014 23:38:21 +0000 (15:38 -0800)
committerJordan DeLong <jdelong@fb.com>
Thu, 16 Jan 2014 19:21:37 +0000 (11:21 -0800)
commitf41fd6f718fb39b617bbdbc6af0e34f3eae5e381
tree88c5c7a8380c0466ac1525e6759a750e36779f40
parent29d4c417a8a05c743d3a89310ebc1cbb2dfa0cfd
folly: symbolizer: small terse write fix + colorize signal handler output if printing to TTY

Summary:
Detailed output is a bit hard to parse visually. Add some colors for
clarity (clownyness?). Enabled only when printing stack traces from a
signal-handler to TTY.

Also:
- terse output printed empty lines if it could not find a symbol for an address; fixed by printing "(unknown)".
- added a dummy ##Crash## program to test colorization easily

Test Plan: n/a

Reviewed By: tudorb@fb.com

FB internal diff: D1128303
folly/experimental/exception_tracer/ExceptionTracer.cpp
folly/experimental/symbolizer/SignalHandler.cpp
folly/experimental/symbolizer/Symbolizer.cpp
folly/experimental/symbolizer/Symbolizer.h
folly/experimental/symbolizer/test/Crash.cpp [new file with mode: 0644]