Changeset 105556 in vbox
- Timestamp:
- Aug 1, 2024 9:59:44 AM (8 weeks ago)
- File:
-
- 1 edited
-
trunk/src/VBox/Debugger/DBGCNtCommands.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Debugger/DBGCNtCommands.cpp
r105538 r105556 75 75 { 76 76 uint64_t Root; /**< Address of the root node (NT_RTL_BALANCED_NODE64). */ 77 uint64_t Min; /**< Address of the left most node (NT_RTL_BALANCED_NODE64). */ 77 /** The address of the left-most node (NT_RTL_BALANCED_NODE64). 78 * Bit 0 is used to indicate 'Encoded', meaning that Left and Right are 79 * XORed with the node address and Min is XORed with the address of this 80 * structure. */ 81 uint64_t Min; 78 82 } NT_RTL_RB_TREE64; 79 83 … … 97 101 int dbgCmdNtRbTreeWorker(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PCDBGCVAR pRootAddr) 98 102 { 103 int rcRet = VINF_SUCCESS; 104 uint32_t cErrors = 0; 99 105 PtrType const fAlignMask = ~(PtrType)(sizeof(PtrType) - 1); 100 106 PtrType const fAlignInfoMask = (PtrType)(sizeof(PtrType) - 1); … … 110 116 DBGCCmdHlpPrintf(pCmdHlp, 111 117 sizeof(PtrType) == sizeof(uint64_t) 112 ? "RB Root %DV: Root=%#016RX64 Min=%#016RX64 \n"113 : "RB Root %DV: Root=%#010RX32 Min=%#010RX32 \n",114 pRootAddr, Root.Root, Root.Min );118 ? "RB Root %DV: Root=%#016RX64 Min=%#016RX64%s\n" 119 : "RB Root %DV: Root=%#010RX32 Min=%#010RX32%s\n", 120 pRootAddr, Root.Root, Root.Min, Root.Min & 1 ? " Encoded=1" : ""); 115 121 if ((Root.Root & fAlignMask) == 0 || (Root.Min & fAlignMask) == 0) 116 122 { … … 120 126 DBGCCmdHlpPrintf(pCmdHlp, "RB Root %DV: Bogus root state!\n", pRootAddr); 121 127 return VINF_SUCCESS; 128 } 129 if (Root.Root & fAlignInfoMask) 130 { 131 rcRet = DBGCCmdHlpFail(pCmdHlp, pCmd, "Misaligned Root pointer: %#RX64", Root.Root); 132 cErrors++; 133 } 134 if ((Root.Min & fAlignInfoMask) > 1) 135 { 136 rcRet = DBGCCmdHlpFail(pCmdHlp, pCmd, "Misaligned Min pointer: %#RX64 (bits 1+ should be zero)", Root.Min); 137 cErrors++; 122 138 } 123 139 … … 153 169 cStackEntries++; 154 170 155 int rcRet = VINF_SUCCESS;156 171 uint8_t cReqBlacks = 0; /**< Number of black nodes required in each path. Set when we reach the left most node. */ 157 172 uint8_t cchMaxDepth = 32; 158 173 uint32_t idxNode = 0; 159 uint32_t cErrors = 0;160 174 while (cStackEntries > 0) 161 175 { … … 222 236 cchMaxDepth = RT_MIN(cReqBlacks * 4, RT_ELEMENTS(aStack) * 2 + 2); 223 237 224 if ( Root.Min!= aStack[idxCurEntry].Ptr)238 if ((Root.Min & ~(PtrType)1) != aStack[idxCurEntry].Ptr) 225 239 { 226 240 rcRet = DBGCCmdHlpFail(pCmdHlp, pCmd,
Note:
See TracChangeset
for help on using the changeset viewer.

