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

Function unwindCallback

Fleece/Support/Backtrace.cc:58–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56 };
57
58 static _Unwind_Reason_Code unwindCallback(struct _Unwind_Context* context, void* arg) {
59 BacktraceState* state = static_cast<BacktraceState*>(arg);
60 uintptr_t pc = _Unwind_GetIP(context);
61 if (pc) {
62 if (state->current == state->end) {
63 return _URC_END_OF_STACK;
64 } else {
65 *state->current++ = reinterpret_cast<void*>(pc);
66 }
67 }
68 return _URC_NO_REASON;
69 }
70
71 static int backtrace(void** buffer, size_t max) {
72 BacktraceState state = {buffer, buffer + max};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected