Skip to content

Commit 0832bb4

Browse files
committed
fix libafl side wih new version
1 parent ad1628c commit 0832bb4

File tree

5 files changed

+3
-26
lines changed

5 files changed

+3
-26
lines changed

contrib/plugins/lockstep.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -34,27 +34,6 @@
3434

3535
#include <qemu-plugin.h>
3636

37-
//// --- Begin LibAFL code ---
38-
static inline gpointer g_memdup2_qemu(gconstpointer mem, gsize byte_size)
39-
{
40-
#if GLIB_CHECK_VERSION(2, 68, 0)
41-
return g_memdup2(mem, byte_size);
42-
#else
43-
gpointer new_mem;
44-
45-
if (mem && byte_size != 0) {
46-
new_mem = g_malloc(byte_size);
47-
memcpy(new_mem, mem, byte_size);
48-
} else {
49-
new_mem = NULL;
50-
}
51-
52-
return new_mem;
53-
#endif
54-
}
55-
#define g_memdup2(m, s) g_memdup2_qemu(m, s)
56-
//// --- End LibAFL code ---
57-
5837
QEMU_PLUGIN_EXPORT int qemu_plugin_version = QEMU_PLUGIN_VERSION;
5938

6039
/* saved so we can uninstall later */

gdbstub/user-target.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,15 +302,15 @@ void gdb_handle_query_rcmd(GArray *params, void *user_ctx)
302302
return;
303303
}
304304

305-
len = strlen(get_param(params, 0)->data);
305+
len = strlen(gdb_get_cmd_param(params, 0)->data);
306306
if (len % 2) {
307307
gdb_put_packet("E01");
308308
return;
309309
}
310310

311311
g_assert(gdbserver_state.mem_buf->len == 0);
312312
len = len / 2;
313-
gdb_hextomem(gdbserver_state.mem_buf, get_param(params, 0)->data, len);
313+
gdb_hextomem(gdbserver_state.mem_buf, gdb_get_cmd_param(params, 0)->data, len);
314314

315315
if (libafl_qemu_gdb_exec()) {
316316
gdb_put_packet("OK");

include/libafl/exit.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
#pragma once
22

33
#include "qemu/osdep.h"
4-
54
#include "exec/cpu-defs.h"
6-
#include "exec/translator.h"
75

86
#define EXCP_LIBAFL_EXIT 0xf4775747
97

libafl/exit.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include "tcg/tcg-op.h"
55
#include "tcg/tcg-temp-internal.h"
66
#include "sysemu/runstate.h"
7-
#include "exec/translator.h"
87

98
#include "cpu.h"
109
#include "libafl/cpu.h"

libafl/gdb.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "qemu/osdep.h"
22
#include "libafl/gdb.h"
33
#include "gdbstub/internals.h"
4+
#include "gdbstub/commands.h"
45

56
static struct libafl_custom_gdb_cmd* libafl_qemu_gdb_cmds;
67

0 commit comments

Comments
 (0)