Changeset 18448 in vbox for trunk/src/VBox/Disassembler
- Timestamp:
- Mar 28, 2009 3:33:44 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 45265
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Disassembler/Disasm.cpp
r15961 r18448 307 307 char *DbgBytesToString(PDISCPUSTATE pCpu, RTUINTPTR pBytes, int size, char *pszOutput) 308 308 { 309 char szByte[4]; 310 int len = strlen(pszOutput); 311 int i; 312 313 for(i = len; i < 40; i++) 314 { 315 strcat(pszOutput, " "); 316 } 317 strcat(pszOutput, " ["); 318 for(i = 0; i < size; i++) 319 { 320 RTStrPrintf(szByte, sizeof(szByte), "%02X ", DISReadByte(pCpu, pBytes+i)); 321 RTStrPrintf(&pszOutput[strlen(pszOutput)], 64, szByte); 322 } 323 len = strlen(pszOutput); 324 pszOutput[len - 1] = 0; //cut off last space 325 326 strcat(pszOutput, "]"); 309 char *psz = strchr(pszOutput, '\0'); 310 size_t len; 311 int i; 312 313 for(len = psz - pszOutput; len < 40; len++) 314 *psz++ = ' '; 315 *psz++ = ' '; 316 *psz++ = '['; 317 318 for(i = 0; (int)i < size; i++) 319 psz += RTStrPrintf(psz, 64, "%02X ", DISReadByte(pCpu, pBytes+i)); 320 321 psz[-1] = ']'; // replaces space 322 327 323 return pszOutput; 328 324 }
Note:
See TracChangeset
for help on using the changeset viewer.