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

Function name

include/boost/stacktrace/detail/addr2line_impls.hpp:209–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207typedef to_string_impl_base<to_string_using_addr2line> to_string_impl;
208
209inline std::string name(const void* addr, bool position_independent) {
210 uintptr_t addr_base = 0;
211 if(position_independent){
212 addr_base = boost::stacktrace::detail::get_own_proc_addr_base(addr);
213 }
214 const void* offset = reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(addr) - addr_base);
215 std::string res = boost::stacktrace::detail::addr2line("-fe", offset);
216 res = res.substr(0, res.find_last_of('\n'));
217 res = boost::core::demangle(res.c_str());
218
219 if (res == "??") {
220 res.clear();
221 }
222
223 return res;
224}
225
226inline std::string name_impl(const void* addr) {
227 std::string res = boost::stacktrace::detail::name(addr, false);

Callers 2

frameClass · 0.85
name_implFunction · 0.85

Calls 2

addr2lineFunction · 0.85
get_own_proc_addr_baseFunction · 0.70

Tested by

no test coverage detected