Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.5 KiB

  1. /***********************************************************************
  2. * Microsoft Lego
  3. *
  4. * Microsoft Confidential. Copyright 1994-1999 Microsoft Corporation.
  5. *
  6. * Component:
  7. *
  8. * File: dis.h
  9. *
  10. * File Comments:
  11. *
  12. *
  13. ***********************************************************************/
  14. #ifndef __DISASM_H__
  15. #define __DISASM_H__
  16. #if _MSC_VER > 1000
  17. #pragma once
  18. #endif
  19. #include <stddef.h>
  20. // ------------------------------------------------------------
  21. // Architecture types
  22. // ------------------------------------------------------------
  23. enum ARCHT
  24. {
  25. archtX8616, // Intel x86 (16 bit mode)
  26. archtX86, // Intel x86 (32 bit mode)
  27. archtMips, // MIPS R4x00
  28. archtAlphaAxp, // DEC Alpha AXP
  29. archtPowerPc, // Motorola PowerPC
  30. archtPowerMac, // Motorola PowerPC in big endian mode
  31. archtPaRisc, // HP PA-RISC
  32. };
  33. struct DIS;
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37. typedef size_t (*PFNCCHADDR)(struct DIS *, ULONG, char *, size_t, DWORD *);
  38. typedef size_t (*PFNCCHFIXUP)(struct DIS *, ULONG, size_t, char *, size_t, DWORD *);
  39. struct DIS *DisNew(enum ARCHT);
  40. size_t Disassemble(struct DIS *pdis, ULONG addr, const BYTE *pb, size_t cbMax, char *pad, char *buf, size_t cbBuf);
  41. void SetSymbolCallback(struct DIS *pdis,PFNCCHADDR,PFNCCHFIXUP);
  42. void FreePdis(struct DIS *);
  43. #ifdef __cplusplus
  44. }
  45. #endif
  46. #endif