about summary refs log tree commit diff stats
path: root/src/tools/bridge_private.h
blob: 928e1e02a85202ac4d74c8cf2b4bb8226a0ec3d4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef __BRIDGE_PRIVATE_H_
#define __BRIDGE_PRIVATE_H_
#include <stdint.h>

// the generic wrapper pointer functions
typedef void (*wrapper_t)(x64emu_t* emu, uintptr_t fnc);

#pragma pack(push, 1)
typedef union onebridge_s {
    struct {
    uint8_t CC;     // CC int 0x3
    uint8_t S, C;   // 'S' 'C', just a signature
    wrapper_t w;    // wrapper
    uintptr_t f;    // the function for the wrapper
    uint8_t C3;     // C2 or C3 ret
    uint16_t N;     // N in case of C2 ret
    };
    uint64_t dummy[4];
} onebridge_t;
#pragma pack(pop)

#endif //__BRIDGE_PRIVATE_H_