Lines Matching refs:frame

73 	stack_frame frame;  in get_next_frame_no_debugger()  local
75 && is_kernel_stack_address(thread, bp + sizeof(frame) - 1)) { in get_next_frame_no_debugger()
76 memcpy(&frame, (void*)bp, sizeof(frame)); in get_next_frame_no_debugger()
78 || user_memcpy(&frame, (void*)bp, sizeof(frame)) != B_OK) { in get_next_frame_no_debugger()
82 *_ip = frame.return_address; in get_next_frame_no_debugger()
83 *_next = (addr_t)frame.previous; in get_next_frame_no_debugger()
94 stack_frame frame; in get_next_frame_debugger() local
95 if (debug_memcpy(B_CURRENT_TEAM, &frame, (void*)bp, sizeof(frame)) != B_OK) in get_next_frame_debugger()
98 *_ip = frame.return_address; in get_next_frame_debugger()
99 *_next = (addr_t)frame.previous; in get_next_frame_debugger()
426 print_iframe(iframe* frame) in print_iframe() argument
428 bool isUser = IFRAME_IS_USER(frame); in print_iframe()
431 kprintf("%s iframe at %p (end = %p)\n", isUser ? "user" : "kernel", frame, in print_iframe()
432 frame + 1); in print_iframe()
434 kprintf(" rax %#-18lx rbx %#-18lx rcx %#lx\n", frame->ax, in print_iframe()
435 frame->bx, frame->cx); in print_iframe()
436 kprintf(" rdx %#-18lx rsi %#-18lx rdi %#lx\n", frame->dx, in print_iframe()
437 frame->si, frame->di); in print_iframe()
438 kprintf(" rbp %#-18lx r8 %#-18lx r9 %#lx\n", frame->bp, in print_iframe()
439 frame->r8, frame->r9); in print_iframe()
440 kprintf(" r10 %#-18lx r11 %#-18lx r12 %#lx\n", frame->r10, in print_iframe()
441 frame->r11, frame->r12); in print_iframe()
442 kprintf(" r13 %#-18lx r14 %#-18lx r15 %#lx\n", frame->r13, in print_iframe()
443 frame->r14, frame->r15); in print_iframe()
444 kprintf(" rip %#-18lx rsp %#-18lx rflags %#lx\n", frame->ip, in print_iframe()
445 frame->sp, frame->flags); in print_iframe()
447 kprintf("%s iframe at %p (end = %p)\n", isUser ? "user" : "kernel", frame, in print_iframe()
448 isUser ? (void*)(frame + 1) : (void*)&frame->user_sp); in print_iframe()
451 frame->ax, frame->bx, frame->cx, frame->dx); in print_iframe()
453 frame->si, frame->di, frame->bp, frame->sp); in print_iframe()
454 kprintf(" eip %#-10x eflags %#-10x", frame->ip, frame->flags); in print_iframe()
457 kprintf("user esp %#x", frame->user_sp); in print_iframe()
463 (long unsigned int)frame->vector, in print_iframe()
464 (long unsigned int)frame->error_code); in print_iframe()
551 is_iframe(Thread* thread, addr_t frame) in is_iframe() argument
553 if (!is_kernel_stack_address(thread, frame)) in is_iframe()
556 addr_t previousFrame = *(addr_t*)frame; in is_iframe()
563 find_previous_iframe(Thread* thread, addr_t frame) in find_previous_iframe() argument
566 while (is_kernel_stack_address(thread, frame)) { in find_previous_iframe()
567 if (is_iframe(thread, frame)) in find_previous_iframe()
568 return (iframe*)frame; in find_previous_iframe()
570 frame = *(addr_t*)frame; in find_previous_iframe()
578 get_previous_iframe(Thread* thread, iframe* frame) in get_previous_iframe() argument
580 if (frame == NULL) in get_previous_iframe()
583 return find_previous_iframe(thread, frame->bp); in get_previous_iframe()
608 iframe* frame = get_current_iframe(debug_get_debugged_thread()); in find_debug_variable() local
609 if (frame == NULL) in find_debug_variable()
613 CHECK_DEBUG_VARIABLE("cs", frame->cs, false); in find_debug_variable()
614 CHECK_DEBUG_VARIABLE("ss", frame->ss, false); in find_debug_variable()
615 CHECK_DEBUG_VARIABLE("r15", frame->r15, true); in find_debug_variable()
616 CHECK_DEBUG_VARIABLE("r14", frame->r14, true); in find_debug_variable()
617 CHECK_DEBUG_VARIABLE("r13", frame->r13, true); in find_debug_variable()
618 CHECK_DEBUG_VARIABLE("r12", frame->r12, true); in find_debug_variable()
619 CHECK_DEBUG_VARIABLE("r11", frame->r11, true); in find_debug_variable()
620 CHECK_DEBUG_VARIABLE("r10", frame->r10, true); in find_debug_variable()
621 CHECK_DEBUG_VARIABLE("r9", frame->r9, true); in find_debug_variable()
622 CHECK_DEBUG_VARIABLE("r8", frame->r8, true); in find_debug_variable()
623 CHECK_DEBUG_VARIABLE("rbp", frame->bp, true); in find_debug_variable()
624 CHECK_DEBUG_VARIABLE("rsi", frame->si, true); in find_debug_variable()
625 CHECK_DEBUG_VARIABLE("rdi", frame->di, true); in find_debug_variable()
626 CHECK_DEBUG_VARIABLE("rdx", frame->dx, true); in find_debug_variable()
627 CHECK_DEBUG_VARIABLE("rcx", frame->cx, true); in find_debug_variable()
628 CHECK_DEBUG_VARIABLE("rbx", frame->bx, true); in find_debug_variable()
629 CHECK_DEBUG_VARIABLE("rax", frame->ax, true); in find_debug_variable()
630 CHECK_DEBUG_VARIABLE("rip", frame->ip, true); in find_debug_variable()
631 CHECK_DEBUG_VARIABLE("rflags", frame->flags, true); in find_debug_variable()
632 CHECK_DEBUG_VARIABLE("rsp", frame->sp, true); in find_debug_variable()
634 CHECK_DEBUG_VARIABLE("gs", frame->gs, false); in find_debug_variable()
635 CHECK_DEBUG_VARIABLE("fs", frame->fs, false); in find_debug_variable()
636 CHECK_DEBUG_VARIABLE("es", frame->es, false); in find_debug_variable()
637 CHECK_DEBUG_VARIABLE("ds", frame->ds, false); in find_debug_variable()
638 CHECK_DEBUG_VARIABLE("cs", frame->cs, false); in find_debug_variable()
639 CHECK_DEBUG_VARIABLE("edi", frame->di, true); in find_debug_variable()
640 CHECK_DEBUG_VARIABLE("esi", frame->si, true); in find_debug_variable()
641 CHECK_DEBUG_VARIABLE("ebp", frame->bp, true); in find_debug_variable()
642 CHECK_DEBUG_VARIABLE("esp", frame->sp, true); in find_debug_variable()
643 CHECK_DEBUG_VARIABLE("ebx", frame->bx, true); in find_debug_variable()
644 CHECK_DEBUG_VARIABLE("edx", frame->dx, true); in find_debug_variable()
645 CHECK_DEBUG_VARIABLE("ecx", frame->cx, true); in find_debug_variable()
646 CHECK_DEBUG_VARIABLE("eax", frame->ax, true); in find_debug_variable()
647 CHECK_DEBUG_VARIABLE("orig_eax", frame->orig_eax, true); in find_debug_variable()
648 CHECK_DEBUG_VARIABLE("orig_edx", frame->orig_edx, true); in find_debug_variable()
649 CHECK_DEBUG_VARIABLE("eip", frame->ip, true); in find_debug_variable()
650 CHECK_DEBUG_VARIABLE("eflags", frame->flags, true); in find_debug_variable()
652 if (IFRAME_IS_USER(frame)) { in find_debug_variable()
653 CHECK_DEBUG_VARIABLE("user_esp", frame->user_sp, true); in find_debug_variable()
654 CHECK_DEBUG_VARIABLE("user_ss", frame->user_ss, false); in find_debug_variable()
720 iframe* frame = (iframe*)bp; in stack_trace() local
722 print_iframe(frame); in stack_trace()
723 print_stack_frame(thread, frame->ip, bp, frame->bp, callIndex, in stack_trace()
726 bp = frame->bp; in stack_trace()
884 struct iframe *frame = (struct iframe *)ebp; in show_call() local
887 print_call(thread, frame->ip, ebp, frame->bp, argCount); in show_call()
889 ebp = frame->bp; in show_call()
957 iframe* frame = find_previous_iframe(thread, x86_get_stack_frame()); in dump_iframes() local
958 while (frame != NULL) { in dump_iframes()
959 print_iframe(frame); in dump_iframes()
960 frame = get_previous_iframe(thread, frame); in dump_iframes()
1051 stack_frame* frame = (stack_frame*)x86_get_stack_frame(); in arch_debug_save_registers() local
1052 registers->bp = (addr_t)frame->previous; in arch_debug_save_registers()
1093 iframe* frame = (iframe*)bp; in arch_debug_contains_call() local
1095 if (is_calling(thread, frame->ip, symbol, start, end)) in arch_debug_contains_call()
1098 bp = frame->bp; in arch_debug_contains_call()
1147 iframe* frame = x86_get_user_iframe(); in arch_debug_get_stack_trace() local
1148 if (frame == NULL) in arch_debug_get_stack_trace()
1151 bp = (addr_t)frame; in arch_debug_get_stack_trace()
1164 iframe* frame = (iframe*)bp; in arch_debug_get_stack_trace() local
1165 ip = frame->ip; in arch_debug_get_stack_trace()
1166 nextBp = frame->bp; in arch_debug_get_stack_trace()
1203 iframe* frame = get_current_iframe(debug_get_debugged_thread()); in arch_debug_get_interrupt_pc() local
1204 if (frame == NULL) in arch_debug_get_interrupt_pc()
1208 *_isSyscall = frame->type == IFRAME_TYPE_SYSCALL; in arch_debug_get_interrupt_pc()
1210 return (void*)(addr_t)frame->ip; in arch_debug_get_interrupt_pc()
1287 iframe* frame = get_current_iframe(debug_get_debugged_thread()); in arch_debug_gdb_get_registers() local
1288 if (frame == NULL) in arch_debug_gdb_get_registers()
1303 { B_UINT64_TYPE, frame->ax }, { B_UINT64_TYPE, frame->bx }, in arch_debug_gdb_get_registers()
1304 { B_UINT64_TYPE, frame->cx }, { B_UINT64_TYPE, frame->dx }, in arch_debug_gdb_get_registers()
1305 { B_UINT64_TYPE, frame->si }, { B_UINT64_TYPE, frame->di }, in arch_debug_gdb_get_registers()
1306 { B_UINT64_TYPE, frame->bp }, { B_UINT64_TYPE, frame->sp }, in arch_debug_gdb_get_registers()
1307 { B_UINT64_TYPE, frame->r8 }, { B_UINT64_TYPE, frame->r9 }, in arch_debug_gdb_get_registers()
1308 { B_UINT64_TYPE, frame->r10 }, { B_UINT64_TYPE, frame->r11 }, in arch_debug_gdb_get_registers()
1309 { B_UINT64_TYPE, frame->r12 }, { B_UINT64_TYPE, frame->r13 }, in arch_debug_gdb_get_registers()
1310 { B_UINT64_TYPE, frame->r14 }, { B_UINT64_TYPE, frame->r15 }, in arch_debug_gdb_get_registers()
1311 { B_UINT64_TYPE, frame->ip }, { B_UINT32_TYPE, frame->flags }, in arch_debug_gdb_get_registers()
1312 { B_UINT32_TYPE, frame->cs }, { B_UINT32_TYPE, frame->ss }, in arch_debug_gdb_get_registers()
1328 { B_UINT32_TYPE, frame->ax }, { B_UINT32_TYPE, frame->cx }, in arch_debug_gdb_get_registers()
1329 { B_UINT32_TYPE, frame->dx }, { B_UINT32_TYPE, frame->bx }, in arch_debug_gdb_get_registers()
1330 { B_UINT32_TYPE, frame->sp }, { B_UINT32_TYPE, frame->bp }, in arch_debug_gdb_get_registers()
1331 { B_UINT32_TYPE, frame->si }, { B_UINT32_TYPE, frame->di }, in arch_debug_gdb_get_registers()
1332 { B_UINT32_TYPE, frame->ip }, { B_UINT32_TYPE, frame->flags }, in arch_debug_gdb_get_registers()
1333 { B_UINT32_TYPE, frame->cs }, { B_UINT32_TYPE, frame->ds }, in arch_debug_gdb_get_registers()
1335 { B_UINT32_TYPE, frame->ds }, { B_UINT32_TYPE, frame->es }, in arch_debug_gdb_get_registers()
1336 { B_UINT32_TYPE, frame->fs }, { B_UINT32_TYPE, frame->gs }, in arch_debug_gdb_get_registers()