Esempio n. 1
0
File: signal.c Progetto: siam/jato
struct compilation_unit *get_signal_source_cu(void *ctx)
{
	ucontext_t *uc;

	uc = ctx;
	return jit_lookup_cu(uc->uc_mcontext.gregs[REG_IP]);
}
Esempio n. 2
0
struct compilation_unit *stack_trace_elem_get_cu(struct stack_trace_elem *elem)
{
	if (elem->type == STACK_TRACE_ELEM_TYPE_OTHER)
		return NULL;

	if (elem->type == STACK_TRACE_ELEM_TYPE_JNI)
		return elem->cu;

	return jit_lookup_cu(elem->addr);
}
Esempio n. 3
0
File: signal.c Progetto: vegard/jato
unsigned long throw_from_signal_bh(unsigned long jit_addr)
{
	struct jit_stack_frame *frame;
	struct compilation_unit *cu;

	/*
	 * The frame chain looks like this here:
	 *
	 * 0  <throw_from_signal_bh>
	 * 1  <signal_bottom_half_handler>
	 * 2  <signal_bh_trampoline>
	 * 3  <jit_method>
	 *    ...
	 */
	frame = __builtin_frame_address(3);

	cu = jit_lookup_cu(jit_addr);

	return (unsigned long)throw_exception_from(cu, frame,
		(unsigned char *)jit_addr);
}