| 421 | } |
| 422 | |
| 423 | void 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 | |
| 442 | void fiber::stackshow(const fiber& fb, size_t max /* = 50 */) |
| 443 | { |
nothing calls this directly
no test coverage detected