Fix usermode builds

This commit is contained in:
Andrea Fioraldi 2023-11-21 14:01:16 +01:00
parent 5d31b09a11
commit 4605ea753b
3 changed files with 5 additions and 5 deletions

View File

@ -37,6 +37,8 @@
//// --- Begin LibAFL code ---
#include "libafl_extras/exit.h"
#ifndef CONFIG_USER_ONLY
#include "sysemu/runstate.h"
@ -49,8 +51,6 @@
#include <stdlib.h>
#include <string.h>
#include "libafl_extras/exit.h"
void libafl_save_qemu_snapshot(char *name, bool sync);
void libafl_load_qemu_snapshot(char *name, bool sync);

View File

@ -9,12 +9,12 @@
__thread int libafl_qemu_break_asap = 0;
__thread CPUState* libafl_breakpoint_cpu;
__thread vaddr libafl_breakpoint_pc;
__thread static struct libafl_exit_reason last_exit_reason;
static __thread struct libafl_exit_reason last_exit_reason;
#else
static struct libafl_exit_reason last_exit_reason;
#endif
#ifdef TARGET_ARM
#if defined(TARGET_ARM) && !defined(TARGET_AARCH64)
#define THUMB_MASK(value) (value | cpu_env(libafl_breakpoint_cpu)->thumb)
#else
#define THUMB_MASK(value) value

View File

@ -2,5 +2,5 @@ specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: [files(
'syx-snapshot/device-save.c',
'syx-snapshot/syx-snapshot.c',
'syx-snapshot/channel-buffer-writeback.c',
'exit.c',
)])
specific_ss.add(files('exit.c'))