minecraft-pi-reborn/libreborn/include/libreborn/patch.h
TheBrokenRail 522cee2d3b
All checks were successful
Build / Build (AMD64, Server) (push) Successful in 9m54s
Build / Build (AMD64, Client) (push) Successful in 10m9s
Build / Build (ARM64, Server) (push) Successful in 10m14s
Build / Build (ARM64, Client) (push) Successful in 10m32s
Build / Build (ARMHF, Server) (push) Successful in 7m1s
Build / Build (ARMHF, Client) (push) Successful in 9m27s
Build / Test (Server) (push) Successful in 11m58s
Build / Release (push) Has been skipped
Build / Test (Client) (push) Successful in 17m23s
Fix overwrite_calls_within Macro
2024-01-30 01:30:11 -05:00

36 lines
1.2 KiB
C

#pragma once
#ifdef __cplusplus
extern "C" {
#endif
// Patching Functions
#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);
void _overwrite_calls_within(const char *file, int line, void *from, void *to, void *start, void *target);
#define overwrite_calls_within(from, to, start, target) _overwrite_calls_within(__FILE__, __LINE__, from, to, start, target);
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);
#endif
#ifdef __cplusplus
}
#endif