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.

69 lines
1.6 KiB

  1. //----------------------------------------------------------------------------
  2. //
  3. // ntsrc.h
  4. //
  5. // Copyright (C) Microsoft Corporation, 1997-2001.
  6. //
  7. //----------------------------------------------------------------------------
  8. #ifndef _NTSRC_H_
  9. #define _NTSRC_H_
  10. #define SRCOPT_STEP_SOURCE 0x00000001
  11. #define SRCOPT_LIST_LINE 0x00000002
  12. #define SRCOPT_LIST_SOURCE 0x00000004
  13. #define SRCOPT_LIST_SOURCE_ONLY 0x00000008
  14. extern ULONG g_SrcOptions;
  15. extern PSTR g_SrcPath;
  16. extern ULONG g_OciSrcBefore, g_OciSrcAfter;
  17. typedef struct _SRCFILE
  18. {
  19. struct _SRCFILE *Next;
  20. LPSTR File;
  21. ULONG Lines;
  22. LPSTR *LineText;
  23. LPSTR RawText;
  24. } SRCFILE, *PSRCFILE;
  25. void UnloadSrcFiles(void);
  26. void OutputLineAddr(ULONG64 Offset);
  27. void OutputSrcLines(PSRCFILE File, ULONG First, ULONG Last, ULONG Mark);
  28. BOOL OutputSrcLinesAroundAddr(ULONG64 Offset, ULONG Before, ULONG After);
  29. enum
  30. {
  31. // Information was found.
  32. LINE_FOUND,
  33. // No information was found.
  34. LINE_NOT_FOUND,
  35. // A specific module was referenced and it did
  36. // not contain the requested line.
  37. LINE_NOT_FOUND_IN_MODULE,
  38. };
  39. ULONG GetOffsetFromLine(PSTR FileLine, PULONG64 Offset);
  40. void ParseSrcOptCmd(CHAR Cmd);
  41. void ParseSrcLoadCmd(void);
  42. void ParseSrcListCmd(CHAR Cmd);
  43. void ParseOciSrcCmd(void);
  44. void ParseLines(PSTR Args);
  45. BOOL
  46. FindSrcFileOnPath(
  47. ULONG StartElement,
  48. LPSTR File,
  49. ULONG Flags,
  50. PSTR Found,
  51. PSTR* MatchPart,
  52. PULONG FoundElement
  53. );
  54. void ChangeSrcPath(PSTR Args, BOOL Append);
  55. void ChangeExePath(PSTR Args, BOOL Append);
  56. #endif // #ifndef _NTSRC_H_