| 5820 | } |
| 5821 | |
| 5822 | void COFF::ParseSymbolStream(CvSymStreamType symStreamType) |
| 5823 | { |
| 5824 | if (mCvSymbolRecordStream == 0) |
| 5825 | return; |
| 5826 | |
| 5827 | BP_ZONE("COFF::ParseSymbolStream"); |
| 5828 | |
| 5829 | if (!mCvSymbolRecordReader.IsSetup()) |
| 5830 | CvReadStream(mCvSymbolRecordStream, mCvSymbolRecordReader); |
| 5831 | |
| 5832 | if ((symStreamType == CvSymStreamType_Globals_Scan) || (symStreamType == CvSymStreamType_Globals_Targeted)) |
| 5833 | { |
| 5834 | int streamSize = 0; |
| 5835 | uint8* data; |
| 5836 | if (mCvGlobalSymbolData == NULL) |
| 5837 | mCvGlobalSymbolData = CvReadStream(mCvGlobalSymbolInfoStream, &streamSize); |
| 5838 | data = mCvGlobalSymbolData; |
| 5839 | |
| 5840 | HandleSymStreamEntries(symStreamType, data, NULL); |
| 5841 | } |
| 5842 | else |
| 5843 | { |
| 5844 | int streamSize = 0; |
| 5845 | uint8* data; |
| 5846 | if (mCvPublicSymbolData == NULL) |
| 5847 | mCvPublicSymbolData = CvReadStream(mCvPublicSymbolInfoStream, &streamSize); // psgsi |
| 5848 | data = mCvPublicSymbolData; |
| 5849 | uint8* sectionData = data; |
| 5850 | |
| 5851 | GET_INTO(int32, symHashSize); |
| 5852 | GET_INTO(int32, addrMapSize); |
| 5853 | GET_INTO(int32, thunkCount); |
| 5854 | GET_INTO(int32, thunkSize); |
| 5855 | GET_INTO(int32, thunkTableStream); |
| 5856 | GET_INTO(int32, thunkTableOfs); |
| 5857 | GET_INTO(int32, thunkSectCount); |
| 5858 | |
| 5859 | data = HandleSymStreamEntries(symStreamType, data, data + symHashSize); |
| 5860 | |
| 5861 | //TODO: Hm, not quite right? |
| 5862 | /*int addrMapEntryCount = addrMapSize / 4; |
| 5863 | for (int addrIdx = 0; addrIdx < addrMapEntryCount; addrIdx++) |
| 5864 | { |
| 5865 | GET_INTO(int32, addrVal); |
| 5866 | } |
| 5867 | |
| 5868 | for (int thunkIdx = 0; thunkIdx < thunkCount; thunkIdx++) |
| 5869 | { |
| 5870 | GET_INTO(int32, thunkVal); |
| 5871 | } |
| 5872 | |
| 5873 | for (int sectionIdx = 0; sectionIdx < thunkSectCount; sectionIdx++) |
| 5874 | { |
| 5875 | GET_INTO(int32, ofs); |
| 5876 | GET_INTO(int32, sectNum); |
| 5877 | }*/ |
| 5878 | } |
| 5879 | } |