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.

80 lines
2.3 KiB

  1. //----------------------------------------------------------------------------
  2. //
  3. // memcmd.h
  4. //
  5. // Copyright (C) Microsoft Corporation, 1997-2001.
  6. //
  7. //----------------------------------------------------------------------------
  8. #ifndef _MEMCMD_H_
  9. #define _MEMCMD_H_
  10. extern ULONG64 EXPRLastDump;
  11. extern ADDR g_DumpDefault;
  12. #define GetMemByte(addr, value) \
  13. (BOOL)(GetMemString(addr, value, sizeof(UCHAR)) == sizeof(UCHAR))
  14. #define GetMemWord(addr, value) \
  15. (BOOL)(GetMemString(addr, (PUCHAR)value, sizeof(USHORT)) == \
  16. sizeof(USHORT))
  17. #define GetMemDword(addr, value) \
  18. (BOOL)(GetMemString(addr, (PUCHAR)value, sizeof(ULONG)) == \
  19. sizeof(ULONG))
  20. #define GetMemQword(addr, value) \
  21. (BOOL)(GetMemString(addr, (PUCHAR)value, sizeof(ULONG64)) == \
  22. sizeof(ULONG64))
  23. #define GetMemString(Addr, Value, Length) \
  24. GetProcessMemString(g_CurrentProcess, Addr, Value, Length)
  25. #define SetMemString(Addr, Value, Length) \
  26. SetProcessMemString(g_CurrentProcess, Addr, Value, Length)
  27. ULONG
  28. GetProcessMemString(
  29. PPROCESS_INFO Process,
  30. PADDR Addr,
  31. PVOID Value,
  32. ULONG Length
  33. );
  34. ULONG
  35. SetProcessMemString(
  36. PPROCESS_INFO Process,
  37. PADDR Addr,
  38. PVOID Value,
  39. ULONG Length
  40. );
  41. void parseDumpCommand(void);
  42. void parseEnterCommand(void);
  43. ULONG fnDumpAsciiMemory(PADDR, ULONG);
  44. ULONG fnDumpUnicodeMemory (PADDR startaddr, ULONG count);
  45. void fnDumpByteMemory(PADDR, ULONG);
  46. void fnDumpWordMemory(PADDR, ULONG);
  47. void fnDumpDwordMemory(PADDR startaddr, ULONG count, BOOL fDumpSymbols);
  48. void fnDumpDwordAndCharMemory(PADDR, ULONG);
  49. void fnDumpListMemory(PADDR, ULONG, ULONG, BOOL);
  50. void fnDumpFloatMemory(PADDR Start, ULONG Count);
  51. void fnDumpDoubleMemory(PADDR Start, ULONG Count);
  52. void fnDumpQuadMemory(PADDR Start, ULONG Count, BOOL fDumpSymbols);
  53. void fnDumpByteBinaryMemory(PADDR startaddr, ULONG count);
  54. void fnDumpDwordBinaryMemory(PADDR startaddr, ULONG count);
  55. void fnDumpSelector(ULONG Selector);
  56. void fnInteractiveEnterMemory(PADDR, ULONG);
  57. void fnEnterMemory(PADDR, PUCHAR, ULONG);
  58. void fnCompareMemory(PADDR, ULONG, PADDR);
  59. void fnMoveMemory(PADDR, ULONG, PADDR);
  60. void ParseFillMemory(void);
  61. void ParseSearchMemory(void);
  62. void fnInputIo(ULONG64, UCHAR);
  63. void fnOutputIo (ULONG64, ULONG, UCHAR);
  64. #endif // #ifndef _MEMCMD_H_