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.

62 lines
2.0 KiB

  1. //----------------------------------------------------------------------------
  2. //
  3. // ntcmd.h
  4. //
  5. // Copyright (C) Microsoft Corporation, 1997-2002.
  6. //
  7. //----------------------------------------------------------------------------
  8. #ifndef _NTCMD_H_
  9. #define _NTCMD_H_
  10. #define HR_PROCESS_EXCEPTION EVENT_E_INTERNALEXCEPTION
  11. #define IS_RUNNING(CmdState) \
  12. ((CmdState) == 'g' || (CmdState) == 'p' || \
  13. (CmdState) == 't' || (CmdState) == 'b')
  14. #define IS_STEP_TRACE(CmdState) \
  15. ((CmdState) == 'p' || (CmdState) == 't' || (CmdState) == 'b')
  16. #define SPECIAL_EXECUTION(CmdState) \
  17. ((CmdState) == 's' || (CmdState) == 'e')
  18. extern BOOL g_OciOutputRegs;
  19. extern PSTR g_CommandStart;
  20. extern PSTR g_CurCmd;
  21. extern ULONG g_PromptLength;
  22. extern CHAR g_LastCommand[];
  23. extern CHAR g_CmdState;
  24. extern CHAR g_SymbolSuffix;
  25. extern ULONG g_DefaultRadix;
  26. extern ADDR g_UnasmDefault;
  27. extern ADDR g_AssemDefault;
  28. extern BOOL g_SwitchedProcs;
  29. extern API_VERSION g_NtsdApiVersion;
  30. extern ULONG g_DefaultStackTraceDepth;
  31. extern BOOL g_EchoEventTimestamps;
  32. extern PWSTR g_StartProcessDir;
  33. #define COMMAND_EXCEPTION_BASE 0x0dbcd000
  34. BOOL ChangeSymPath(PCSTR Args,
  35. BOOL Append,
  36. PSTR PathRet,
  37. ULONG PathRetChars);
  38. void ParseStackTrace(PULONG TraceFlags,
  39. PULONG64 Frame,
  40. PULONG64 Stack,
  41. PULONG64 Instr,
  42. PULONG Count,
  43. PULONG PtrDef);
  44. extern void OutputVersionInformation(DebugClient* Client);
  45. extern DWORD CommandExceptionFilter(PEXCEPTION_POINTERS Info);
  46. extern HRESULT ProcessCommands(DebugClient* Client, BOOL Nested);
  47. extern HRESULT ProcessCommandsAndCatch(DebugClient* Client);
  48. extern HRESULT GetPromptText(PSTR Buffer, ULONG BufferSize, PULONG TextSize);
  49. extern void OutputPrompt(PCSTR Format, va_list Args);
  50. void HandleBPWithStatus(void);
  51. void CallBugCheckExtension(DebugClient* Client);
  52. #endif // #ifndef _NTCMD_H_