| 179 | #endif |
| 180 | |
| 181 | Execution::ResolvedFrame Execution::resolveOne(const Execution::Trace &trace, int index) |
| 182 | { |
| 183 | ResolvedFrame frame; |
| 184 | if (index >= trace.size()) |
| 185 | return frame; |
| 186 | |
| 187 | #ifdef USE_BACKWARD_CPP |
| 188 | auto &st = TracePrivate::get(trace); |
| 189 | resolver()->load_stacktrace(st); |
| 190 | frame = toResolvedFrame(resolver()->resolve(st[index]), st[index].addr); |
| 191 | |
| 192 | #elif defined(HAVE_BACKTRACE) |
| 193 | const auto &v = TracePrivate::get(trace); |
| 194 | char **strings = backtrace_symbols(v.data() + index, 1); |
| 195 | frame.name = maybeDemangleName(strings[0]); |
| 196 | free(strings); |
| 197 | |
| 198 | #else |
| 199 | Q_UNUSED(trace); |
| 200 | Q_UNUSED(index); |
| 201 | #endif |
| 202 | return frame; |
| 203 | } |
| 204 | |
| 205 | QVector<Execution::ResolvedFrame> Execution::resolveAll(const Execution::Trace &trace) |
| 206 | { |
nothing calls this directly
no test coverage detected