diff options
Diffstat (limited to 'memcheck')
-rw-r--r-- | memcheck/memcheck_api.h | 2 | ||||
-rw-r--r-- | memcheck/memcheck_common.h | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/memcheck/memcheck_api.h b/memcheck/memcheck_api.h index 1961465..9e76ecd 100644 --- a/memcheck/memcheck_api.h +++ b/memcheck/memcheck_api.h @@ -43,7 +43,7 @@ extern int memcheck_watch_call_stack; * array is used to obtain guest PC address from a translated PC address. * tcg_gen_code_common will fill it up when memchecker is enabled. The array is * declared in ./translate_all.c */ -extern target_ulong* gen_opc_tpc2gpc_ptr; +extern void** gen_opc_tpc2gpc_ptr; /* Number of (tb_pc, guest_pc) pairs stored in gen_opc_tpc2gpc array. * The variable is declared in ./translate_all.c */ diff --git a/memcheck/memcheck_common.h b/memcheck/memcheck_common.h index 668b78c..e6d12db 100644 --- a/memcheck/memcheck_common.h +++ b/memcheck/memcheck_common.h @@ -125,7 +125,7 @@ typedef struct MallocDesc { /* Helpers for addressing field in MallocDesc structure, using which emulator * reports an error back to the guest. */ -#define ALLOC_RES_OFFSET ((uint32_t)&(((MallocDesc*)0)->libc_pid)) +#define ALLOC_RES_OFFSET ((uint32_t)(ptrdiff_t)&(((MallocDesc*)0)->libc_pid)) #define ALLOC_RES_ADDRESS(p) (p + ALLOC_RES_OFFSET) /* Describes memory block info queried from emulator. This structure is passed @@ -174,7 +174,7 @@ typedef struct MallocDescQuery { /* Helpers for addressing field in MallocDescQuery structure using which * emulator reports an error back to the guest. */ -#define QUERY_RES_OFFSET ((uint32_t)&(((MallocDescQuery*)0)->libc_pid)) +#define QUERY_RES_OFFSET ((uint32_t)(ptrdiff_t)&(((MallocDescQuery*)0)->libc_pid)) #define QUERY_RES_ADDRESS(p) (p + QUERY_RES_OFFSET) /* Describes memory block that is being freed back to the heap. This structure @@ -201,7 +201,7 @@ typedef struct MallocFree { /* Helpers for addressing field in MallocFree structure, using which emulator * reports an error back to the guest. */ -#define FREE_RES_OFFSET ((uint32_t)&(((MallocFree*)0)->libc_pid)) +#define FREE_RES_OFFSET ((uint32_t)(ptrdiff_t)&(((MallocFree*)0)->libc_pid)) #define FREE_RES_ADDRESS(p) (p + FREE_RES_OFFSET) /* Extends MallocDesc structure with additional information, used by memchecker. |