/** * Consumes (and frees) the lines produced by backtrace_symbols and puts these into the StackTrace fields */ static void ExtractSymbols(char** lines, StackTrace& stacktrace) { int l=0; auto fit = stacktrace.begin(); while (fit != stacktrace.end()) { LOG_L(L_DEBUG, "backtrace_symbols: %s", lines[l]); if (strncmp(lines[l], "[(nil)]", 20) != 0) { fit->symbol = lines[l]; fit++; } else { fit = stacktrace.erase(fit); } l++; } free(lines); }