46{
50
51 if (CommandTokens.size() != 1)
52 {
53 ShowMessages("incorrect use of the '%s'\n\n",
56 return;
57 }
58
59
60
61
63 {
65 }
66 else
67 {
69
70
71
72
73 Status = DeviceIoControl(
76 &PcitreePacket,
78 &PcitreePacket,
80
81 &ReturnedLength,
82 NULL
83 );
84
85 if (!Status)
86 {
87 ShowMessages("ioctl failed with code 0x%x\n", GetLastError());
88 return;
89 }
90
92 {
93
94
95
96 ShowMessages("%-12s | %-9s | %-17s | %s \n%s\n", "DBDF", "VID:DID", "Vendor Name", "Device Name", "----------------------------------------------------------------------");
98 {
100 CHAR * CurrentVendorName = (
CHAR *)
"N/A";
101 CHAR * CurrentDeviceName = (
CHAR *)
"N/A";
102
103 if (CurrentVendor != NULL)
104 {
105 CurrentVendorName = CurrentVendor->
VendorName;
107
108 if (CurrentDevice != NULL)
109 {
110 CurrentDeviceName = CurrentDevice->
DeviceName;
111 }
112 }
113
114 ShowMessages("%04x:%02x:%02x:%x | %04x:%04x | %-17.*s | %.*s\n",
115 0,
122 CurrentVendorName,
124 CurrentDeviceName
125
126 );
127
129 }
131 }
132 else
133 {
134
135
136
138 }
139 }
140}
BOOLEAN g_IsSerialConnectedToRemoteDebuggee
Shows if the debugger was connected to remote debuggee over (A remote guest).
Definition globals.h:253
std::string GetCaseSensitiveStringFromCommandToken(CommandToken TargetToken)
Get case sensitive string from command token.
Definition common.cpp:467
BOOLEAN ShowErrorMessage(UINT32 Error)
shows the error message
Definition debugger.cpp:40
BOOLEAN KdSendPcitreePacketToDebuggee(PDEBUGGEE_PCITREE_REQUEST_RESPONSE_PACKET PcitreePacket)
Sends '!pcitree' command, including buffer, to the debuggee.
Definition kd.cpp:3592
HANDLE g_DeviceHandle
Holds the global handle of device which is used to send the request to the kernel by IOCTL,...
Definition globals.h:481
BOOLEAN g_IsKdModuleLoaded
shows whether the kernel debugger (KD) module is loaded or not
Definition globals.h:22
Device * GetDeviceFromVendor(Vendor *VendorToUse, UINT16 DeviceId)
Returns Device entry corresponding to DeviceId.
Definition pci-id.cpp:339
Vendor * GetVendorById(UINT16 VendorId)
Returns Vendor entry, including corresponding devices and subdevices.
Definition pci-id.cpp:305
VOID FreePciIdDatabase()
Frees PciIdDatabaseBuffer.
Definition pci-id.cpp:288
VOID FreeVendor(Vendor *VendorToFree)
Frees Vendor and all of its members.
Definition pci-id.cpp:260
#define PCI_NAME_STR_LENGTH
Definition pci-id.h:15
VOID CommandPcitreeHelp()
help of the !pcitree command
Definition pcitree.cpp:26
UINT8 DeviceInfoListNum
Definition RequestStructures.h:1649
UINT32 KernelStatus
Definition RequestStructures.h:1648
PCI_DEV_MINIMAL DeviceInfoList[DEV_MAX_NUM]
Definition RequestStructures.h:1650
PORTABLE_PCI_CONFIG_SPACE_HEADER_MINIMAL ConfigSpace
Definition Pcie.h:137
UINT8 Bus
Definition Pcie.h:134
UINT8 Function
Definition Pcie.h:136
UINT8 Device
Definition Pcie.h:135
UINT16 VendorId
Definition Pcie.h:123
UINT16 DeviceId
Definition Pcie.h:124
CHAR DeviceName[PCI_NAME_STR_LENGTH]
Definition pci-id.h:28
CHAR VendorName[PCI_NAME_STR_LENGTH]
Definition pci-id.h:36