Struct

final class ntoseye.Struct

A reflective cursor: a PDB type bound to an address in an address space.

__getattr__(name: str, /) → Any

Reflective field access. A missing field raises AttributeError.

__getitem__(key: str | int, /) → Any

The field value, or a sibling cursor for an integer index (((T*)p)[i]).

__setattr__(name: str, value: Any, /) → None

cursor.Field = value, which accepts only real PDB fields.

__setitem__(name: str, value: Any, /) → None

Write a PDB field by name.

property addr: int

The address of this cursor.

address_of(name: str) → int

The address of field name, as &cursor->name in C, which a watchpoint or a raw read needs. For a bitfield, this is the address of its storage unit.

cast(type_name: str) → Struct

Use this address as a different PDB type.

follow(name: str) → Struct

Follow a pointer field to its typed target.

read() → dict[str, Any]

Read a snapshot of the full struct into a dictionary, without nested struct fields.

to_dict() → dict[str, Any]
property type: Type

The PDB type of this cursor.

walk(head_field: str, record_type: str, link_field: str) → list[Struct]

Walk a list whose head is a field of this cursor.