Skip to content

Commit

Permalink
Moving libafl related files in dedicating folders (#60)
Browse files Browse the repository at this point in the history
* Restructuration of libafl dirs. Formatting + export of maps struct and functions.

* Fix wrong header path.

* Fix misc path
  • Loading branch information
rmalmain authored Apr 11, 2024
1 parent e99b9da commit 50b0c90
Show file tree
Hide file tree
Showing 26 changed files with 113 additions and 95 deletions.
2 changes: 1 addition & 1 deletion accel/tcg/cpu-exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ static inline void cpu_handle_debug_exception(CPUState *cpu)

//// --- Begin LibAFL code ---

#include "libafl_extras/exit.h"
#include "libafl/exit.h"

//// --- End LibAFL code ---

Expand Down
2 changes: 1 addition & 1 deletion accel/tcg/tcg-runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

//// --- Begin LibAFL code ---

#include "libafl_extras/exit.h"
#include "libafl/exit.h"

#ifndef CONFIG_USER_ONLY

Expand Down
2 changes: 1 addition & 1 deletion accel/tcg/translate-all.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@

//// --- Begin LibAFL code ---

#include "libafl_extras/hook.h"
#include "libafl/hook.h"

//// --- End LibAFL code ---

Expand Down
4 changes: 2 additions & 2 deletions accel/tcg/translator.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ static void gen_tb_end(const TranslationBlock *tb, uint32_t cflags,

//// --- Begin LibAFL code ---

#include "libafl_extras/exit.h"
#include "libafl_extras/hook.h"
#include "libafl/exit.h"
#include "libafl/hook.h"

#ifndef TARGET_LONG_BITS
#error "TARGET_LONG_BITS not defined"
Expand Down
2 changes: 1 addition & 1 deletion block/block-backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

//// --- Begin LibAFL code ---
#ifdef CONFIG_SOFTMMU
#include "libafl_extras/syx-snapshot/syx-snapshot.h"
#include "libafl/syx-snapshot/syx-snapshot.h"
#endif
//// --- End LibAFL code ---

Expand Down
4 changes: 2 additions & 2 deletions cpu-target.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@

//// --- Begin LibAFL code ---

#include "libafl_extras/exit.h"
#include "libafl_extras/hook.h"
#include "libafl/exit.h"
#include "libafl/hook.h"

static __thread GByteArray *libafl_qemu_mem_buf = NULL;

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include "device-save.h"
#include "syx-cow-cache.h"
#include "../syx-misc.h"
#include "libafl/syx-misc.h"

#define SYX_SNAPSHOT_COW_CACHE_DEFAULT_CHUNK_SIZE 64
#define SYX_SNAPSHOT_COW_CACHE_DEFAULT_MAX_BLOCKS (1024 * 1024)
Expand Down
16 changes: 16 additions & 0 deletions include/libafl/user.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#pragma once

#include "qemu/osdep.h"
#include "qapi/error.h"

struct libafl_mapinfo {
target_ulong start;
target_ulong end;
target_ulong offset;
const char* path;
int flags;
int is_priv;
};

IntervalTreeNode * libafl_maps_first(IntervalTreeRoot * map_info);
IntervalTreeNode * libafl_maps_next(IntervalTreeNode *node, struct libafl_mapinfo* ret);
2 changes: 1 addition & 1 deletion libafl_extras/exit.c → libafl/exit.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "exit.h"
#include "libafl/exit.h"

#include "sysemu/runstate.h"
#include "cpu.h"
Expand Down
Loading

0 comments on commit 50b0c90

Please sign in to comment.