dbgtypedef.h 3.56 KB
Newer Older
SND\kernelnet_cp's avatar
SND\kernelnet_cp committed
1 2
#pragma once

SND\kernelnet_cp's avatar
SND\kernelnet_cp committed
3 4
#include <string>

SND\kernelnet_cp's avatar
SND\kernelnet_cp committed
5 6 7 8 9 10
namespace kdlib {

///////////////////////////////////////////////////////////////////////////////

typedef unsigned long           PROCESS_ID;
typedef unsigned long           PROCESS_DEBUG_ID;
SND\kernelnet_cp's avatar
SND\kernelnet_cp committed
11
typedef unsigned long           THREAD_ID;
12
typedef unsigned long           THREAD_DEBUG_ID;
SND\kernelnet_cp's avatar
SND\kernelnet_cp committed
13 14 15
typedef unsigned long           BREAKPOINT_ID;
typedef unsigned long long      MEMOFFSET_64;
typedef unsigned long           MEMOFFSET_32;
SND\kernelnet_cp's avatar
SND\kernelnet_cp committed
16
typedef long                    MEMOFFSET_REL;
17
typedef long                    MEMDISPLACEMENT;
SND\kernelnet_cp's avatar
SND\kernelnet_cp committed
18
typedef unsigned long           BITOFFSET;
SND\kernelnet_cp's avatar
SND\kernelnet_cp committed
19
typedef unsigned long           ACCESS_TYPE;
SND\kernelnet_cp's avatar
SND\kernelnet_cp committed
20
typedef unsigned long long      EXTENSION_ID;
21
typedef unsigned long           RELREG_ID;
SND\kernelnet_cp's avatar
SND\kernelnet_cp committed
22

SND\kernelnet_cp's avatar
SND\kernelnet_cp committed
23 24 25 26 27 28 29 30
enum DebugCallbackResult {
    DebugCallbackProceed = 0,
    DebugCallbackNoChange = 1,
    DebugCallbackBreak = 2,
    DebugCallbackMax = 3
};

enum ExecutionStatus {
31 32 33 34
    DebugStatusNoChange,
    DebugStatusGo,
    DebugStatusBreak,
    DebugStatusNoDebuggee
SND\kernelnet_cp's avatar
SND\kernelnet_cp committed
35 36
};

SND\kernelnet_cp's avatar
SND\kernelnet_cp committed
37 38 39 40 41 42
enum CPUType {
    CPU_I386 = 0,
    CPU_AMD64 = 1,
    CPU_MAX = 2
};

SND\kernelnet_cp's avatar
SND\kernelnet_cp committed
43 44 45 46 47 48 49 50 51 52 53 54 55
enum CPURegType {
    RegInt8,
    RegInt16,
    RegInt32,
    RegInt64,
    RegFloat32,
    RegFloat64,
    RegFloat80,
    RegFloat128,
    RegVector64,
    RegVector128
};

56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72

enum EventType {
    EventTypeBreakpoint,
    EventTypeException,
    EventTypeCreateThread,
    EventTypeExitThread,
    EventTypeCreateProcess,
    EventTypeExitProcess,
    EventTypeLoadModule,
    EventTypeUnloadModule,
    EventTypeSystemError,
    EventTypeSessionStatus,
    EventTypeChangeDebuggeeState,
    EventTypeChangeEngineState,
    EventTypeChangeSymbolState
};

SND\kernelnet_cp's avatar
SND\kernelnet_cp committed
73 74 75 76 77 78 79
struct SystemInfo {
    unsigned long  majorVersion;
    unsigned long  minorVersion;
    unsigned long  buildNumber;
    std::wstring  buildDescription;
};

SND\kernelnet_cp's avatar
SND\kernelnet_cp committed
80 81 82 83 84 85
struct SystemCrashInfo {
    unsigned long long  code;
    unsigned long paramterCount;
    unsigned long long parameters[0x10];
};

86 87 88 89 90 91
struct ExceptionInfo {
    bool  firstChance;
    unsigned long  exceptionCode;
    unsigned long  exceptionFlags;
    MEMOFFSET_64  exceptionRecord;
    MEMOFFSET_64  exceptionAddress;
92 93
    PROCESS_DEBUG_ID  process;
    THREAD_DEBUG_ID  thread;
94 95 96 97
    unsigned long parameterCount;
    unsigned long long parameters[0x10];
};

98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
struct FixedFileInfo {
    unsigned long Signature;
    unsigned long StrucVersion;
    unsigned long FileVersionMS;
    unsigned long FileVersionLS;
    unsigned long ProductVersionMS;
    unsigned long ProductVersionLS;
    unsigned long FileFlagsMask;
    unsigned long FileFlags;
    unsigned long FileOS;
    unsigned long FileType;
    unsigned long FileSubtype;
    unsigned long FileDateMS;
    unsigned long FileDateLS;
};

enum FileFlag {
    FileFlagDebug           = 0x00000001,
    FileFlagPreRelease      = 0x00000002,
    FileFlagPatched         = 0x00000004,
    FileFlagPrivateBuild    = 0x00000008,
    FileFlagInfoInferred    = 0x00000010,
    FileFlagSpecialBuild    = 0x00000020,
};

123 124 125 126 127 128 129 130 131 132 133 134
enum MemoryProtect {

    PageNoAccess            = 0x00000001,
    PageReadOnly            = 0x00000002,
    PageReadWrite           = 0x00000004,
    PageWriteCopy           = 0x00000008,
    PageExecute             = 0x00000010,
    PageExecuteRead         = 0x00000020,
    PageExecuteReadWrite    = 0x00000040,
    PageExecuteWriteCopy    = 0x00000080
};

135 136 137 138 139 140 141

enum ProcessExitReason {
    ProcessExit,
    ProcessTerminate,
    ProcessDetach
};

SND\kernelnet_cp's avatar
SND\kernelnet_cp committed
142 143 144 145 146
///////////////////////////////////////////////////////////////////////////////

} // kdlib namespace end