ホーム › System.WindowsProgramming › JIT_DEBUG_INFO
JIT_DEBUG_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| dwSize | DWORD | 4 | +0 | +0 | この構造体のサイズ(バイト)。 |
| dwProcessorArchitecture | DWORD | 4 | +4 | +4 | プロセッサアーキテクチャを示す値(PROCESSOR_ARCHITECTURE_*)。 |
| dwThreadID | DWORD | 4 | +8 | +8 | 例外が発生したスレッドのID。 |
| dwReserved0 | DWORD | 4 | +12 | +12 | 予約フィールド。0を設定する。 |
| lpExceptionAddress | ULONGLONG | 8 | +16 | +16 | 例外が発生したアドレス(64ビット)。 |
| lpExceptionRecord | ULONGLONG | 8 | +24 | +24 | EXCEPTION_RECORD構造体のアドレス(64ビット)。 |
| lpContextRecord | ULONGLONG | 8 | +32 | +32 | CONTEXT構造体のアドレス(64ビット)。 |
各言語での定義
#include <windows.h>
// JIT_DEBUG_INFO (x64 40 / x86 40 バイト)
typedef struct JIT_DEBUG_INFO {
DWORD dwSize;
DWORD dwProcessorArchitecture;
DWORD dwThreadID;
DWORD dwReserved0;
ULONGLONG lpExceptionAddress;
ULONGLONG lpExceptionRecord;
ULONGLONG lpContextRecord;
} JIT_DEBUG_INFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct JIT_DEBUG_INFO
{
public uint dwSize;
public uint dwProcessorArchitecture;
public uint dwThreadID;
public uint dwReserved0;
public ulong lpExceptionAddress;
public ulong lpExceptionRecord;
public ulong lpContextRecord;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure JIT_DEBUG_INFO
Public dwSize As UInteger
Public dwProcessorArchitecture As UInteger
Public dwThreadID As UInteger
Public dwReserved0 As UInteger
Public lpExceptionAddress As ULong
Public lpExceptionRecord As ULong
Public lpContextRecord As ULong
End Structureimport ctypes
from ctypes import wintypes
class JIT_DEBUG_INFO(ctypes.Structure):
_fields_ = [
("dwSize", wintypes.DWORD),
("dwProcessorArchitecture", wintypes.DWORD),
("dwThreadID", wintypes.DWORD),
("dwReserved0", wintypes.DWORD),
("lpExceptionAddress", ctypes.c_ulonglong),
("lpExceptionRecord", ctypes.c_ulonglong),
("lpContextRecord", ctypes.c_ulonglong),
]#[repr(C)]
pub struct JIT_DEBUG_INFO {
pub dwSize: u32,
pub dwProcessorArchitecture: u32,
pub dwThreadID: u32,
pub dwReserved0: u32,
pub lpExceptionAddress: u64,
pub lpExceptionRecord: u64,
pub lpContextRecord: u64,
}import "golang.org/x/sys/windows"
type JIT_DEBUG_INFO struct {
dwSize uint32
dwProcessorArchitecture uint32
dwThreadID uint32
dwReserved0 uint32
lpExceptionAddress uint64
lpExceptionRecord uint64
lpContextRecord uint64
}type
JIT_DEBUG_INFO = record
dwSize: DWORD;
dwProcessorArchitecture: DWORD;
dwThreadID: DWORD;
dwReserved0: DWORD;
lpExceptionAddress: UInt64;
lpExceptionRecord: UInt64;
lpContextRecord: UInt64;
end;const JIT_DEBUG_INFO = extern struct {
dwSize: u32,
dwProcessorArchitecture: u32,
dwThreadID: u32,
dwReserved0: u32,
lpExceptionAddress: u64,
lpExceptionRecord: u64,
lpContextRecord: u64,
};type
JIT_DEBUG_INFO {.bycopy.} = object
dwSize: uint32
dwProcessorArchitecture: uint32
dwThreadID: uint32
dwReserved0: uint32
lpExceptionAddress: uint64
lpExceptionRecord: uint64
lpContextRecord: uint64struct JIT_DEBUG_INFO
{
uint dwSize;
uint dwProcessorArchitecture;
uint dwThreadID;
uint dwReserved0;
ulong lpExceptionAddress;
ulong lpExceptionRecord;
ulong lpContextRecord;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; JIT_DEBUG_INFO サイズ: 40 バイト(x64)
dim st, 10 ; 4byte整数×10(構造体サイズ 40 / 4 切り上げ)
; dwSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwProcessorArchitecture : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; dwThreadID : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; dwReserved0 : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; lpExceptionAddress : ULONGLONG (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; lpExceptionRecord : ULONGLONG (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; lpContextRecord : ULONGLONG (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global JIT_DEBUG_INFO
#field int dwSize
#field int dwProcessorArchitecture
#field int dwThreadID
#field int dwReserved0
#field int64 lpExceptionAddress
#field int64 lpExceptionRecord
#field int64 lpContextRecord
#endstruct
stdim st, JIT_DEBUG_INFO ; NSTRUCT 変数を確保
st->dwSize = 100
mes "dwSize=" + st->dwSize