code style
This commit is contained in:
parent
21cd133480
commit
b78bf27449
2 changed files with 16 additions and 14 deletions
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
typedef struct detour_align
|
||||
{
|
||||
uint8_t obTarget;
|
||||
uint8_t obTrampoline;
|
||||
uint8_t obTarget;
|
||||
uint8_t obTrampoline;
|
||||
} detour_align;
|
||||
|
||||
typedef struct detour_trampoline
|
||||
|
|
@ -39,15 +39,17 @@ typedef struct detour_trampoline
|
|||
//
|
||||
// The number is rounded up to 128. m_rbScratchDst should match this.
|
||||
//
|
||||
uint8_t rbCode[128]; // target code + jmp to pbRemain
|
||||
uint8_t cbCode; // size of moved target code.
|
||||
uint8_t cbCodeBreak[3]; // padding to make debugging easier.
|
||||
uint8_t rbRestore[24]; // original target code.
|
||||
uint8_t cbRestore; // size of original target code.
|
||||
uint8_t cbRestoreBreak[3]; // padding to make debugging easier.
|
||||
detour_align rAlign[8]; // instruction alignment array.
|
||||
uint8_t* pbRemain; // first instruction after moved code. [free list]
|
||||
uint8_t* pbDetour; // first instruction of detour function.
|
||||
uint8_t code[128]; // target code + jmp to pbRemain
|
||||
uint8_t code_size; // size of moved target code.
|
||||
uint8_t code_padding[3]; // padding to make debugging easier.
|
||||
|
||||
uint8_t restore_code[24]; // original target code.
|
||||
uint8_t restore_code_size; // size of original target code.
|
||||
uint8_t restore_code_padding[3]; // padding to make debugging easier.
|
||||
|
||||
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;
|
||||
|
||||
static_assert(sizeof(detour_trampoline) == 192);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue