Changeset 4953 in vbox for trunk/include/VBox/dis.h
- Timestamp:
- Sep 21, 2007 2:08:19 PM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 24710
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/dis.h
r4071 r4953 33 33 * @{ 34 34 */ 35 #define CPUMODE_16BIT 1 36 #define CPUMODE_32BIT 2 35 typedef enum 36 { 37 CPUMODE_16BIT = 1, 38 CPUMODE_32BIT = 2, 39 CPUMODE_64BIT = 3 40 } DISCPUMODE; 37 41 /** @} */ 38 42 … … 313 317 typedef const struct _OPCODE *PCOPCODE; 314 318 315 typedef DECLCALLBACK(int 32_t) FN_DIS_READBYTES(RTUINTPTR pSrc, uint8_t *pDest, uint32_t size, RTUINTPTR dwUserdata);319 typedef DECLCALLBACK(int) FN_DIS_READBYTES(RTUINTPTR pSrc, uint8_t *pDest, uint32_t size, void *pvUserdata); 316 320 typedef FN_DIS_READBYTES *PFN_DIS_READBYTES; 317 321 … … 323 327 /** Parser callback. 324 328 * @remark no DECLCALLBACK() here because it's considered to be internal (really, I'm too lazy to update all the functions). */ 325 typedef intFNDISPARSE(RTUINTPTR pu8CodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu);329 typedef unsigned FNDISPARSE(RTUINTPTR pu8CodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu); 326 330 typedef FNDISPARSE *PFNDISPARSE; 327 331 … … 370 374 PCOPCODE pCurInstr; 371 375 372 RTUINTPTR dwUserData[3];376 void *apvUserData[3]; 373 377 374 378 /** Optional read function */ … … 402 406 * Disassembles a code block. 403 407 * 404 * @returns Success indicator.408 * @returns VBox error code 405 409 * @param pCpu Pointer to cpu structure which have DISCPUSTATE::mode 406 410 * set correctly. … … 419 423 * This means *pcbSize >= cbMax sometimes. 420 424 */ 421 DISDECL( bool) DISBlock(PDISCPUSTATE pCpu, RTUINTPTR pvCodeBlock, int32_t cbMax, uint32_t*pSize);425 DISDECL(int) DISBlock(PDISCPUSTATE pCpu, RTUINTPTR pvCodeBlock, unsigned cbMax, unsigned *pSize); 422 426 423 427 /** 424 428 * Disassembles one instruction 425 429 * 426 * @returns Success indicator.430 * @returns VBox error code 427 431 * @param pCpu Pointer to cpu structure which have DISCPUSTATE::mode 428 432 * set correctly. … … 435 439 * @todo Define output callback. 436 440 */ 437 DISDECL( bool) DISInstr(PDISCPUSTATE pCpu, RTUINTPTR pu8Instruction, uint32_t u32EipOffset, uint32_t*pcbSize, char *pszOutput);441 DISDECL(int) DISInstr(PDISCPUSTATE pCpu, RTUINTPTR pu8Instruction, unsigned u32EipOffset, unsigned *pcbSize, char *pszOutput); 438 442 439 443 /** 440 444 * Disassembles one instruction 441 445 * 442 * @returns Success indicator.446 * @returns VBox error code 443 447 * @param pCpu Pointer to cpu structure which have DISCPUSTATE::mode 444 448 * set correctly. … … 452 456 * @todo Define output callback. 453 457 */ 454 DISDECL( bool) DISInstrEx(PDISCPUSTATE pCpu, RTUINTPTR pu8Instruction, uint32_t u32EipOffset, uint32_t *pcbSize,455 char *pszOutput, u int32_tuFilter);458 DISDECL(int) DISInstrEx(PDISCPUSTATE pCpu, RTUINTPTR pu8Instruction, uint32_t u32EipOffset, uint32_t *pcbSize, 459 char *pszOutput, unsigned uFilter); 456 460 457 461 /** … … 459 463 * The result is found in pCpu. 460 464 * 461 * @returns Success indicator.465 * @returns VBox error code 462 466 * @param pCpu Pointer to cpu structure which has DISCPUSTATE::mode set correctly. 463 467 * @param InstructionAddr Pointer to the instruction to parse. … … 465 469 * NULL is allowed. 466 470 */ 467 DISDECL( bool) DISCoreOne(PDISCPUSTATE pCpu, RTUINTPTR InstructionAddr, unsigned *pcbInstruction);471 DISDECL(int) DISCoreOne(PDISCPUSTATE pCpu, RTUINTPTR InstructionAddr, unsigned *pcbInstruction); 468 472 469 473 /**
Note:
See TracChangeset
for help on using the changeset viewer.