MCPcopy Create free account
hub / github.com/acl-dev/acl / stacktrace

Method stacktrace

lib_fiber/cpp/src/fiber.cpp:423–440  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

421}
422
423void fiber::stacktrace(const fiber& fb, std::vector<fiber_frame>& out, size_t max)
424{
425 ACL_FIBER *f = fb.get_fiber();
426 ACL_FIBER_STACK *stack = acl_fiber_stacktrace(f, max);
427 if (stack == NULL) {
428 return;
429 }
430
431 for (size_t i = 0; i < stack->count; i++) {
432 fiber_frame frame;
433 frame.func = stack->frames[i].func;
434 frame.pc = stack->frames[i].pc;
435 frame.off = stack->frames[i].off;
436 out.push_back(frame);
437 }
438
439 acl_fiber_stackfree(stack);
440}
441
442void fiber::stackshow(const fiber& fb, size_t max /* = 50 */)
443{

Callers

nothing calls this directly

Calls 4

get_fiberMethod · 0.80
acl_fiber_stacktraceFunction · 0.50
acl_fiber_stackfreeFunction · 0.50
push_backMethod · 0.45

Tested by

no test coverage detected