Changeset 62840 in vbox for trunk/src/VBox
- Timestamp:
- Aug 1, 2016 5:15:19 PM (8 years ago)
- Location:
- trunk/src/VBox/Debugger
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Debugger/DBGPlugInCommonELFTmpl.cpp.h
r62480 r62840 251 251 { 252 252 /* Add the segments and fill in the translation table. */ 253 RTGCPTR uRvaNext = 0;254 253 for (unsigned i = 0; i < cSegs; i++) 255 254 if (paShdrs[i].sh_flags & SHF_ALLOC) -
trunk/src/VBox/Debugger/DBGPlugInLinux.cpp
r62480 r62840 372 372 bool fRet = false; 373 373 DISSTATE DisState; 374 unsigned idxAddressesUsed = 0;374 unsigned cAddressesUsed = 0; 375 375 struct { size_t cb; RTGCPTR GCPtrOrigSrc; } aAddresses[5]; 376 376 RT_ZERO(DisState); … … 420 420 { 421 421 RTGCPTR GCPtrLogBuf = 0; 422 size_t cbLogBuf = 0;422 uint32_t cbLogBuf = 0; 423 423 424 424 /* … … 427 427 * For the log size look for the biggest non kernel address. 428 428 */ 429 for (unsigned i = 0; i < idxAddressesUsed; i++)429 for (unsigned i = 0; i < cAddressesUsed; i++) 430 430 { 431 431 DBGFADDRESS AddrVal; … … 514 514 AssertMsgFailedBreakStmt(("Invalid displacement\n"), rc = VERR_INVALID_STATE); 515 515 516 if ( idxAddressesUsed < RT_ELEMENTS(aAddresses))516 if (cAddressesUsed < RT_ELEMENTS(aAddresses)) 517 517 { 518 518 /* movsxd reads always 32bits. */ 519 519 if (DisState.pCurInstr->uOpcode == OP_MOVSXD) 520 aAddresses[ idxAddressesUsed].cb = sizeof(uint32_t);520 aAddresses[cAddressesUsed].cb = sizeof(uint32_t); 521 521 else 522 aAddresses[ idxAddressesUsed].cb = DisState.Param2.cb;523 aAddresses[ idxAddressesUsed].GCPtrOrigSrc = GCPtrVal;524 idxAddressesUsed++;522 aAddresses[cAddressesUsed].cb = DisState.Param2.cb; 523 aAddresses[cAddressesUsed].GCPtrOrigSrc = GCPtrVal; 524 cAddressesUsed++; 525 525 } 526 526 else … … 564 564 int rc = VINF_SUCCESS; 565 565 566 struct { void *pvVar; size_t cbHost, cbGuest; const char *pszSymbol; } aSymbols[] =566 struct { void *pvVar; uint32_t cbHost, cbGuest; const char *pszSymbol; } aSymbols[] = 567 567 { 568 568 { pGCPtrLogBuf, sizeof(RTGCPTR), pThis->f64Bit ? sizeof(uint64_t) : sizeof(uint32_t), "log_buf_addr_get" }, … … 574 574 Assert(aSymbols[i].cbHost >= aSymbols[i].cbGuest); 575 575 rc = dbgDiggerLinuxDisassembleSimpleGetter(pThis, pUVM, hMod, aSymbols[i].pszSymbol, 576 aSymbols[i].pvVar, 576 aSymbols[i].pvVar, aSymbols[i].cbGuest); 577 577 } 578 578 … … 622 622 char *pszBuf, size_t cbBuf, size_t *pcbActual) 623 623 { 624 RT_NOREF2(fFlags, cMessages); 624 625 int rc = VINF_SUCCESS; 625 626 RTGCPTR GCPtrLogBuf; … … 735 736 char *pszBuf, size_t cbBuf, size_t *pcbActual) 736 737 { 738 RT_NOREF1(fFlags); 737 739 int rc = VINF_SUCCESS; 738 740 RTGCPTR GCPtrLogBuf; … … 1048 1050 static DECLCALLBACK(void *) dbgDiggerLinuxQueryInterface(PUVM pUVM, void *pvData, DBGFOSINTERFACE enmIf) 1049 1051 { 1052 RT_NOREF1(pUVM); 1050 1053 PDBGDIGGERLINUX pThis = (PDBGDIGGERLINUX)pvData; 1051 1054 switch (enmIf) … … 1093 1096 static DECLCALLBACK(void) dbgDiggerLinuxTerm(PUVM pUVM, void *pvData) 1094 1097 { 1098 RT_NOREF1(pUVM); 1095 1099 PDBGDIGGERLINUX pThis = (PDBGDIGGERLINUX)pvData; 1096 1100 Assert(pThis->fValid); … … 1729 1733 * @param cbNeedle Size of the needle in bytes. 1730 1734 */ 1731 static int dbgDiggerLinuxFindSymbolTableFromNeedle(PDBGDIGGERLINUX pThis, PUVM pUVM, uint8_t const *pabNeedle, size_t cbNeedle)1735 static int dbgDiggerLinuxFindSymbolTableFromNeedle(PDBGDIGGERLINUX pThis, PUVM pUVM, uint8_t const *pabNeedle, uint8_t cbNeedle) 1732 1736 { 1733 1737 int rc = VINF_SUCCESS; … … 2275 2279 static DECLCALLBACK(void) dbgDiggerLinuxDestruct(PUVM pUVM, void *pvData) 2276 2280 { 2277 2281 RT_NOREF2(pUVM, pvData); 2278 2282 } 2279 2283 … … 2284 2288 static DECLCALLBACK(int) dbgDiggerLinuxConstruct(PUVM pUVM, void *pvData) 2285 2289 { 2290 RT_NOREF1(pUVM); 2286 2291 PDBGDIGGERLINUX pThis = (PDBGDIGGERLINUX)pvData; 2287 2292 pThis->IDmesg.u32Magic = DBGFOSIDMESG_MAGIC; -
trunk/src/VBox/Debugger/DBGPlugInOS2.cpp
r62480 r62840 110 110 uint8_t *pbBuf, size_t cbBuf) 111 111 { 112 RT_NOREF7(pThis, pUVM, pszName, pImageAddr, cbImage, pbBuf, cbBuf); 112 113 LogFlow(("DigOS2: %RGp %#x %s\n", pImageAddr->FlatPtr, cbImage, pszName)); 113 114 … … 121 122 static DECLCALLBACK(void *) dbgDiggerOS2QueryInterface(PUVM pUVM, void *pvData, DBGFOSINTERFACE enmIf) 122 123 { 124 RT_NOREF3(pUVM, pvData, enmIf); 123 125 return NULL; 124 126 } … … 130 132 static DECLCALLBACK(int) dbgDiggerOS2QueryVersion(PUVM pUVM, void *pvData, char *pszVersion, size_t cchVersion) 131 133 { 134 RT_NOREF1(pUVM); 132 135 PDBGDIGGEROS2 pThis = (PDBGDIGGEROS2)pvData; 133 136 Assert(pThis->fValid); … … 174 177 static DECLCALLBACK(void) dbgDiggerOS2Term(PUVM pUVM, void *pvData) 175 178 { 179 RT_NOREF1(pUVM); 176 180 PDBGDIGGEROS2 pThis = (PDBGDIGGEROS2)pvData; 177 181 Assert(pThis->fValid); … … 321 325 static DECLCALLBACK(void) dbgDiggerOS2Destruct(PUVM pUVM, void *pvData) 322 326 { 323 327 RT_NOREF2(pUVM, pvData); 324 328 } 325 329 … … 330 334 static DECLCALLBACK(int) dbgDiggerOS2Construct(PUVM pUVM, void *pvData) 331 335 { 336 RT_NOREF1(pUVM); 332 337 PDBGDIGGEROS2 pThis = (PDBGDIGGEROS2)pvData; 333 338 pThis->fValid = false; -
trunk/src/VBox/Debugger/DBGPlugInSolaris.cpp
r62480 r62840 359 359 static DECLCALLBACK(void *) dbgDiggerSolarisQueryInterface(PUVM pUVM, void *pvData, DBGFOSINTERFACE enmIf) 360 360 { 361 RT_NOREF3(pUVM, pvData, enmIf); 361 362 return NULL; 362 363 } … … 374 375 * It's all in the utsname symbol... 375 376 */ 377 SOL_utsname_t UtsName; 378 RT_ZERO(UtsName); /* Make MSC happy. */ 376 379 DBGFADDRESS Addr; 377 SOL_utsname_t UtsName;378 380 RTDBGSYMBOL SymUtsName; 379 381 int rc = DBGFR3AsSymbolByName(pUVM, DBGF_AS_KERNEL, "utsname", &SymUtsName, NULL); … … 429 431 static void dbgDiggerSolarisProcessModCtl32(PUVM pUVM, PDBGDIGGERSOLARIS pThis, SOL_modctl_t const *pModCtl) 430 432 { 433 RT_NOREF1(pThis); 434 431 435 /* skip it if it's not loaded and installed */ 432 436 AssertCompile2MemberOffsets(SOL_modctl_t, v11_32.mod_loaded, v9_32.mod_loaded); … … 576 580 static void dbgDiggerSolarisProcessModCtl64(PUVM pUVM, PDBGDIGGERSOLARIS pThis, SOL_modctl_t const *pModCtl) 577 581 { 582 RT_NOREF1(pThis); 583 578 584 /* skip it if it's not loaded and installed */ 579 585 AssertCompile2MemberOffsets(SOL_modctl_t, v11_64.mod_loaded, v9_64.mod_loaded); … … 718 724 static DECLCALLBACK(void) dbgDiggerSolarisTerm(PUVM pUVM, void *pvData) 719 725 { 726 RT_NOREF1(pUVM); 720 727 PDBGDIGGERSOLARIS pThis = (PDBGDIGGERSOLARIS)pvData; 721 728 Assert(pThis->fValid); … … 1087 1094 static DECLCALLBACK(void) dbgDiggerSolarisDestruct(PUVM pUVM, void *pvData) 1088 1095 { 1096 RT_NOREF2(pUVM, pvData); 1089 1097 1090 1098 } … … 1096 1104 static DECLCALLBACK(int) dbgDiggerSolarisConstruct(PUVM pUVM, void *pvData) 1097 1105 { 1106 RT_NOREF2(pUVM, pvData); 1098 1107 return VINF_SUCCESS; 1099 1108 } -
trunk/src/VBox/Debugger/DBGPlugInWinNt.cpp
r62480 r62840 723 723 static DECLCALLBACK(void *) dbgDiggerWinNtQueryInterface(PUVM pUVM, void *pvData, DBGFOSINTERFACE enmIf) 724 724 { 725 RT_NOREF3(pUVM, pvData, enmIf); 725 726 return NULL; 726 727 } … … 732 733 static DECLCALLBACK(int) dbgDiggerWinNtQueryVersion(PUVM pUVM, void *pvData, char *pszVersion, size_t cchVersion) 733 734 { 735 RT_NOREF1(pUVM); 734 736 PDBGDIGGERWINNT pThis = (PDBGDIGGERWINNT)pvData; 735 737 Assert(pThis->fValid); … … 753 755 static DECLCALLBACK(void) dbgDiggerWinNtTerm(PUVM pUVM, void *pvData) 754 756 { 757 RT_NOREF1(pUVM); 755 758 PDBGDIGGERWINNT pThis = (PDBGDIGGERWINNT)pvData; 756 759 Assert(pThis->fValid); … … 1146 1149 static DECLCALLBACK(void) dbgDiggerWinNtDestruct(PUVM pUVM, void *pvData) 1147 1150 { 1148 1151 RT_NOREF2(pUVM, pvData); 1149 1152 } 1150 1153 … … 1155 1158 static DECLCALLBACK(int) dbgDiggerWinNtConstruct(PUVM pUVM, void *pvData) 1156 1159 { 1160 RT_NOREF1(pUVM); 1157 1161 PDBGDIGGERWINNT pThis = (PDBGDIGGERWINNT)pvData; 1158 1162 pThis->fValid = false;
Note:
See TracChangeset
for help on using the changeset viewer.