crash.types.classdev module¶
The crash.types.classdev module offers helpers to work with class devices.
-
class
crash.types.classdev.ClassdevState[source]¶ Bases:
object-
classmethod
class_is_private() → bool[source]¶ Returns whether the class device uses
struct device_privateMeant to be used only be crash.types.classdev.
-
classmethod
setup_iterator_type(gdbtype: gdb.Type) → None[source]¶ Detect whether to iterate the class list using
struct deviceorstruct device_private.Linux v5.1-rc1 moved
knode_classfromstruct devicetostruct device_private. We need to detect it here to ensure list iteration works properly.Meant to be used as a TypeCallback.
Parameters: gdbtype – The struct devicetype.
-
classmethod
-
crash.types.classdev.for_each_class_device(class_struct: gdb.Value, subtype: gdb.Value = None) → Iterable[gdb.Value][source]¶ Iterate over the list of class devices
Parameters: - class_struct – The class of devices to iterate
- subtype – A
struct device_type *to use to filter the results. The value must be of typestruct device_type *and will be used to compare against thetypefield of eachstruct device.
Yields: gdb.Value– A device on the class’s device list. The value is of typestruct device.