Changeset 99208 in vbox for trunk/src/VBox/Runtime/testcase/tstLdr-3.cpp
- Timestamp:
- Mar 29, 2023 2:13:56 PM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/testcase/tstLdr-3.cpp
r98103 r99208 137 137 } 138 138 139 static DECLCALLBACK(int) MyGetSymbol(PCDIS CPUSTATE pCpu, uint32_t u32Sel, RTUINTPTR uAddress,139 static DECLCALLBACK(int) MyGetSymbol(PCDISSTATE pDis, uint32_t u32Sel, RTUINTPTR uAddress, 140 140 char *pszBuf, size_t cchBuf, RTINTPTR *poff, 141 141 void *pvUser) 142 142 { 143 RT_NOREF3(p Cpu, u32Sel, pvUser);143 RT_NOREF3(pDis, u32Sel, pvUser); 144 144 145 145 if ( uAddress > RTLdrSize(g_hLdrMod) + g_uLoadAddr … … 161 161 * @callback_method_impl{FNDISREADBYTES} 162 162 */ 163 static DECLCALLBACK(int) MyReadBytes(PDIS CPUSTATE pDis, uint8_t offInstr, uint8_t cbMinRead, uint8_t cbMaxRead)163 static DECLCALLBACK(int) MyReadBytes(PDISSTATE pDis, uint8_t offInstr, uint8_t cbMinRead, uint8_t cbMaxRead) 164 164 { 165 165 RT_NOREF1(cbMaxRead); … … 174 174 RTUINTPTR uNearAddr, RTUINTPTR uSearchAddr) 175 175 { 176 DIS CPUSTATE Cpu;177 int32_t 176 DISSTATE Dis; 177 int32_t i = 0; 178 178 while (i < cbMax) 179 179 { … … 184 184 int rc = DISInstrWithReader(uNearAddr + i, enmCpuMode, 185 185 MyReadBytes, (uint8_t *)pvCodeBlock - (uintptr_t)uNearAddr, 186 & Cpu, &cbInstr);186 &Dis, &cbInstr); 187 187 RTAssertSetMayPanic(fMayPanic); 188 188 RTAssertSetQuiet(fQuiet); … … 195 195 RTPrintf("%s:\n", NearSym.aSyms[0].szName); 196 196 197 DISFormatYasmEx(& Cpu, szOutput, sizeof(szOutput),197 DISFormatYasmEx(&Dis, szOutput, sizeof(szOutput), 198 198 DIS_FMT_FLAGS_RELATIVE_BRANCH | DIS_FMT_FLAGS_BYTES_RIGHT | DIS_FMT_FLAGS_ADDR_LEFT | DIS_FMT_FLAGS_BYTES_SPACED, 199 199 MyGetSymbol, NULL);
Note:
See TracChangeset
for help on using the changeset viewer.