Lines Matching refs:frame
79 get_iframe_registers(const iframe* frame, debug_cpu_state* cpuState) in get_iframe_registers() argument
82 cpuState->r15 = frame->r15; in get_iframe_registers()
83 cpuState->r14 = frame->r14; in get_iframe_registers()
84 cpuState->r13 = frame->r13; in get_iframe_registers()
85 cpuState->r12 = frame->r12; in get_iframe_registers()
86 cpuState->r11 = frame->r11; in get_iframe_registers()
87 cpuState->r10 = frame->r10; in get_iframe_registers()
88 cpuState->r9 = frame->r9; in get_iframe_registers()
89 cpuState->r8 = frame->r8; in get_iframe_registers()
90 cpuState->rbp = frame->bp; in get_iframe_registers()
91 cpuState->rsi = frame->si; in get_iframe_registers()
92 cpuState->rdi = frame->di; in get_iframe_registers()
93 cpuState->rdx = frame->dx; in get_iframe_registers()
94 cpuState->rcx = frame->cx; in get_iframe_registers()
95 cpuState->rbx = frame->bx; in get_iframe_registers()
96 cpuState->rax = frame->ax; in get_iframe_registers()
97 cpuState->vector = frame->vector; in get_iframe_registers()
98 cpuState->error_code = frame->error_code; in get_iframe_registers()
99 cpuState->rip = frame->ip; in get_iframe_registers()
100 cpuState->cs = frame->cs; in get_iframe_registers()
101 cpuState->rflags = frame->flags; in get_iframe_registers()
102 cpuState->rsp = frame->sp; in get_iframe_registers()
103 cpuState->ss = frame->ss; in get_iframe_registers()
120 set_iframe_registers(iframe* frame, const debug_cpu_state* cpuState) in set_iframe_registers() argument
122 frame->r15 = cpuState->r15; in set_iframe_registers()
123 frame->r14 = cpuState->r14; in set_iframe_registers()
124 frame->r13 = cpuState->r13; in set_iframe_registers()
125 frame->r12 = cpuState->r12; in set_iframe_registers()
126 frame->r11 = cpuState->r11; in set_iframe_registers()
127 frame->r10 = cpuState->r10; in set_iframe_registers()
128 frame->r9 = cpuState->r9; in set_iframe_registers()
129 frame->r8 = cpuState->r8; in set_iframe_registers()
130 frame->bp = cpuState->rbp; in set_iframe_registers()
131 frame->si = cpuState->rsi; in set_iframe_registers()
132 frame->di = cpuState->rdi; in set_iframe_registers()
133 frame->dx = cpuState->rdx; in set_iframe_registers()
134 frame->cx = cpuState->rcx; in set_iframe_registers()
135 frame->bx = cpuState->rbx; in set_iframe_registers()
136 frame->ax = cpuState->rax; in set_iframe_registers()
137 frame->ip = cpuState->rip; in set_iframe_registers()
138 frame->flags = (frame->flags & ~X86_EFLAGS_USER_SETTABLE_FLAGS) in set_iframe_registers()
140 frame->sp = cpuState->rsp; in set_iframe_registers()
148 get_iframe_registers(const iframe* frame, debug_cpu_state* cpuState) in get_iframe_registers() argument
150 cpuState->gs = frame->gs; in get_iframe_registers()
151 cpuState->fs = frame->fs; in get_iframe_registers()
152 cpuState->es = frame->es; in get_iframe_registers()
153 cpuState->ds = frame->ds; in get_iframe_registers()
154 cpuState->edi = frame->di; in get_iframe_registers()
155 cpuState->esi = frame->si; in get_iframe_registers()
156 cpuState->ebp = frame->bp; in get_iframe_registers()
157 cpuState->esp = frame->sp; in get_iframe_registers()
158 cpuState->ebx = frame->bx; in get_iframe_registers()
159 cpuState->edx = frame->orig_edx; in get_iframe_registers()
160 cpuState->ecx = frame->cx; in get_iframe_registers()
161 cpuState->eax = frame->orig_eax; in get_iframe_registers()
162 cpuState->vector = frame->vector; in get_iframe_registers()
163 cpuState->error_code = frame->error_code; in get_iframe_registers()
164 cpuState->eip = frame->ip; in get_iframe_registers()
165 cpuState->cs = frame->cs; in get_iframe_registers()
166 cpuState->eflags = frame->flags; in get_iframe_registers()
167 cpuState->user_esp = frame->user_sp; in get_iframe_registers()
168 cpuState->user_ss = frame->user_ss; in get_iframe_registers()
173 set_iframe_registers(iframe* frame, const debug_cpu_state* cpuState) in set_iframe_registers() argument
179 frame->di = cpuState->edi; in set_iframe_registers()
180 frame->si = cpuState->esi; in set_iframe_registers()
181 frame->bp = cpuState->ebp; in set_iframe_registers()
183 frame->bx = cpuState->ebx; in set_iframe_registers()
184 frame->dx = cpuState->edx; in set_iframe_registers()
185 frame->cx = cpuState->ecx; in set_iframe_registers()
186 frame->ax = cpuState->eax; in set_iframe_registers()
189 frame->ip = cpuState->eip; in set_iframe_registers()
191 frame->flags = (frame->flags & ~X86_EFLAGS_USER_SETTABLE_FLAGS) in set_iframe_registers()
193 frame->user_sp = cpuState->user_esp; in set_iframe_registers()
202 get_cpu_state(Thread* thread, iframe* frame, debug_cpu_state* cpuState) in get_cpu_state() argument
210 if (frame->fpu != nullptr) { in get_cpu_state()
215 memcpy(&cpuState->extended_registers, frame->fpu, in get_cpu_state()
219 memcpy(&cpuState->extended_registers, frame->fpu, in get_cpu_state()
251 get_iframe_registers(frame, cpuState); in get_cpu_state()
678 iframe* frame = x86_get_current_iframe(); in debugger_single_step() local
679 if (frame == NULL) { in debugger_single_step()
684 frame->flags |= (1 << X86_EFLAGS_TF); in debugger_single_step()
730 if (iframe* frame = x86_get_user_iframe()) { in arch_update_thread_single_step() local
736 frame->flags |= (1 << X86_EFLAGS_TF); in arch_update_thread_single_step()
738 frame->flags &= ~(1 << X86_EFLAGS_TF); in arch_update_thread_single_step()
746 if (iframe* frame = x86_get_user_iframe()) { in arch_set_debug_cpu_state() local
753 frame->fpu = &thread->arch_info.fpu_state; in arch_set_debug_cpu_state()
770 set_iframe_registers(frame, cpuState); in arch_set_debug_cpu_state()
778 if (iframe* frame = x86_get_user_iframe()) in arch_get_debug_cpu_state() local
779 get_cpu_state(thread_get_current_thread(), frame, cpuState); in arch_get_debug_cpu_state()
794 iframe* frame = x86_get_thread_user_iframe(thread); in arch_get_thread_debug_cpu_state() local
795 if (frame == NULL) in arch_get_thread_debug_cpu_state()
798 get_cpu_state(thread, frame, cpuState); in arch_get_thread_debug_cpu_state()
920 x86_init_user_debug_at_kernel_exit(iframe* frame) in x86_init_user_debug_at_kernel_exit() argument
982 x86_handle_debug_exception(iframe* frame) in x86_handle_debug_exception() argument
993 if (IFRAME_IS_USER(frame)) { in x86_handle_debug_exception()
1017 if (IFRAME_IS_USER(frame)) { in x86_handle_debug_exception()
1033 if (IFRAME_IS_USER(frame)) { in x86_handle_debug_exception()
1043 if (IFRAME_IS_USER(frame)) { in x86_handle_debug_exception()
1051 frame->flags &= ~(1 << X86_EFLAGS_TF); in x86_handle_debug_exception()
1096 if (IFRAME_IS_USER(frame)) { in x86_handle_debug_exception()
1104 if (IFRAME_IS_USER(frame)) { in x86_handle_debug_exception()
1121 x86_handle_breakpoint_exception(iframe* frame) in x86_handle_breakpoint_exception() argument
1126 frame->ip--; in x86_handle_breakpoint_exception()
1128 if (!IFRAME_IS_USER(frame)) { in x86_handle_breakpoint_exception()