ホーム › System.Diagnostics.Debug.Extensions › DEBUG_SYMBOL_PARAMETERS
DEBUG_SYMBOL_PARAMETERS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Module | ULONGLONG | 8 | +0 | +0 | シンボルが属するモジュールの基底アドレス。 |
| TypeId | DWORD | 4 | +8 | +8 | シンボルの型を識別するID。 |
| ParentSymbol | DWORD | 4 | +12 | +12 | 親シンボルのインデックス。なければ無効値。 |
| SubElements | DWORD | 4 | +16 | +16 | このシンボルが持つ子要素(メンバ)の数。 |
| Flags | DWORD | 4 | +20 | +20 | シンボルの属性フラグ(DEBUG_SYMBOL_*)。 |
| Reserved | ULONGLONG | 8 | +24 | +24 | 予約フィールド(エンジン内部用)。 |
各言語での定義
#include <windows.h>
// DEBUG_SYMBOL_PARAMETERS (x64 32 / x86 32 バイト)
typedef struct DEBUG_SYMBOL_PARAMETERS {
ULONGLONG Module;
DWORD TypeId;
DWORD ParentSymbol;
DWORD SubElements;
DWORD Flags;
ULONGLONG Reserved;
} DEBUG_SYMBOL_PARAMETERS;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DEBUG_SYMBOL_PARAMETERS
{
public ulong Module;
public uint TypeId;
public uint ParentSymbol;
public uint SubElements;
public uint Flags;
public ulong Reserved;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DEBUG_SYMBOL_PARAMETERS
Public Module As ULong
Public TypeId As UInteger
Public ParentSymbol As UInteger
Public SubElements As UInteger
Public Flags As UInteger
Public Reserved As ULong
End Structureimport ctypes
from ctypes import wintypes
class DEBUG_SYMBOL_PARAMETERS(ctypes.Structure):
_fields_ = [
("Module", ctypes.c_ulonglong),
("TypeId", wintypes.DWORD),
("ParentSymbol", wintypes.DWORD),
("SubElements", wintypes.DWORD),
("Flags", wintypes.DWORD),
("Reserved", ctypes.c_ulonglong),
]#[repr(C)]
pub struct DEBUG_SYMBOL_PARAMETERS {
pub Module: u64,
pub TypeId: u32,
pub ParentSymbol: u32,
pub SubElements: u32,
pub Flags: u32,
pub Reserved: u64,
}import "golang.org/x/sys/windows"
type DEBUG_SYMBOL_PARAMETERS struct {
Module uint64
TypeId uint32
ParentSymbol uint32
SubElements uint32
Flags uint32
Reserved uint64
}type
DEBUG_SYMBOL_PARAMETERS = record
Module: UInt64;
TypeId: DWORD;
ParentSymbol: DWORD;
SubElements: DWORD;
Flags: DWORD;
Reserved: UInt64;
end;const DEBUG_SYMBOL_PARAMETERS = extern struct {
Module: u64,
TypeId: u32,
ParentSymbol: u32,
SubElements: u32,
Flags: u32,
Reserved: u64,
};type
DEBUG_SYMBOL_PARAMETERS {.bycopy.} = object
Module: uint64
TypeId: uint32
ParentSymbol: uint32
SubElements: uint32
Flags: uint32
Reserved: uint64struct DEBUG_SYMBOL_PARAMETERS
{
ulong Module;
uint TypeId;
uint ParentSymbol;
uint SubElements;
uint Flags;
ulong Reserved;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DEBUG_SYMBOL_PARAMETERS サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; Module : ULONGLONG (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; TypeId : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ParentSymbol : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; SubElements : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; Flags : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; Reserved : ULONGLONG (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DEBUG_SYMBOL_PARAMETERS
#field int64 Module
#field int TypeId
#field int ParentSymbol
#field int SubElements
#field int Flags
#field int64 Reserved
#endstruct
stdim st, DEBUG_SYMBOL_PARAMETERS ; NSTRUCT 変数を確保
st->Module = 100
mes "Module=" + st->Module