minecraft-pi-reborn/libreborn/include/libreborn/patch.h

33 lines
1006 B
C
Raw Normal View History

#pragma once
#ifdef __cplusplus
extern "C" {
#endif
// Patching Functions
2022-03-14 23:09:25 +00:00
#ifdef REBORN_HAS_PATCH_CODE
void _overwrite_call(const char *file, int line, void *start, void *target);
#define overwrite_call(start, target) _overwrite_call(__FILE__, __LINE__, start, target);
void _overwrite_calls(const char *file, int line, void *start, void *target);
#define overwrite_calls(start, target) _overwrite_calls(__FILE__, __LINE__, start, target);
2022-06-25 21:30:08 +00:00
void *extract_from_bl_instruction(unsigned char *from);
void _overwrite(const char *file, int line, void *start, void *target);
#define overwrite(start, target) _overwrite(__FILE__, __LINE__, start, target);
void _patch(const char *file, int line, void *start, unsigned char patch[4]);
#define patch(start, patch) _patch(__FILE__, __LINE__, start, patch);
void _patch_address(const char *file, int line, void *start, void *target);
#define patch_address(start, target) _patch_address(__FILE__, __LINE__, start, target);
2022-03-14 23:09:25 +00:00
#endif
#ifdef __cplusplus
}
#endif