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.

63 lines
1.7 KiB

  1. //----------------------------------------------------------------------------
  2. //
  3. // Source file lookup and management.
  4. //
  5. // Copyright (C) Microsoft Corporation, 1997-2002.
  6. //
  7. //----------------------------------------------------------------------------
  8. #ifndef _SOURCE_H_
  9. #define _SOURCE_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 OutputSrcLines(PSRCFILE File, ULONG First, ULONG Last, ULONG Mark);
  27. BOOL OutputSrcLinesAroundAddr(ULONG64 Offset, ULONG Before, ULONG After);
  28. enum
  29. {
  30. // Information was found.
  31. LINE_FOUND,
  32. // No information was found.
  33. LINE_NOT_FOUND,
  34. // A specific module was referenced and it did
  35. // not contain the requested line.
  36. LINE_NOT_FOUND_IN_MODULE,
  37. };
  38. ULONG GetOffsetFromLine(PSTR FileLine, PULONG64 Offset);
  39. void ParseSrcOptCmd(CHAR Cmd);
  40. void ParseSrcLoadCmd(void);
  41. void ParseSrcListCmd(CHAR Cmd);
  42. void ParseOciSrcCmd(void);
  43. void DotLines(PDOT_COMMAND Cmd, DebugClient* Client);
  44. BOOL FindSrcFileOnPath(ULONG StartElement,
  45. LPSTR File,
  46. ULONG Flags,
  47. PSTR Found,
  48. ULONG FoundSize,
  49. PSTR* MatchPart,
  50. PULONG FoundElement);
  51. #endif // #ifndef _SOURCE_H_