Lines Matching refs:state

15 #define for_each_user_frame(state) \  argument
16 for (unwind_user_start(state); !(state)->done; unwind_user_next(state))
18 static int unwind_user_next_fp(struct unwind_user_state *state) in unwind_user_next_fp() argument
25 if (state->fp < state->sp) in unwind_user_next_fp()
27 cfa = state->fp; in unwind_user_next_fp()
29 cfa = state->sp; in unwind_user_next_fp()
36 if (cfa <= state->sp) in unwind_user_next_fp()
51 state->ip = ra; in unwind_user_next_fp()
52 state->sp = cfa; in unwind_user_next_fp()
54 state->fp = fp; in unwind_user_next_fp()
58 static int unwind_user_next(struct unwind_user_state *state) in unwind_user_next() argument
60 unsigned long iter_mask = state->available_types; in unwind_user_next()
63 if (state->done) in unwind_user_next()
69 state->current_type = type; in unwind_user_next()
72 if (!unwind_user_next_fp(state)) in unwind_user_next()
83 state->current_type = UNWIND_USER_TYPE_NONE; in unwind_user_next()
84 state->done = true; in unwind_user_next()
88 static int unwind_user_start(struct unwind_user_state *state) in unwind_user_start() argument
92 memset(state, 0, sizeof(*state)); in unwind_user_start()
95 state->done = true; in unwind_user_start()
100 state->available_types |= UNWIND_USER_TYPE_FP; in unwind_user_start()
102 state->ip = instruction_pointer(regs); in unwind_user_start()
103 state->sp = user_stack_pointer(regs); in unwind_user_start()
104 state->fp = frame_pointer(regs); in unwind_user_start()
111 struct unwind_user_state state; in unwind_user() local
121 for_each_user_frame(&state) { in unwind_user()
122 trace->entries[trace->nr++] = state.ip; in unwind_user()