TPL_PatternCollector.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef TPL_PATTERNCOLLECTOR_H
  2. #define TPL_PATTERNCOLLECTOR_H
  3. #include "PatternCollector.h"
  4. #include <stdio.h>
  5. #include <stdint.h>
  6. #include <vector>
  7. struct TPL_PatternCollector : public PatternCollector {
  8. protected:
  9. uint16_t cmap, pmap, csegBase, unitBase;
  10. uint16_t offStCseg, skipPmap;
  11. int count = 0;
  12. int cAllocSym = 0;
  13. int unitNum = 0;
  14. char version, charProc, charFunc;
  15. uint16_t csegoffs[100];
  16. uint16_t csegIdx;
  17. std::vector<long int> positionStack;
  18. void enterSym(FILE *f,const char *name, uint16_t pmapOffset);
  19. void allocSym(int count);
  20. void readCmapOffsets(FILE *f);
  21. void enterSystemUnit(FILE *f);
  22. void readString(FILE *f);
  23. void unknown(FILE *f,unsigned j, unsigned k);
  24. void nextUnit(FILE *f);
  25. void setVersionSpecifics(void);
  26. void savePos(FILE *f);
  27. void restorePos(FILE *f);
  28. void enterUnitProcs(FILE *f);
  29. public:
  30. /* Read the .tpl file, and put the keys into the array *keys[]. Returns the count */
  31. int readSyms(FILE *f);
  32. };
  33. #endif // TPL_PATTERNCOLLECTOR_H