code style
This commit is contained in:
parent
21cd133480
commit
b78bf27449
2 changed files with 16 additions and 14 deletions
|
|
@ -39,15 +39,17 @@ typedef struct detour_trampoline
|
||||||
//
|
//
|
||||||
// The number is rounded up to 128. m_rbScratchDst should match this.
|
// The number is rounded up to 128. m_rbScratchDst should match this.
|
||||||
//
|
//
|
||||||
uint8_t rbCode[128]; // target code + jmp to pbRemain
|
uint8_t code[128]; // target code + jmp to pbRemain
|
||||||
uint8_t cbCode; // size of moved target code.
|
uint8_t code_size; // size of moved target code.
|
||||||
uint8_t cbCodeBreak[3]; // padding to make debugging easier.
|
uint8_t code_padding[3]; // padding to make debugging easier.
|
||||||
uint8_t rbRestore[24]; // original target code.
|
|
||||||
uint8_t cbRestore; // size of original target code.
|
uint8_t restore_code[24]; // original target code.
|
||||||
uint8_t cbRestoreBreak[3]; // padding to make debugging easier.
|
uint8_t restore_code_size; // size of original target code.
|
||||||
detour_align rAlign[8]; // instruction alignment array.
|
uint8_t restore_code_padding[3]; // padding to make debugging easier.
|
||||||
uint8_t* pbRemain; // first instruction after moved code. [free list]
|
|
||||||
uint8_t* pbDetour; // first instruction of detour function.
|
detour_align align[8]; // instruction alignment array.
|
||||||
|
uint8_t* ptr_remain; // first instruction after moved code. [free list]
|
||||||
|
uint8_t* ptr_detour; // first instruction of detour function.
|
||||||
} detour_trampoline;
|
} detour_trampoline;
|
||||||
|
|
||||||
static_assert(sizeof(detour_trampoline) == 192);
|
static_assert(sizeof(detour_trampoline) == 192);
|
||||||
|
|
|
||||||
|
|
@ -57,8 +57,8 @@ static void internal_detour_runnable_trampoline_regions()
|
||||||
// Transactions
|
// Transactions
|
||||||
|
|
||||||
typedef enum detour_operation_kind {
|
typedef enum detour_operation_kind {
|
||||||
attach,
|
detour_operation_kind_attach,
|
||||||
detach,
|
detour_operation_kind_detach,
|
||||||
} detour_operation_kind;
|
} detour_operation_kind;
|
||||||
|
|
||||||
typedef struct detour_operation
|
typedef struct detour_operation
|
||||||
|
|
@ -67,7 +67,7 @@ typedef struct detour_operation
|
||||||
detour_operation_kind kind;
|
detour_operation_kind kind;
|
||||||
uint8_t** pointer;
|
uint8_t** pointer;
|
||||||
uint8_t* target;
|
uint8_t* target;
|
||||||
struct detour_trampoline* trampoline;
|
detour_trampoline* trampoline;
|
||||||
vm_prot_t perm;
|
vm_prot_t perm;
|
||||||
} detour_operation;
|
} detour_operation;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue