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.

77 lines
2.1 KiB

  1. //----------------------------------------------------------------------------
  2. //
  3. // ntcmd.h
  4. //
  5. // Copyright (C) Microsoft Corporation, 1997-2001.
  6. //
  7. //----------------------------------------------------------------------------
  8. #ifndef _NTCMD_H_
  9. #define _NTCMD_H_
  10. #define IS_RUNNING(CmdState) \
  11. ((CmdState) == 'g' || (CmdState) == 'p' || \
  12. (CmdState) == 't' || (CmdState) == 'b')
  13. #define IS_STEP_TRACE(CmdState) \
  14. ((CmdState) == 'p' || (CmdState) == 't' || (CmdState) == 'b')
  15. extern BOOL g_OciOutputRegs;
  16. extern PSTR g_CommandStart;
  17. extern PSTR g_CurCmd;
  18. extern ULONG g_PromptLength;
  19. extern CHAR g_LastCommand[];
  20. extern CHAR g_CmdState;
  21. extern CHAR g_SymbolSuffix;
  22. extern ULONG g_DefaultRadix;
  23. extern ADDR g_UnasmDefault;
  24. extern ADDR g_AssemDefault;
  25. extern BOOL g_SwitchedProcs;
  26. extern API_VERSION g_NtsdApiVersion;
  27. extern ULONG g_DefaultStackTraceDepth;
  28. extern BOOL g_EchoEventTimestamps;
  29. typedef enum _STACK_TRACE_TYPE
  30. {
  31. STACK_TRACE_TYPE_DEFAULT = 0,
  32. STACK_TRACE_TYPE_KB = 1,
  33. STACK_TRACE_TYPE_KV = 2,
  34. STACK_TRACE_TYPE_KD = 3,
  35. STACK_TRACE_TYPE_KP = 4,
  36. STACK_TRACE_TYPE_KN = 5,
  37. STACK_TRACE_TYPE_KBN = 6,
  38. STACK_TRACE_TYPE_KVN = 7,
  39. STACK_TRACE_TYPE_KDN = 8,
  40. STACK_TRACE_TYPE_KPN = 9,
  41. STACK_TRACE_TYPE_MAX
  42. } STACK_TRACE_TYPE, *PSTACK_TRACE_TYPE;
  43. #define COMMAND_EXCEPTION_BASE 0x0dbcd000
  44. VOID
  45. ParseStackTrace (
  46. PSTACK_TRACE_TYPE pTraceType,
  47. PADDR StartFP,
  48. PULONG64 Esp,
  49. PULONG64 Eip,
  50. PULONG Count
  51. );
  52. extern HRESULT InitNtCmd(DebugClient* Client);
  53. extern void OutputVersionInformation(DebugClient* Client);
  54. extern DWORD CommandExceptionFilter(PEXCEPTION_POINTERS Info);
  55. extern HRESULT ProcessCommands(DebugClient* Client, BOOL Nested);
  56. extern HRESULT ProcessCommandsAndCatch(DebugClient* Client);
  57. extern HRESULT GetPromptText(PSTR Buffer, ULONG BufferSize, PULONG TextSize);
  58. extern void OutputPrompt(PCSTR Format, va_list Args);
  59. VOID
  60. HandleBPWithStatus(
  61. VOID
  62. );
  63. void CallBugCheckExtension(DebugClient* Client);
  64. void
  65. ParsePageIn(void);
  66. #endif // #ifndef _NTCMD_H_