Windows NT 4.0 source code leak
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.

74 lines
1.7 KiB

4 years ago
  1. // module line info internal interfaces
  2. #ifndef __MLI_INCLUDED__
  3. #define __MLI_INCLUDED__
  4. struct SrcFile;
  5. typedef SrcFile* pSrcFile;
  6. struct SectInfo;
  7. typedef SectInfo* pSectInfo;
  8. struct Lines;
  9. typedef Lines *pLines;
  10. struct MLI {
  11. MLI() : cfiles(0), pSrcFiles(0), csect(0), pSectInfos(0) { }
  12. BOOL AddLines(SZ_CONST szSrc, ISECT isect, OFF offCon, CB cbCon, OFF doff,
  13. LINE lineStart, IMAGE_LINENUMBER *plnumCoff, CB cb);
  14. pSrcFile AddSrcFile(SZ_CONST szfilename);
  15. BOOL Emit(Buffer& buffer);
  16. void EmitSecContribs(Mod1* pmod1);
  17. BOOL EmitFileInfo(Mod1* pmod1);
  18. BOOL CollectSections();
  19. BOOL Dump(const Buffer& buffer) const;
  20. POOL pool;
  21. Mod1* pmod1;
  22. USHORT cfiles;
  23. pSrcFile pSrcFiles;
  24. USHORT csect;
  25. pSectInfo pSectInfos;
  26. };
  27. struct SrcFile {
  28. SrcFile(SZ_CONST szFile_) : pNext(0), cbName(szFile_ ? strlen(szFile_) : 0), size(0), szFile(szFile_), csect(0), pSectInfos(0) { }
  29. pSectInfo AddSectInfo(ISECT isect, OFF offMin, OFF offMax, POOL& pool);
  30. OFF Size();
  31. BOOL Emit(Buffer& buffer, OFF off) const;
  32. pSrcFile pNext;
  33. OFF size;
  34. USHORT cbName;
  35. SZ_CONST szFile;
  36. USHORT csect;
  37. pSectInfo pSectInfos;
  38. };
  39. struct SectInfo {
  40. SectInfo(ISECT isect_, OFF offMin_, OFF offMax_)
  41. : pNext(0), isect(isect_), cPair(0), pHead(0), ppTail(&pHead), size(0), offMin(offMin_), offMax(offMax_) { }
  42. BOOL AddLineNumbers(int linenumber, int offset, POOL& pool);
  43. BOOL Emit(Buffer& buffer) const;
  44. pSectInfo pNext;
  45. USHORT isect;
  46. USHORT cPair;
  47. pLines pHead;
  48. pLines* ppTail;
  49. OFF size;
  50. OFF offMin;
  51. OFF offMax;
  52. };
  53. struct Lines {
  54. Lines(OFF off_, ULONG line_) : pNext(0), off(off_), line(line_) { }
  55. pLines pNext;
  56. OFF off;
  57. ULONG line;
  58. };
  59. #endif // !__MLI_INCLUDED__