Skip to content

Commit

Permalink
Restructuration of libafl dirs. Formatting + export of maps struct an…
Browse files Browse the repository at this point in the history
…d functions.
  • Loading branch information
rmalmain committed Apr 11, 2024
1 parent e99b9da commit 67e71cf
Show file tree
Hide file tree
Showing 26 changed files with 102 additions and 86 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.
File renamed without changes.
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 67e71cf

Please sign in to comment.