- Timestamp:
- Mar 3, 2014 11:55:01 AM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 92596
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Debugger/DBGPlugInLinux.cpp
r44528 r50665 198 198 DBGFR3AddrFromFlat(pUVM, &KernelAddr, g_au64LnxKernelAddresses[i]); 199 199 DBGFADDRESS HitAddr; 200 static const uint8_t s_abLinuxVersion [] = "Linux version 2.";200 static const uint8_t s_abLinuxVersion2x[] = "Linux version 2."; 201 201 int rc = DBGFR3MemScan(pUVM, 0, &KernelAddr, LNX_MAX_KERNEL_SIZE, 1, 202 s_abLinuxVersion , sizeof(s_abLinuxVersion) - 1, &HitAddr);202 s_abLinuxVersion2x, sizeof(s_abLinuxVersion2x) - 1, &HitAddr); 203 203 if (RT_SUCCESS(rc)) 204 204 { 205 205 char szTmp[128]; 206 char const *pszY = &szTmp[sizeof(s_abLinuxVersion ) - 1];206 char const *pszY = &szTmp[sizeof(s_abLinuxVersion2x) - 1]; 207 207 rc = DBGFR3MemReadString(pUVM, 0, &HitAddr, szTmp, sizeof(szTmp)); 208 208 if ( RT_SUCCESS(rc) 209 209 && *pszY >= '0' 210 210 && *pszY <= '6') 211 { 212 pThis->AddrKernelBase = KernelAddr; 213 pThis->AddrLinuxBanner = HitAddr; 214 return true; 215 } 216 } 217 static const uint8_t s_abLinuxVersion3x[] = "Linux version 3."; 218 rc = DBGFR3MemScan(pUVM, 0, &KernelAddr, LNX_MAX_KERNEL_SIZE, 1, 219 s_abLinuxVersion3x, sizeof(s_abLinuxVersion3x) - 1, &HitAddr); 220 if (RT_SUCCESS(rc)) 221 { 222 char szTmp[128]; 223 char const *pszY = &szTmp[sizeof(s_abLinuxVersion3x) - 1]; 224 rc = DBGFR3MemReadString(pUVM, 0, &HitAddr, szTmp, sizeof(szTmp)); 225 if ( RT_SUCCESS(rc) 226 && *pszY >= '0' 227 && *pszY <= '9') 211 228 { 212 229 pThis->AddrKernelBase = KernelAddr;
Note:
See TracChangeset
for help on using the changeset viewer.