code_t caml_next_frame_pointer(value* stack_high, value ** sp, intnat * trap_spoff) { while (*sp < stack_high) { value* p = (*sp)++; if(&Trap_pc(stack_high + *trap_spoff) == p) { *trap_spoff = Trap_link(stack_high + *trap_spoff); continue; } if (Is_long(*p) && find_debug_info(Pc_val(*p)) != NULL) return Pc_val(*p); } return NULL; }
code_t caml_next_frame_pointer(value ** sp, intnat * trap_spoff) { code_t end_code = (code_t) ((char *) caml_start_code + caml_code_size); while (*sp < caml_stack_high) { value *p = (*sp)++; if(&Trap_pc(caml_stack_high + *trap_spoff) == p) { *trap_spoff = Trap_link(caml_stack_high + *trap_spoff); continue; } if (Is_long(*p) && Pc_val(*p) >= caml_start_code && Pc_val(*p) < end_code && find_debug_info((code_t)*p)) { return Pc_val(*p); } } return NULL; }