[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] help with helper functions
From: |
João Corrêa |
Subject: |
[Qemu-devel] help with helper functions |
Date: |
Mon, 19 Mar 2012 19:34:57 -0300 |
Hi Guys,
I'm trying to use some helper functions to instrument translated code, but I'm getting some segfaults while doing it. Here are some code I've placed:
target-i386/helper.h
DEF_HELPER_1(foo, void, tl)
#ifdef TARGET_X86_64
void foo(target_ulong t0){
}
target-i386/translate.c
static inline void gen_jmp_im(target_ulong pc){
#ifdef TARGET_X86_64
printf("test2\n");
gen_foo(pc);
printf("test3\n");
#endif
tcg_gen_movi_tl(cpu_tmp0, pc);
tcg_gen_st_tl(cpu_tmp0, cpu_env, offsetof(CPUState, eip));
}
What happens is that, test2 is printed but test3 is never printed, what means that the function gen_foo(pc) never ended.
Attached to this e-mail follows the output generated with valgrind.
Any help will be very useful. Thanks in advance.
João.
valgrind_output
Description: Binary data
- [Qemu-devel] help with helper functions,
João Corrêa <=