SplitScript reference / Module / peDebugId
Module.peDebugId
Method
Module.peDebugId() -> PeDebugId?!
Reads the GUID and age of a Windows PE module's PDB 7.0 debug record.
Supports PE32 and PE32+. A valid image without a debug directory, with no CodeView record, or with only older CodeView formats returns None. Invalid headers, truncated records, failed reads, and out-of-image addresses return an error. Both the mapped extent and SizeOfImage bound the walk. At most 4096 debug entries are examined per call. Records use their mapped RVA, never their on-disk file offset.
Effects: reads process memory, requires an attached process
Runtime behavior: available while a process is attached, except in onDetach; synchronous
Examples
Inspect a Mono build before selecting its measured layout
let runtime = await process.module("mono-2.0-bdwgc.dll")
let build = runtime.peDebugId() else return
match build {
Some(identity) => print(identity),
None => print("no PDB identity"),
}