Lines Matching refs:frame

13 /* fp is 0 or stack frame */
15 #define frame r4
34 * We can treat the current frame's lr as the saved pc and the preceding
35 * frame's lr as the current frame's lr, but we can't trace the most recent
36 * call. Inserting a false stack frame allows us to reference the function
45 * Unfortunately due to the stack frame layout we can't dump r0 - r3, but these
48 * Stack frame layout:
51 * frame=> saved fp
54 * <top of stack frame>
69 * The frame for c_backtrace has pointers to the code of dump_stack. This is
70 * why the frame of c_backtrace is used to for the pc calculation of
71 * dump_stack. This is why we must move back a frame to print dump_stack.
73 * The stored locals for dump_stack are in dump_stack's frame. This means that
74 * to fully print dump_stack's frame we need both the frame for dump_stack (for
75 * locals) and the frame that was called by dump_stack (for pc).
79 * stack frame.
86 * c_backtrace frame dump_stack:
92 * dump_stack frame | ...
101 movs frame, r0 @ if frame pointer is zero
109 * Switches the current frame to be the frame for dump_stack.
111 add frame, sp, #24 @ switch to false frame
112 for_each_frame: tst frame, mask @ Check for address exceptions
116 * sv_fp is the stack frame with the locals for the current considered
119 * sv_pc is the saved lr frame the frame above. This is a pointer to a code
124 1001: ldr sv_pc, [frame, #4] @ get saved 'pc'
125 1002: ldr sv_fp, [frame, #0] @ get saved fp
127 teq sv_fp, mask @ make sure next frame exists
145 1003: ldr sv_lr, [sv_fp, #4] @ get saved lr from next frame
170 mov r2, frame
181 * continue as if there had been no registers stored in this frame.
186 ldr r0, [frame] @ locals are stored in
187 @ the preceding frame
193 * If we are out of frames or if the next frame is invalid.
198 cmp sv_fp, frame @ next frame must be
199 mov frame, sv_fp @ above the current frame
203 @ frame is below the previous frame, accept it as long as it
212 mov r2, frame
225 .Lbad: .asciz "%sBacktrace aborted due to bad frame pointer <%p>\n"