MCPcopy Create free account
hub / github.com/couchbase/fleece / getFrame

Method getFrame

Fleece/Support/Backtrace.cc:93–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91
92
93 Backtrace::frameInfo Backtrace::getFrame(unsigned i) const {
94 precondition(i < _addrs.size());
95 frameInfo frame = { };
96 Dl_info info;
97 if (dladdr(_addrs[i], &info)) {
98 frame.pc = _addrs[i];
99 frame.offset = (size_t)frame.pc - (size_t)info.dli_saddr;
100 frame.function = info.dli_sname;
101 frame.library = info.dli_fname;
102 const char *slash = strrchr(frame.library, '/');
103 if (slash)
104 frame.library = slash + 1;
105 }
106 return frame;
107 }
108
109
110 // If any of these strings occur in a backtrace, suppress further frames.

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected