Renamed TRACY_NO_SYS_TRACE -> TRACY_NO_SYSTEM_TRACING to match the
build flag name. Unlike the meson logic, the CMake logic directly
maps the option name to the build flag that is injected. With the
mismatched name, the flag wasn't being properly applied.
Added TRACY_TIMER_FALLBACK option to expose the same-named flag.
Moved signal.h include to get sigaction definition that was missing when
TRACY_NO_CALLSTACK was defined.
Retrieval of the descriptor has to be performed in a single step. Finding out
what is missing and then downloading in bulk is not possible, as libbacktrace
caches the returned descriptors.
The code now performs a dry run of a dl_iterate_phdr call, storing the results
in a vector. Then, the original processing loop is issued, but outside of
dl_iterate_phdr.
For possible cause of problems see:
https://github.com/libunwind/libunwind/issues/16
Build identifiers stored in vectors are searched linearly. While not optimal,
this is enough for a basic implementation. In the future binary search option
may be explored, to see if it is worthwhile. Possible gains wouldn't be
significant, due to relatively small amount of debug info modules to handle.
Debug info descriptor requests that have not yet been checked for (i.e. not in
the s_di_known vector) are stored in the s_di_pending vector. When a check is
performed from within a libbacktrace callback handler, there are some unknown
problems with downloading data. Hence, the download process is delayed to be
performed at a later time. The debug info descriptors retrieval can be then
repeated.
Don't know exactly how to reproduce this. Nevertheless, the capture was
produced in an usual way. This may be dependant on the exact client
configuration.