Python API¶
The ntoseye package’s API, generated from the type stub the package
ships. For how the pieces fit together, see the SDK guide.
Module ntoseye¶
- ntoseye.build: Final[str]¶
The git commit of this extension build (
<commit>,<commit>-dirty, orunknown). Use it to find a stale extension in a long-lived interpreter.
- ntoseye.attach(backend: Literal['kd', 'kdnet', 'gdb', 'memory', 'dmp'] = ..., connect: str | None = None, key: str | None = None, memory_source: Literal['auto', 'host', 'kd'] = ..., *, kd_handshake_timeout: 'int | None' = None) Debugger¶
Attach to a guest and return a
Debugger.backendis one of"kd"(default),"kdnet","gdb","memory", or"dmp".connectis the backend target: a socket path or address for kd/kdnet/gdb, or the dump file path for dmp: a kernel crash dump, or a Windows user-mode minidump, whose process and threadsDebugger.user_dumpholds. Withoutconnect, the function uses the default of the backend, but dmp has no default and needs a path. kdnet needskey.memory_sourceisauto,host, orkdfor KD/KDNET.kd_handshake_timeoutis keyword-only: positive integer seconds for the initial KD/KDNET handshake. It overridesNTOSEYE_KD_TIMEOUT;Noneuses the environment variable or the 8-second default. Other backends reject it.For kd/kdnet/gdb, the function takes an instance lock for the target before it makes the backend, so a second live attach to the same target fails immediately without interfering with the handshake that the first session owns. The memory and dmp backends are passive.
Module ntoseye.repl¶
REPL command scripting helpers for ntoseye.
Command scripts in ~/.ntoseye/commands/ import this module. Inside the
REPL (the ntoseye command that this package installs, or a build with
embedded Python), register_command is the REPL’s own function. Anywhere
else it raises an exception, so a command script that runs outside the REPL
fails with a clear error.
Debugger is re-exported from ntoseye; a command receives a borrowed ntoseye.Debugger.
- ntoseye.repl.register_command(name: str, help: str, fn: Callable[..., Any], strategies: list[str] | None = None) None¶
Register a REPL command that the REPL calls as
fn(dbg, *raw_args), wheredbgis a borrowedDebuggerthat is valid only until the command returns.
- ntoseye.repl.command(name: str, help: str, **completions: _Completion) Callable[[_F], _F]¶
Decorator form of
register_command. Keyword arguments bind completion markers to the parameters of the command by name.dbg(the first parameter) is a borrowedDebuggerthat is valid only until the command returns.
- ntoseye.repl.Process¶
Completion marker: binds a command parameter to process completion in
command(..., param=Process).
- ntoseye.repl.Symbol¶
Completion marker: binds a command parameter to symbol completion in
command(..., param=Symbol).
- ntoseye.repl.Expression¶
Completion marker: binds a command parameter to expression completion in
command(..., param=Expression).
- ntoseye.repl.Type¶
Completion marker: binds a command parameter to type completion in
command(..., param=Type).
- ntoseye.repl.Driver¶
Completion marker: binds a command parameter to driver completion in
command(..., param=Driver).
- ntoseye.repl.Thread¶
Completion marker: binds a command parameter to thread completion in
command(..., param=Thread).
- ntoseye.repl.Vcpu¶
Completion marker: binds a command parameter to vcpu completion in
command(..., param=Vcpu).
- ntoseye.repl.Breakpoint¶
Completion marker: binds a command parameter to breakpoint completion in
command(..., param=Breakpoint).
- ntoseye.repl.Alias¶
Completion marker: binds a command parameter to alias completion in
command(..., param=Alias).
- ntoseye.repl.RegistryKey¶
Completion marker: binds a command parameter to registry-key completion in
command(..., param=RegistryKey).
Classes¶
- BaseRecord
- Breakpoint
- Breakpoints
- Cpu
- Cpus
- Debugger
- Device
- Diagnostic
- Driver
- Drivers
- Exceptions
- Frame
- Heap
- Heaps
- HypercallCaller
- HypervisorPartition
- HypervisorVtl
- Inspect
- Memory
- MemoryAccessError
- Module
- Modules
- Msrs
- NtoseyeError
- Process
- Processes
- Regions
- Registers
- SecureKernel
- StaleHandleError
- Struct
- SymbolNotFoundError
- Symbols
- TargetRunningError
- Thread
- Threads
- Trustlet
- Type
- Types
- UserDump
- UserProcess
- UserThread
- UserThreads
- VirtualProcessor
Results¶
What the inspect methods and other decodings return: records whose
properties type each field. to_dict() gives the same shape as the MCP
server’s JSON.
- Ace
- Acl
- AddressDescription
- AddressModule
- AddressSummary
- AlpcClientPort
- AlpcConnection
- AlpcField
- AlpcMessage
- AlpcOwnedPort
- AlpcPort
- AlpcProcessPorts
- AlpcQueue
- Amd64TrapFrame
- Amd64UnwindCode
- Amd64UnwindInfo
- Apc
- ApcQueues
- ApcSelector
- ApcThread
- ApicIcr
- ApicLvt
- Arm64EpilogScope
- Arm64PackedUnwind
- Arm64TrapFrame
- Arm64UnwindCode
- Arm64XdataUnwind
- AttachedDevice
- BackendCapability
- BigPoolDetail
- BlackboxFinding
- BlackboxState
- BlockedIrp
- BlockMatch
- BootStatus
- BreakpointCommands
- BreakpointHit
- BreakpointInfo
- BsdErrorInfo
- BugcheckAnalysis
- BugcheckArg
- BugcheckDecoding
- BugcheckFault
- BugcheckInfo
- BugcheckTrapFrame
- CacheAttribute
- CachedFile
- CallTrace
- CallTraceFrame
- CapturedRange
- CapturedStack
- CellLocation
- ClassDevice
- ClassDeviceDetail
- ClassDevices
- ClassError
- ClassTransferPacket
- ClassUnreadable
- CodeOwner
- CodeView
- ControlAreaDetail
- CpuFeatureBits
- CpuInfo
- CpuTriageFallback
- CriticalSection
- CriticalSections
- CulpritAttribution
- CulpritEvidence
- CulpritSubject
- DataDirectory
- DebugLine
- DebugOutputPage
- DebugRecord
- DecodedHypercall
- DescriptorRegister
- DeviceDriver
- DeviceNotifyState
- DeviceObjectDetail
- DevicePower
- DeviceStackDetail
- DeviceStackEntry
- DevNodeDetail
- DevNodePower
- DevNodeSummary
- DisasmOperand
- DisasmRow
- DmpException
- DmpSystemInfo
- Dpc
- DpcQueue
- DpcQueues
- DriverDeviceLink
- DriverObjectDetail
- DriverObjectInfo
- DriverQueueState
- DumpWrite
- DynamicCodeCulprit
- EptDifference
- EptMapping
- ErrorCode
- EtwBuffer
- EtwBufferIssue
- EtwDumpData
- EtwDumpLogger
- EtwEvent
- EtwEventClass
- EtwEventDescriptor
- EtwEventDump
- EtwExtendedItem
- EtwLogFile
- EtwLogger
- EtwLoggerBuffers
- EtwLoggerTable
- EtwLogSave
- EtwMessage
- EtwMessageFormat
- EtwRecord
- EventPolicies
- ExceptionParameter
- ExceptionPolicy
- ExceptionRecord
- ExceptionStop
- ExecutiveResource
- ExitFilter
- ExportDirectory
- FailureSignature
- FieldInfo
- FileCacheDetail
- FileHeader
- FileObject
- FindStack
- FindStackThread
- FltFilterDetail
- FltFilterFrame
- FltFilters
- FltInstanceDetail
- FltInstanceFrame
- FltInstances
- FltVolumeDetail
- FltVolumeFrame
- FltVolumes
- FunctionDisassembly
- FunctionEntry
- Gdt
- GdtDescriptor
- GlobalFlag
- GlobalFlags
- GlobalFlagUpdate
- HalController
- HalControllers
- HalLine
- HalLineRange
- HalUnreadable
- HandleEntry
- HandleEventInfo
- HandleMutantInfo
- HandleOtherInfo
- HandleProcessInfo
- HandleSectionInfo
- HandleSemaphoreInfo
- HandleTable
- HandleThreadInfo
- HandleTrace
- HandleTraceFrame
- HandleTraces
- HangProcessor
- HangReport
- HangThread
- HeapBlock
- HeapBlockSearch
- HeapDetail
- HeapIdentity
- HeapInfo
- HeapStats
- HeapWalkStop
- Hive
- HiveList
- HvPartition
- HvProcessor
- HvVirtualProcessor
- HvVtl
- Hypercall
- HypercallCallerInfo
- HypercallElement
- HypercallField
- HypercallFilter
- IdleDetection
- Idt
- IdtGate
- IfrEnd
- IfrRecord
- ImageByteDiff
- ImageCheck
- ImageExports
- ImageHeaders
- ImageMismatchRange
- ImageSectionCheck
- ImageSelfPatchCounts
- ImageSelfPatchRange
- ImportDescriptor
- ImportEntry
- IndirectTable
- IoIntercepts
- IoStackLocationInfo
- IoWorkItem
- IpiField
- IpiProcessor
- IpiRequest
- IpiState
- IrpDispatchRoutine
- IrpFindCriteria
- IrpFindDetail
- IrpFindEntry
- IrpHit
- IrpHolder
- IrpInfo
- Irql
- Job
- JobAccounting
- JobLimits
- KernelTimer
- KmdfLogFinding
- KtrapFrame
- LargeAllocation
- LastError
- LastError32
- LfhSubsegment
- ListTermination
- LoaderListHead
- LoaderLists
- LoaderModule
- LoaderModules
- LocalApic
- LocalVariableLocation
- LookasideDetail
- LookasideListsDetail
- MdlDetail
- MemoryBasicInformation
- MemoryRegion
- MemoryRegionInfo
- MemorySearchMatch
- MinidumpWrite
- ModuleEventPolicy
- ModuleExportInfo
- ModuleImageInfo
- ModuleInfo
- ModuleListing
- ModuleSymbolDiagnostic
- ModuleSymbolLoadReport
- ModuleSymbols
- MsrIntercepts
- MsrRange
- NdisDriver
- NdisDriverList
- NdisFilter
- NdisFilterDetail
- NdisFilterDriver
- NdisFilterDriverDetail
- NdisFilterDriverList
- NdisFilterList
- NdisMinidriver
- NdisMiniport
- NdisMiniportDetail
- NdisMiniportList
- NdisNbl
- NdisNblChain
- NdisNetBuffer
- NdisOidRequest
- NdisOpen
- NdisPendingOid
- NdisPendingOids
- NdisProtocol
- NdisProtocolBinding
- NdisProtocolDetail
- NdisProtocolList
- NdisUnreadable
- NonResident
- Notice
- NotifyCallback
- NtEntry
- NtEntryDetail
- NtfsRecord
- NtHeap
- NtHeapDetail
- NtSegment
- NtSegmentDetail
- NtUncommittedRange
- NtUserBlocks
- NtVirtualBlock
- ObjectDetail
- ObjectDirectoryEntry
- ObjectHeaderDetail
- ObjectSecurity
- OptionalHeader
- PackedQueueState
- PackedRing
- PageLocation
- PageRange
- PageSegment
- PartitionFilter
- PciBar
- PciBuses
- PciCapability
- PciFunction
- PciHeader
- PciRecord
- PciScan
- PciTree
- PciTreeBus
- PciTreeDevice
- PciTreeSegment
- Pcr
- Peb
- Peb32
- PfnDetail
- PfnSelector
- Place
- PnpBlackbox
- PnpTriageDetail
- PoolBlockDetail
- PoolFindDetail
- PoolFindMatch
- PoolFindRange
- PoolPageDetail
- PoolProblem
- PoolRegionDetail
- PoolTag
- PoolUsageDetail
- PoolUsageRow
- PoolValidationDetail
- PortRange
- PowerAction
- PowerActionDetail
- PowerButton
- PowerCulprit
- PowerEnum
- PowerFailure
- PowerFailureFinding
- PowerFailureThread
- PowerIrp
- PowerIrpEntry
- PowerIrpList
- PowerState
- PowerThreadRole
- PowerTransition
- PowerWorker
- PowerWorkerEntry
- PowerWorkerList
- Prcb
- ProcedureLocal
- ProcessDetail
- ProcessInfo
- ProcessMemoryUsage
- ProcessorError
- ProcessorStateArea
- ProcessParameters
- PteAttributes
- PteLevel
- PteWalk
- PtovDetail
- PtovMapping
- QueuedLock
- QueuedLockHolder
- QueuedLocks
- QueueProgress
- RcdrDriver
- RcdrDriverList
- RcdrEntry
- RcdrLog
- RcdrLogDump
- RcdrLogs
- RcdrPartition
- RcdrUnreadable
- RcdrWalkEnd
- ReadyQueue
- ReadyQueues
- ReadyThread
- RegisterValue
- RegistryCellError
- RegistryUnreadable
- RegKey
- RegLink
- RegSubkey
- RegValue
- ReloadStop
- ResourceList
- ResourceOwner
- RunningProcessor
- RunningProcessors
- RunStatus
- RuntimeFunction
- SavedVtl
- SchedulerError
- Section
- SectionHeader
- SecurityDescriptor
- SegContext
- SegmentContextDetail
- SegmentDetail
- SegmentHeap
- SegmentHeapDetail
- SegmentKeys
- SegmentPageDetail
- SegmentRangeDetail
- ServedVp
- Session
- SessionProcess
- SessionProcesses
- Sessions
- Sid
- SidAndAttributes
- Signal
- SmbiosField
- SmbiosStructure
- SmbiosTable
- SourceLocation
- SourcePath
- SpecialRegistersArea
- SplitRing
- Srb
- SrbExData
- SsdtEntry
- SsdtTable
- StackFrame
- StateHistoryEntry
- Stop
- StorAdapter
- StorAdapterEntry
- StorDriver
- StorDrivers
- StorEnumValue
- StorGateway
- StorLog
- StorLogEntry
- StorQueue
- StorRequest
- StorUnit
- StorUnitEntry
- SubsectionDetail
- SummaryRow
- Symbol
- SymbolCandidate
- SymbolPath
- SymbolSearchMatch
- SystemMemorySummary
- SystemPteRun
- SystemPtesDetail
- SystemPteTypeDetail
- TaggedBlock
- TargetDump
- TargetKernel
- TargetTime
- TargetUserDump
- TargetVersion
- Teb
- Teb32
- ThreadDetail
- ThreadInfo
- ThreadStack
- ThreadStacks
- ThreadTime
- ThreadTimes
- TimerBucketEnd
- TimerTable
- TimerTableEntry
- Token
- TokenPrivilege
- TransitionExtension
- TriageCrashInfo
- TriagePrcbInfo
- TriageReport
- TrustletInfo
- UniqStackGroup
- UniqStacks
- UniqStackScope
- UnloadedDriver
- UnloadedModule
- UnwalkedThread
- UnwindHandler
- UserAddressReport
- UserDumpTime
- UserDumpTriage
- UserException
- UserExceptionDetail
- UserExceptionFinding
- UserFrame
- UserHandle
- UserProcessInfo
- UserProcessSummary
- UserRegion
- UserStackThread
- UserThreadInfo
- UserThreadTimes
- VcpuInfo
- Verifier
- VerifierAddress
- VerifierArgument
- VerifierDriver
- VerifierDriverSummary
- VerifierFinding
- VerifierStatistics
- VerifierSuspectDriver
- VirtioBuffer
- VirtioDescriptor
- VirtioDriver
- VirtioFunction
- VirtioRing
- VirtQueue
- VmCounter
- VmDetail
- VmPoolDetail
- VmPteDetail
- VpbDetail
- VpRegisters
- VsChunk
- VsSubsegment
- VtopDetail
- WdfCallback
- WdfClient
- WdfContext
- WdfDeviceDetail
- WdfDriverDevice
- WdfDriverInfo
- WdfDumpDriver
- WdfEnumValue
- WdfIoParameters
- WdfIoTargetDetail
- WdfIoTargetSummary
- WdfIrpLocation
- WdfLoader
- WdfLogDump
- WdfLogEntry
- WdfObject
- WdfObjectDetail
- WdfObjectRef
- WdfQueueDetail
- WdfQueueSummary
- WdfRequestDetail
- WdfRequestIrp
- WdfRequestRef
- WdfTargetRequest
- WdfVersion
- WheaFinding
- WheaRecord
- WheaRecordState
- WheaSection
- WinlogonBlackbox
- WorkerThread
- WorkItem
- WorkQueue
- WorkQueuePriority
- WorkQueues
- ZombieKinds
- ZombieProcess
- Zombies
- ZombieThread