MCPcopy Create free account
hub / github.com/boostorg/stacktrace / source_line

Method source_line

include/boost/stacktrace/detail/libbacktrace_impls.hpp:223–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

221}
222
223std::size_t frame::source_line() const {
224 if (!addr_) {
225 return 0;
226 }
227
228 boost::stacktrace::detail::program_location prog_location;
229 ::backtrace_state* state = boost::stacktrace::detail::construct_state(prog_location);
230
231 boost::stacktrace::detail::pc_data data = {0, 0, 0};
232 if (state) {
233 ::backtrace_pcinfo(
234 state,
235 reinterpret_cast<uintptr_t>(addr_),
236 boost::stacktrace::detail::libbacktrace_full_callback,
237 boost::stacktrace::detail::libbacktrace_error_callback,
238 &data
239 );
240 }
241
242 return data.line;
243}
244
245
246}} // namespace boost::stacktrace

Callers

nothing calls this directly

Calls 1

construct_stateFunction · 0.85

Tested by

no test coverage detected