Leaked source code of windows server 2003
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.

77 lines
2.0 KiB

  1. //----------------------------------------------------------------------------
  2. //
  3. // Stack walking support.
  4. //
  5. // Copyright (C) Microsoft Corporation, 1997-2002.
  6. //
  7. //----------------------------------------------------------------------------
  8. #ifndef _STKWALK_H_
  9. #define _STKWALK_H_
  10. extern BOOL g_AllowCorStack;
  11. extern BOOL g_DebugCorStack;
  12. #define IA64_SAVE_IFS(Frame) ((Frame)->Reserved[0])
  13. #define SAVE_EBP(f) (f)->Reserved[0]
  14. #define TRAP_TSS(f) (f)->Reserved[1]
  15. #define TRAP_EDITED(f) (f)->Reserved[1]
  16. #define SAVE_TRAP(f) (f)->Reserved[2]
  17. #define STACK_NO_DEFAULT 0x00000000
  18. #define STACK_INSTR_DEFAULT 0x00000001
  19. #define STACK_STACK_DEFAULT 0x00000002
  20. #define STACK_FRAME_DEFAULT 0x00000004
  21. #define STACK_ALL_DEFAULT 0x00000007
  22. // Extra flag for stack trace format that overrides all
  23. // others and indicates a raw pointer stack dump.
  24. #define RAW_STACK_DUMP 0x80000000
  25. LPVOID
  26. SwFunctionTableAccess(
  27. HANDLE hProcess,
  28. ULONG64 AddrBase
  29. );
  30. VOID
  31. DoStackTrace(
  32. DebugClient* Client,
  33. ULONG64 FramePointer,
  34. ULONG64 StackPointer,
  35. ULONG64 InstructionPointer,
  36. ULONG PointerDefaults,
  37. ULONG NumFrames,
  38. ULONG TraceFlags
  39. );
  40. VOID
  41. PrintStackFrame(
  42. PDEBUG_STACK_FRAME StackFrame,
  43. PDEBUG_STACK_FRAME PrevFrame,
  44. ULONG Flags
  45. );
  46. VOID
  47. PrintStackTrace(
  48. ULONG NumFrames,
  49. PDEBUG_STACK_FRAME StackFrames,
  50. ULONG Flags
  51. );
  52. DWORD
  53. StackTrace(
  54. DebugClient* Client,
  55. ULONG64 FramePointer,
  56. ULONG64 StackPointer,
  57. ULONG64 InstructionPointer,
  58. ULONG PointerDefaults,
  59. PDEBUG_STACK_FRAME StackFrames,
  60. ULONG NumFrames,
  61. ULONG64 ExtThread,
  62. ULONG Flags,
  63. BOOL EstablishingScope
  64. );
  65. #endif // #ifndef _STKWALK_H_