Add loops for writing and reading
This commit is contained in:
parent
d1dbb69fab
commit
480f4dfb67
@ -126,10 +126,12 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
int task_inputs[num_tasks];
|
int task_inputs[num_tasks];
|
||||||
|
|
||||||
|
// input of all tasks combined
|
||||||
for (long i = 0; i < pow(input_size, num_tasks); i++)
|
for (long i = 0; i < pow(input_size, num_tasks); i++)
|
||||||
{
|
{
|
||||||
for (int j = 0; j < num_tasks; j++)
|
for (int j = 0; j < num_tasks; j++)
|
||||||
{
|
{
|
||||||
|
// from the "global input" i, extract the input bits for the task j
|
||||||
task_inputs[j] = i & ((input_size - 1) << (j * __builtin_popcount(input_size - 1)));
|
task_inputs[j] = i & ((input_size - 1) << (j * __builtin_popcount(input_size - 1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -157,8 +159,7 @@ int main(int argc, char **argv)
|
|||||||
libafl_qemu_write_reg(cpu, j + 1, register_in_32b);
|
libafl_qemu_write_reg(cpu, j + 1, register_in_32b);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read Result to unint32_t (for debugging)
|
|
||||||
// uint32_t res_val = (uint32_t)res_ptr[0] | ((uint32_t)res_ptr[1] << 8) | ((uint32_t)res_ptr[2] << 16) | ((uint32_t)res_ptr[3] << 24);
|
|
||||||
|
|
||||||
libafl_qemu_set_native_breakpoint(start);
|
libafl_qemu_set_native_breakpoint(start);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user