mirror of
https://github.com/reactos/reactos.git
synced 2024-11-01 12:26:32 +00:00
7db342f8a1
Useful functions for debugging IO and PNP managers: PipDumpDeviceNodes() - displays information about a node(s) in the device tree; PipDumpResourceRequirementsList() - displays information about a Io List; PipDumpCmResourceList() - displays information about a Cm List The tree list of devices (DEVICE_NODE structures) is perhaps the main one in the PnP manager. They also store information about the hardware resources required and assigned to devices. These functions can help with debugging. For example, you can call PipDumpDeviceNodes() before and after device enumeration and compare the resulting information. For PipDumpDeviceNodes() it is possible to optionally output: - allocated resources and boot configuration resources - resources required - translated resources It is possible to displays both a single node and the entire tree. Optionally, you can display child nodes. The information output format for resource lists is maximally compressed, since often the only debugging port is a monitor. The DebugLevel parameter allows dumping in two modes: 0 - unconditional; 1 - if NDEBUG is not defined in "debug.c".
55 lines
968 B
C
55 lines
968 B
C
#ifndef _PNPIO_H
|
|
#define _PNPIO_H
|
|
|
|
/* Dump resources flags */
|
|
#define PIP_DUMP_FL_ALL_NODES 1
|
|
#define PIP_DUMP_FL_RES_ALLOCATED 2
|
|
#define PIP_DUMP_FL_RES_REQUIREMENTS 4
|
|
#define PIP_DUMP_FL_RES_TRANSLATED 8
|
|
|
|
/* debug.c */
|
|
|
|
VOID
|
|
NTAPI
|
|
PipDumpCmResourceList(
|
|
_In_ PCM_RESOURCE_LIST CmResource,
|
|
_In_ ULONG DebugLevel
|
|
);
|
|
|
|
PCM_PARTIAL_RESOURCE_DESCRIPTOR
|
|
NTAPI
|
|
PipGetNextCmPartialDescriptor(
|
|
_In_ PCM_PARTIAL_RESOURCE_DESCRIPTOR CmDescriptor
|
|
);
|
|
|
|
VOID
|
|
NTAPI
|
|
PipDumpCmResourceDescriptor(
|
|
_In_ PCM_PARTIAL_RESOURCE_DESCRIPTOR Descriptor,
|
|
_In_ ULONG DebugLevel
|
|
);
|
|
|
|
VOID
|
|
NTAPI
|
|
PipDumpResourceRequirementsList(
|
|
_In_ PIO_RESOURCE_REQUIREMENTS_LIST IoResource,
|
|
_In_ ULONG DebugLevel
|
|
);
|
|
|
|
VOID
|
|
NTAPI
|
|
PipDumpIoResourceDescriptor(
|
|
_In_ PIO_RESOURCE_DESCRIPTOR Descriptor,
|
|
_In_ ULONG DebugLevel
|
|
);
|
|
|
|
VOID
|
|
NTAPI
|
|
PipDumpDeviceNodes(
|
|
_In_ PDEVICE_NODE DeviceNode,
|
|
_In_ ULONG Flags,
|
|
_In_ ULONG DebugLevel
|
|
);
|
|
|
|
#endif /* _PNPIO_H */
|