From b169629dbd1cd0b78b541c7fa8eccf6a6a7394b1 Mon Sep 17 00:00:00 2001 From: "Subhojeet Mukherjee, PhD" Date: Mon, 1 Jul 2024 05:43:45 +0000 Subject: Fresh commit with all -- post revertion due to unicornafl update --- qemu_mode/hooking_bridge/inc/exports.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 qemu_mode/hooking_bridge/inc/exports.h (limited to 'qemu_mode/hooking_bridge/inc/exports.h') diff --git a/qemu_mode/hooking_bridge/inc/exports.h b/qemu_mode/hooking_bridge/inc/exports.h new file mode 100644 index 00000000..186976f4 --- /dev/null +++ b/qemu_mode/hooking_bridge/inc/exports.h @@ -0,0 +1,29 @@ +#ifndef API_H +#define API_H + +//# EXPORTS +// Returns 0 on success +int r_mem(unsigned long long addr, unsigned long long len, void *dest); +// // Returns 0 on success +int w_mem(unsigned long long addr, unsigned long long len, void *src); +// Returns num of bytes read; +int r_reg(unsigned char reg, void *dest); +// // Returns num of bytes written +int w_reg(unsigned char reg, char *src); + + +//NOTE hook function must be named hook_<16 hex character at_addr> +//NOTE must define function `struct conf* configure()` +struct conf{ + unsigned char IP_reg_num; + unsigned long long entry_addr; + unsigned long long* hooks; + unsigned long long num_hooks; +}conf; + +struct ret{ + unsigned long long addr; + char remove_bp; +}; + +#endif \ No newline at end of file -- cgit 1.4.1