MCPcopy Create free account
hub / github.com/F-Stack/f-stack / unwind_stack_one

Function unwind_stack_one

freebsd/arm/arm/unwind.c:547–575  ·  view source on GitHub ↗

* Unwind a single stack frame. * Return 0 on success or 1 if the stack cannot be unwound any further. * * XXX The can_lock argument is no longer germane; a sweep of callers should be * made to remove it after this new code has proven itself for a while. */

Source from the content-addressed store, hash-verified

545 * made to remove it after this new code has proven itself for a while.
546 */
547int
548unwind_stack_one(struct unwind_state *state, int can_lock __unused)
549{
550 struct unwind_idx *index;
551
552 /* Reset the mask of updated registers */
553 state->update_mask = 0;
554
555 /* The pc value is correct and will be overwritten, save it */
556 state->start_pc = state->registers[PC];
557
558 /* Find the item to run */
559 index = find_index(state->start_pc);
560 if (index == NULL || index->insn == EXIDX_CANTUNWIND)
561 return 1;
562
563 if (index->insn & (1U << 31)) {
564 /* The data is within the instruction */
565 state->insn = &index->insn;
566 } else {
567 /* A prel31 offset to the unwind table */
568 state->insn = (uint32_t *)
569 ((uintptr_t)&index->insn +
570 expand_prel31(index->insn));
571 }
572
573 /* Run the unwind function, return its finished/not-finished status. */
574 return (unwind_tab(state));
575}

Callers 2

db_stack_trace_cmdFunction · 0.85
stack_captureFunction · 0.85

Calls 3

find_indexFunction · 0.85
expand_prel31Function · 0.85
unwind_tabFunction · 0.85

Tested by

no test coverage detected