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.

88 lines
1.7 KiB

  1. //----------------------------------------------------------------------------
  2. //
  3. // Stack walking support.
  4. //
  5. // Copyright (C) Microsoft Corporation, 1997-2001.
  6. //
  7. //----------------------------------------------------------------------------
  8. #ifndef _STKWALK_H_
  9. #define _STKWALK_H_
  10. #define SAVE_EBP(f) (f)->Reserved[0]
  11. #define TRAP_TSS(f) (f)->Reserved[1]
  12. #define TRAP_EDITED(f) (f)->Reserved[1]
  13. #define SAVE_TRAP(f) (f)->Reserved[2]
  14. LPVOID
  15. SwFunctionTableAccess(
  16. HANDLE hProcess,
  17. ULONG64 AddrBase
  18. );
  19. BOOL
  20. SwReadMemory(
  21. HANDLE hProcess,
  22. ULONG64 lpBaseAddress,
  23. LPVOID lpBuffer,
  24. DWORD nSize,
  25. LPDWORD lpNumberOfBytesRead
  26. );
  27. BOOL
  28. SwReadMemory32(
  29. HANDLE hProcess,
  30. ULONG dwBaseAddress,
  31. LPVOID lpBuffer,
  32. DWORD nSize,
  33. LPDWORD lpNumberOfBytesRead
  34. );
  35. DWORD64
  36. SwGetModuleBase(
  37. HANDLE hProcess,
  38. ULONG64 Address
  39. );
  40. DWORD
  41. SwGetModuleBase32(
  42. HANDLE hProcess,
  43. DWORD Address
  44. );
  45. VOID
  46. DoStackTrace(
  47. ULONG64 FramePointer,
  48. ULONG64 StackPointer,
  49. ULONG64 InstructionPointer,
  50. ULONG NumFrames,
  51. STACK_TRACE_TYPE TraceType
  52. );
  53. VOID
  54. PrintStackFrame(
  55. PDEBUG_STACK_FRAME StackFrame,
  56. ULONG Flags
  57. );
  58. VOID
  59. PrintStackTrace(
  60. ULONG NumFrames,
  61. PDEBUG_STACK_FRAME StackFrames,
  62. ULONG Flags
  63. );
  64. DWORD
  65. StackTrace(
  66. ULONG64 FramePointer,
  67. ULONG64 StackPointer,
  68. ULONG64 InstructionPointer,
  69. PDEBUG_STACK_FRAME StackFrames,
  70. ULONG NumFrames,
  71. ULONG64 ExtThread,
  72. ULONG Flags,
  73. BOOL EstablishingScope
  74. );
  75. #endif // #ifndef _STKWALK_H_