Changeset 84989 in vbox for trunk/src/VBox/Debugger
- Timestamp:
- Jun 29, 2020 11:12:40 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Debugger/DBGPlugInLinux.cpp
r84988 r84989 293 293 /** @todo Go back to find the start address of the kernel log (or we loose potential kernel log messages). */ 294 294 295 if (RT_SUCCESS(rc)) 295 if ( RT_SUCCESS(rc) 296 && cbLogBuf) 296 297 { 297 298 /* Align log buffer size to a power of two. */ 298 if (cbLogBuf && !RT_IS_POWER_OF_TWO(cbLogBuf)) 299 { 300 uint32_t i = 0; 301 302 while (cbLogBuf) 303 { 304 cbLogBuf >>= 1; 305 i++; 306 } 307 308 cbLogBuf = 1 << i; 309 } 299 uint32_t idxBitLast = ASMBitLastSetU32(cbLogBuf); 300 idxBitLast--; /* There is at least one bit set, see check above. */ 301 302 if (cbLogBuf & (RT_BIT_32(idxBitLast) - 1)) 303 idxBitLast++; 310 304 311 305 *pGCPtrLogBuf = AddrHit.FlatPtr; 312 *pcbLogBuf = RT_MIN(cbLogBuf, LNX_MAX_KERNEL_LOG_SIZE); 313 } 306 *pcbLogBuf = RT_MIN(RT_BIT_32(idxBitLast), LNX_MAX_KERNEL_LOG_SIZE); 307 } 308 else if (RT_SUCCESS(rc)) 309 rc = VERR_NOT_FOUND; 314 310 } 315 311
Note:
See TracChangeset
for help on using the changeset viewer.