Add handler for LibAFL breakpoint (#17)
This commit is contained in:
parent
241ec5977a
commit
f49d184a90
@ -71,12 +71,29 @@ void cpu_loop(CPUMIPSState *env)
|
|||||||
# endif
|
# endif
|
||||||
|
|
||||||
for(;;) {
|
for(;;) {
|
||||||
|
|
||||||
|
//// --- Begin LibAFL code ---
|
||||||
|
|
||||||
|
if (libafl_qemu_break_asap) return;
|
||||||
|
|
||||||
|
//// --- End LibAFL code ---
|
||||||
|
|
||||||
cpu_exec_start(cs);
|
cpu_exec_start(cs);
|
||||||
trapnr = cpu_exec(cs);
|
trapnr = cpu_exec(cs);
|
||||||
cpu_exec_end(cs);
|
cpu_exec_end(cs);
|
||||||
process_queued_cpu_work(cs);
|
process_queued_cpu_work(cs);
|
||||||
|
|
||||||
switch(trapnr) {
|
switch(trapnr) {
|
||||||
|
|
||||||
|
//// --- Begin LibAFL code ---
|
||||||
|
|
||||||
|
#define EXCP_LIBAFL_BP 0xf4775747
|
||||||
|
|
||||||
|
case EXCP_LIBAFL_BP:
|
||||||
|
return;
|
||||||
|
|
||||||
|
//// --- End LibAFL code ---
|
||||||
|
|
||||||
case EXCP_SYSCALL:
|
case EXCP_SYSCALL:
|
||||||
env->active_tc.PC += 4;
|
env->active_tc.PC += 4;
|
||||||
# ifdef TARGET_ABI_MIPSO32
|
# ifdef TARGET_ABI_MIPSO32
|
||||||
|
Loading…
x
Reference in New Issue
Block a user