The sanitizer symbolizers support printing the function offset
(difference between pc and function start) of a stackframe using the
%q format specifier.
Unfortunately this didn't actually work because neither the atos
or dladdr symbolizer set the AddressInfo::function_offset field.
This patch teaches both symbolizers to try to compute the function
offset. In the case of the atos symbolizer, atos might not report the
function offset (e.g. it reports a source location instead) so in this
case it fallsback to using dladdr() to compute the function offset.
Two test cases are included.
rdar://problem/56695185
If we fail to dladdr, stack->info.function_offset will not be assigned.
What is the initial value? garbage? 0x0, or kUnknown = ~(uptr)0?
What do we want here? I think 0x0 would be a good choice.
Would it be possible to construct a test case for this code path to pin down the behavior?