Lines Matching refs:frame
41 iframe_is_user(iframe* frame) in iframe_is_user() argument
43 return SstatusReg{.val = frame->status}.spp == modeU; in iframe_is_user()
103 stack_frame frame; in get_next_frame_no_debugger() local
106 memcpy(&frame, (stack_frame*)fp - 1, sizeof(frame)); in get_next_frame_no_debugger()
108 || user_memcpy(&frame, (stack_frame*)fp - 1, sizeof(frame)) != B_OK) { in get_next_frame_no_debugger()
112 *_pc = frame.return_address; in get_next_frame_no_debugger()
113 *_next = frame.previous; in get_next_frame_no_debugger()
124 stack_frame frame; in get_next_frame_debugger() local
125 if (debug_memcpy(B_CURRENT_TEAM, &frame, (stack_frame*)fp - 1, sizeof(frame)) != B_OK) in get_next_frame_debugger()
128 *_pc = frame.return_address; in get_next_frame_debugger()
129 *_next = frame.previous; in get_next_frame_debugger()
391 print_iframe(iframe* frame) in print_iframe() argument
393 bool isUser = iframe_is_user(frame); in print_iframe()
395 kprintf("%s iframe at %p (end = %p)\n", isUser ? "user" : "kernel", frame, in print_iframe()
396 frame + 1); in print_iframe()
398 uint64* regs = &frame->ra; in print_iframe()
413 write_sstatus(frame->status); in print_iframe()
415 write_cause(frame->cause); in print_iframe()
416 kprintf(", tval: %#" B_PRIx64 "\n", frame->tval); in print_iframe()
506 is_iframe(Thread* thread, addr_t frame) in is_iframe() argument
508 if (!is_kernel_stack_address(thread, frame)) in is_iframe()
511 addr_t pc = ((stack_frame*)frame - 1)->return_address; in is_iframe()
517 find_previous_iframe(Thread* thread, addr_t frame) in find_previous_iframe() argument
520 while (is_kernel_stack_address(thread, frame)) { in find_previous_iframe()
521 if (is_iframe(thread, frame)) in find_previous_iframe()
522 return (iframe*)frame; in find_previous_iframe()
524 frame = ((stack_frame*)frame - 1)->previous; in find_previous_iframe()
532 get_previous_iframe(Thread* thread, iframe* frame) in get_previous_iframe() argument
534 if (frame == NULL) in get_previous_iframe()
537 return find_previous_iframe(thread, frame->fp); in get_previous_iframe()
569 iframe* frame = get_current_iframe(debug_get_debugged_thread()); in find_debug_variable() local
570 if (frame == NULL) in find_debug_variable()
573 CHECK_DEBUG_VARIABLE("status", frame->status, true); in find_debug_variable()
574 CHECK_DEBUG_VARIABLE("cause", frame->cause, true); in find_debug_variable()
575 CHECK_DEBUG_VARIABLE("tval", frame->tval, true); in find_debug_variable()
577 CHECK_DEBUG_VARIABLE("ra", frame->ra, true); in find_debug_variable()
578 CHECK_DEBUG_VARIABLE("t6", frame->t6, true); in find_debug_variable()
579 CHECK_DEBUG_VARIABLE("sp", frame->sp, true); in find_debug_variable()
580 CHECK_DEBUG_VARIABLE("gp", frame->gp, true); in find_debug_variable()
581 CHECK_DEBUG_VARIABLE("tp", frame->tp, true); in find_debug_variable()
582 CHECK_DEBUG_VARIABLE("t0", frame->t0, true); in find_debug_variable()
583 CHECK_DEBUG_VARIABLE("t1", frame->t1, true); in find_debug_variable()
584 CHECK_DEBUG_VARIABLE("t2", frame->t2, true); in find_debug_variable()
585 CHECK_DEBUG_VARIABLE("t5", frame->t5, true); in find_debug_variable()
586 CHECK_DEBUG_VARIABLE("s1", frame->s1, true); in find_debug_variable()
587 CHECK_DEBUG_VARIABLE("a0", frame->a0, true); in find_debug_variable()
588 CHECK_DEBUG_VARIABLE("a1", frame->a1, true); in find_debug_variable()
589 CHECK_DEBUG_VARIABLE("a2", frame->a2, true); in find_debug_variable()
590 CHECK_DEBUG_VARIABLE("a3", frame->a3, true); in find_debug_variable()
591 CHECK_DEBUG_VARIABLE("a4", frame->a4, true); in find_debug_variable()
592 CHECK_DEBUG_VARIABLE("a5", frame->a5, true); in find_debug_variable()
593 CHECK_DEBUG_VARIABLE("a6", frame->a6, true); in find_debug_variable()
594 CHECK_DEBUG_VARIABLE("a7", frame->a7, true); in find_debug_variable()
595 CHECK_DEBUG_VARIABLE("s2", frame->s2, true); in find_debug_variable()
596 CHECK_DEBUG_VARIABLE("s3", frame->s3, true); in find_debug_variable()
597 CHECK_DEBUG_VARIABLE("s4", frame->s4, true); in find_debug_variable()
598 CHECK_DEBUG_VARIABLE("s5", frame->s5, true); in find_debug_variable()
599 CHECK_DEBUG_VARIABLE("s6", frame->s6, true); in find_debug_variable()
600 CHECK_DEBUG_VARIABLE("s7", frame->s7, true); in find_debug_variable()
601 CHECK_DEBUG_VARIABLE("s8", frame->s8, true); in find_debug_variable()
602 CHECK_DEBUG_VARIABLE("s9", frame->s9, true); in find_debug_variable()
603 CHECK_DEBUG_VARIABLE("s10", frame->s10, true); in find_debug_variable()
604 CHECK_DEBUG_VARIABLE("s11", frame->s11, true); in find_debug_variable()
605 CHECK_DEBUG_VARIABLE("t3", frame->t3, true); in find_debug_variable()
606 CHECK_DEBUG_VARIABLE("t4", frame->t4, true); in find_debug_variable()
607 CHECK_DEBUG_VARIABLE("fp", frame->fp, true); in find_debug_variable()
608 CHECK_DEBUG_VARIABLE("epc", frame->epc, true); in find_debug_variable()
672 iframe* frame = (iframe*)fp; in stack_trace() local
674 print_iframe(frame); in stack_trace()
675 print_stack_frame(thread, frame->epc, fp, frame->fp, callIndex, in stack_trace()
678 fp = frame->fp; in stack_trace()
748 iframe* frame = find_previous_iframe(thread, Fp()); in dump_iframes() local
749 while (frame != NULL) { in dump_iframes()
750 print_iframe(frame); in dump_iframes()
751 frame = get_previous_iframe(thread, frame); in dump_iframes()
863 stack_frame* frame = (stack_frame*)Fp() - 1; in arch_debug_save_registers() local
864 registers->fp = (addr_t)frame->previous; in arch_debug_save_registers()
905 iframe* frame = (iframe*)fp; in arch_debug_contains_call() local
907 if (is_calling(thread, frame->epc, symbol, start, end)) in arch_debug_contains_call()
910 fp = frame->fp; in arch_debug_contains_call()
959 iframe* frame = get_user_iframe(); in arch_debug_get_stack_trace() local
960 if (frame == NULL) in arch_debug_get_stack_trace()
963 fp = (addr_t)frame; in arch_debug_get_stack_trace()
976 iframe* frame = (iframe*)fp; in arch_debug_get_stack_trace() local
977 pc = frame->epc; in arch_debug_get_stack_trace()
978 nextFp = frame->fp; in arch_debug_get_stack_trace()
1015 iframe* frame = get_current_iframe(debug_get_debugged_thread()); in arch_debug_get_interrupt_pc() local
1016 if (frame == NULL) in arch_debug_get_interrupt_pc()
1020 *_isSyscall = frame->cause == causeUEcall; in arch_debug_get_interrupt_pc()
1022 return (void*)(addr_t)frame->epc; in arch_debug_get_interrupt_pc()
1086 iframe* frame = get_current_iframe(debug_get_debugged_thread()); in arch_debug_gdb_get_registers() local
1087 if (frame == NULL) in arch_debug_gdb_get_registers()
1093 frame->ra, in arch_debug_gdb_get_registers()
1094 frame->sp, in arch_debug_gdb_get_registers()
1095 frame->gp, in arch_debug_gdb_get_registers()
1096 frame->tp, in arch_debug_gdb_get_registers()
1097 frame->t0, in arch_debug_gdb_get_registers()
1098 frame->t1, in arch_debug_gdb_get_registers()
1099 frame->t2, in arch_debug_gdb_get_registers()
1100 frame->fp, in arch_debug_gdb_get_registers()
1101 frame->s1, in arch_debug_gdb_get_registers()
1102 frame->a0, in arch_debug_gdb_get_registers()
1103 frame->a1, in arch_debug_gdb_get_registers()
1104 frame->a2, in arch_debug_gdb_get_registers()
1105 frame->a3, in arch_debug_gdb_get_registers()
1106 frame->a4, in arch_debug_gdb_get_registers()
1107 frame->a5, in arch_debug_gdb_get_registers()
1108 frame->a6, in arch_debug_gdb_get_registers()
1109 frame->a7, in arch_debug_gdb_get_registers()
1110 frame->s2, in arch_debug_gdb_get_registers()
1111 frame->s3, in arch_debug_gdb_get_registers()
1112 frame->s4, in arch_debug_gdb_get_registers()
1113 frame->s5, in arch_debug_gdb_get_registers()
1114 frame->s6, in arch_debug_gdb_get_registers()
1115 frame->s7, in arch_debug_gdb_get_registers()
1116 frame->s8, in arch_debug_gdb_get_registers()
1117 frame->s9, in arch_debug_gdb_get_registers()
1118 frame->s10, in arch_debug_gdb_get_registers()
1119 frame->s11, in arch_debug_gdb_get_registers()
1120 frame->t3, in arch_debug_gdb_get_registers()
1121 frame->t4, in arch_debug_gdb_get_registers()
1122 frame->t5, in arch_debug_gdb_get_registers()
1123 frame->t6, in arch_debug_gdb_get_registers()
1124 frame->epc in arch_debug_gdb_get_registers()