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