mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-26 20:03:54 -06:00
meson: Make DEBUG_REMAP a meson option
Currently DEBUG_REMAP is a macro that needs to be manually #defined to be activated, which makes it hard to have separate build directories dedicated to testing the code with it. Promote it to a meson option. Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Message-Id: <20240312002402.14344-1-iii@linux.ibm.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
85b597413d
commit
1f2355f53c
6 changed files with 14 additions and 9 deletions
|
@ -22,8 +22,6 @@
|
|||
#include "exec/cpu_ldst.h"
|
||||
#include "exec/exec-all.h"
|
||||
|
||||
#undef DEBUG_REMAP
|
||||
|
||||
#include "exec/user/abitypes.h"
|
||||
|
||||
extern char **environ;
|
||||
|
@ -437,7 +435,7 @@ static inline void *lock_user(int type, abi_ulong guest_addr, long len,
|
|||
if (!access_ok(type, guest_addr, len)) {
|
||||
return NULL;
|
||||
}
|
||||
#ifdef DEBUG_REMAP
|
||||
#ifdef CONFIG_DEBUG_REMAP
|
||||
{
|
||||
void *addr;
|
||||
addr = g_malloc(len);
|
||||
|
@ -461,7 +459,7 @@ static inline void unlock_user(void *host_ptr, abi_ulong guest_addr,
|
|||
long len)
|
||||
{
|
||||
|
||||
#ifdef DEBUG_REMAP
|
||||
#ifdef CONFIG_DEBUG_REMAP
|
||||
if (!host_ptr) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue