ホーム › System.Diagnostics.Debug.Extensions › DEBUG_BREAKPOINT_PARAMETERS
DEBUG_BREAKPOINT_PARAMETERS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Offset | ULONGLONG | 8 | +0 | +0 | ブレークポイントが設定されたアドレス(未解決時は無効値)。 |
| Id | DWORD | 4 | +8 | +8 | ブレークポイントを識別するエンジン内ID。 |
| BreakType | DWORD | 4 | +12 | +12 | ブレークポイントの種別(コード/データ)。 |
| ProcType | DWORD | 4 | +16 | +16 | 対象プロセッサの種別。 |
| Flags | DWORD | 4 | +20 | +20 | ブレークポイントのフラグ(有効/ワンショット等)。 |
| DataSize | DWORD | 4 | +24 | +24 | データブレークポイントの監視バイト数。 |
| DataAccessType | DWORD | 4 | +28 | +28 | データブレークポイントの監視アクセス種別(読/書/実行)。 |
| PassCount | DWORD | 4 | +32 | +32 | ブレーク発生までに必要な通過回数。 |
| CurrentPassCount | DWORD | 4 | +36 | +36 | 現在までの残り通過回数。 |
| MatchThread | DWORD | 4 | +40 | +40 | 対象となるスレッドのエンジンID。全スレッドなら無効値。 |
| CommandSize | DWORD | 4 | +44 | +44 | ヒット時に実行するコマンド文字列の長さ。 |
| OffsetExpressionSize | DWORD | 4 | +48 | +48 | アドレスを表す式文字列の長さ。 |
各言語での定義
#include <windows.h>
// DEBUG_BREAKPOINT_PARAMETERS (x64 56 / x86 56 バイト)
typedef struct DEBUG_BREAKPOINT_PARAMETERS {
ULONGLONG Offset;
DWORD Id;
DWORD BreakType;
DWORD ProcType;
DWORD Flags;
DWORD DataSize;
DWORD DataAccessType;
DWORD PassCount;
DWORD CurrentPassCount;
DWORD MatchThread;
DWORD CommandSize;
DWORD OffsetExpressionSize;
} DEBUG_BREAKPOINT_PARAMETERS;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DEBUG_BREAKPOINT_PARAMETERS
{
public ulong Offset;
public uint Id;
public uint BreakType;
public uint ProcType;
public uint Flags;
public uint DataSize;
public uint DataAccessType;
public uint PassCount;
public uint CurrentPassCount;
public uint MatchThread;
public uint CommandSize;
public uint OffsetExpressionSize;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DEBUG_BREAKPOINT_PARAMETERS
Public Offset As ULong
Public Id As UInteger
Public BreakType As UInteger
Public ProcType As UInteger
Public Flags As UInteger
Public DataSize As UInteger
Public DataAccessType As UInteger
Public PassCount As UInteger
Public CurrentPassCount As UInteger
Public MatchThread As UInteger
Public CommandSize As UInteger
Public OffsetExpressionSize As UInteger
End Structureimport ctypes
from ctypes import wintypes
class DEBUG_BREAKPOINT_PARAMETERS(ctypes.Structure):
_fields_ = [
("Offset", ctypes.c_ulonglong),
("Id", wintypes.DWORD),
("BreakType", wintypes.DWORD),
("ProcType", wintypes.DWORD),
("Flags", wintypes.DWORD),
("DataSize", wintypes.DWORD),
("DataAccessType", wintypes.DWORD),
("PassCount", wintypes.DWORD),
("CurrentPassCount", wintypes.DWORD),
("MatchThread", wintypes.DWORD),
("CommandSize", wintypes.DWORD),
("OffsetExpressionSize", wintypes.DWORD),
]#[repr(C)]
pub struct DEBUG_BREAKPOINT_PARAMETERS {
pub Offset: u64,
pub Id: u32,
pub BreakType: u32,
pub ProcType: u32,
pub Flags: u32,
pub DataSize: u32,
pub DataAccessType: u32,
pub PassCount: u32,
pub CurrentPassCount: u32,
pub MatchThread: u32,
pub CommandSize: u32,
pub OffsetExpressionSize: u32,
}import "golang.org/x/sys/windows"
type DEBUG_BREAKPOINT_PARAMETERS struct {
Offset uint64
Id uint32
BreakType uint32
ProcType uint32
Flags uint32
DataSize uint32
DataAccessType uint32
PassCount uint32
CurrentPassCount uint32
MatchThread uint32
CommandSize uint32
OffsetExpressionSize uint32
}type
DEBUG_BREAKPOINT_PARAMETERS = record
Offset: UInt64;
Id: DWORD;
BreakType: DWORD;
ProcType: DWORD;
Flags: DWORD;
DataSize: DWORD;
DataAccessType: DWORD;
PassCount: DWORD;
CurrentPassCount: DWORD;
MatchThread: DWORD;
CommandSize: DWORD;
OffsetExpressionSize: DWORD;
end;const DEBUG_BREAKPOINT_PARAMETERS = extern struct {
Offset: u64,
Id: u32,
BreakType: u32,
ProcType: u32,
Flags: u32,
DataSize: u32,
DataAccessType: u32,
PassCount: u32,
CurrentPassCount: u32,
MatchThread: u32,
CommandSize: u32,
OffsetExpressionSize: u32,
};type
DEBUG_BREAKPOINT_PARAMETERS {.bycopy.} = object
Offset: uint64
Id: uint32
BreakType: uint32
ProcType: uint32
Flags: uint32
DataSize: uint32
DataAccessType: uint32
PassCount: uint32
CurrentPassCount: uint32
MatchThread: uint32
CommandSize: uint32
OffsetExpressionSize: uint32struct DEBUG_BREAKPOINT_PARAMETERS
{
ulong Offset;
uint Id;
uint BreakType;
uint ProcType;
uint Flags;
uint DataSize;
uint DataAccessType;
uint PassCount;
uint CurrentPassCount;
uint MatchThread;
uint CommandSize;
uint OffsetExpressionSize;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DEBUG_BREAKPOINT_PARAMETERS サイズ: 56 バイト(x64)
dim st, 14 ; 4byte整数×14(構造体サイズ 56 / 4 切り上げ)
; Offset : ULONGLONG (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; Id : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; BreakType : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ProcType : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; Flags : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; DataSize : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; DataAccessType : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; PassCount : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; CurrentPassCount : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; MatchThread : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; CommandSize : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; OffsetExpressionSize : DWORD (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DEBUG_BREAKPOINT_PARAMETERS
#field int64 Offset
#field int Id
#field int BreakType
#field int ProcType
#field int Flags
#field int DataSize
#field int DataAccessType
#field int PassCount
#field int CurrentPassCount
#field int MatchThread
#field int CommandSize
#field int OffsetExpressionSize
#endstruct
stdim st, DEBUG_BREAKPOINT_PARAMETERS ; NSTRUCT 変数を確保
st->Offset = 100
mes "Offset=" + st->Offset