Lines Matching refs:DRI
35 DataRefImpl DRI; in MachOObjectFile() local
36 DRI.d.a = DRI.d.b = 0; in MachOObjectFile()
37 moveToNextSection(DRI); in MachOObjectFile()
39 while (DRI.d.a < LoadCommandCount) { in MachOObjectFile()
40 Sections.push_back(DRI); in MachOObjectFile()
41 DRI.d.b++; in MachOObjectFile()
42 moveToNextSection(DRI); in MachOObjectFile()
58 void MachOObjectFile::moveToNextSymbol(DataRefImpl &DRI) const { in moveToNextSymbol()
60 while (DRI.d.a < LoadCommandCount) { in moveToNextSymbol()
61 LoadCommandInfo LCI = MachOObj->getLoadCommandInfo(DRI.d.a); in moveToNextSymbol()
65 if (DRI.d.b < SymtabLoadCmd->NumSymbolTableEntries) in moveToNextSymbol()
69 DRI.d.a++; in moveToNextSymbol()
70 DRI.d.b = 0; in moveToNextSymbol()
74 void MachOObjectFile::getSymbolTableEntry(DataRefImpl DRI, in getSymbolTableEntry() argument
77 LoadCommandInfo LCI = MachOObj->getLoadCommandInfo(DRI.d.a); in getSymbolTableEntry()
80 if (RegisteredStringTable != DRI.d.a) { in getSymbolTableEntry()
82 RegisteredStringTable = DRI.d.a; in getSymbolTableEntry()
85 MachOObj->ReadSymbolTableEntry(SymtabLoadCmd->SymbolTableOffset, DRI.d.b, in getSymbolTableEntry()
89 void MachOObjectFile::getSymbol64TableEntry(DataRefImpl DRI, in getSymbol64TableEntry() argument
92 LoadCommandInfo LCI = MachOObj->getLoadCommandInfo(DRI.d.a); in getSymbol64TableEntry()
95 if (RegisteredStringTable != DRI.d.a) { in getSymbol64TableEntry()
97 RegisteredStringTable = DRI.d.a; in getSymbol64TableEntry()
100 MachOObj->ReadSymbol64TableEntry(SymtabLoadCmd->SymbolTableOffset, DRI.d.b, in getSymbol64TableEntry()
105 error_code MachOObjectFile::getSymbolNext(DataRefImpl DRI, in getSymbolNext() argument
107 DRI.d.b++; in getSymbolNext()
108 moveToNextSymbol(DRI); in getSymbolNext()
109 Result = SymbolRef(DRI, this); in getSymbolNext()
113 error_code MachOObjectFile::getSymbolName(DataRefImpl DRI, in getSymbolName() argument
117 getSymbol64TableEntry(DRI, Entry); in getSymbolName()
121 getSymbolTableEntry(DRI, Entry); in getSymbolName()
127 error_code MachOObjectFile::getSymbolOffset(DataRefImpl DRI, in getSymbolOffset() argument
133 getSymbol64TableEntry(DRI, Entry); in getSymbolOffset()
138 getSymbolTableEntry(DRI, Entry); in getSymbolOffset()
148 error_code MachOObjectFile::getSymbolAddress(DataRefImpl DRI, in getSymbolAddress() argument
152 getSymbol64TableEntry(DRI, Entry); in getSymbolAddress()
156 getSymbolTableEntry(DRI, Entry); in getSymbolAddress()
162 error_code MachOObjectFile::getSymbolSize(DataRefImpl DRI, in getSymbolSize() argument
168 error_code MachOObjectFile::getSymbolNMTypeChar(DataRefImpl DRI, in getSymbolNMTypeChar() argument
173 getSymbol64TableEntry(DRI, Entry); in getSymbolNMTypeChar()
178 getSymbolTableEntry(DRI, Entry); in getSymbolNMTypeChar()
203 error_code MachOObjectFile::isSymbolInternal(DataRefImpl DRI, in isSymbolInternal() argument
207 getSymbol64TableEntry(DRI, Entry); in isSymbolInternal()
211 getSymbolTableEntry(DRI, Entry); in isSymbolInternal()
263 DataRefImpl DRI; in begin_symbols() local
264 DRI.d.a = DRI.d.b = 0; in begin_symbols()
265 moveToNextSymbol(DRI); in begin_symbols()
266 return symbol_iterator(SymbolRef(DRI, this)); in begin_symbols()
270 DataRefImpl DRI; in end_symbols() local
271 DRI.d.a = MachOObj->getHeader().NumLoadCommands; in end_symbols()
272 DRI.d.b = 0; in end_symbols()
273 return symbol_iterator(SymbolRef(DRI, this)); in end_symbols()
279 void MachOObjectFile::moveToNextSection(DataRefImpl &DRI) const { in moveToNextSection()
281 while (DRI.d.a < LoadCommandCount) { in moveToNextSection()
282 LoadCommandInfo LCI = MachOObj->getLoadCommandInfo(DRI.d.a); in moveToNextSection()
286 if (DRI.d.b < SegmentLoadCmd->NumSections) in moveToNextSection()
291 if (DRI.d.b < Segment64LoadCmd->NumSections) in moveToNextSection()
295 DRI.d.a++; in moveToNextSection()
296 DRI.d.b = 0; in moveToNextSection()
300 error_code MachOObjectFile::getSectionNext(DataRefImpl DRI, in getSectionNext() argument
302 DRI.d.b++; in getSectionNext()
303 moveToNextSection(DRI); in getSectionNext()
304 Result = SectionRef(DRI, this); in getSectionNext()
309 MachOObjectFile::getSection(DataRefImpl DRI, in getSection() argument
312 LoadCommandInfo LCI = MachOObj->getLoadCommandInfo(DRI.d.a); in getSection()
314 MachOObj->ReadSection(LCI, DRI.d.b, Res); in getSection()
325 MachOObjectFile::getSection64(DataRefImpl DRI, in getSection64() argument
328 LoadCommandInfo LCI = MachOObj->getLoadCommandInfo(DRI.d.a); in getSection64()
330 MachOObj->ReadSection64(LCI, DRI.d.b, Res); in getSection64()
333 static bool is64BitLoadCommand(const MachOObject *MachOObj, DataRefImpl DRI) { in is64BitLoadCommand() argument
334 LoadCommandInfo LCI = MachOObj->getLoadCommandInfo(DRI.d.a); in is64BitLoadCommand()
341 error_code MachOObjectFile::getSectionName(DataRefImpl DRI, in getSectionName() argument
345 if (is64BitLoadCommand(MachOObj, DRI)) { in getSectionName()
347 LoadCommandInfo LCI = MachOObj->getLoadCommandInfo(DRI.d.a); in getSectionName()
350 MachOObj->ReadSection64(LCI, DRI.d.b, Sect); in getSectionName()
357 LoadCommandInfo LCI = MachOObj->getLoadCommandInfo(DRI.d.a); in getSectionName()
360 MachOObj->ReadSection(LCI, DRI.d.b, Sect); in getSectionName()
370 error_code MachOObjectFile::getSectionAddress(DataRefImpl DRI, in getSectionAddress() argument
372 if (is64BitLoadCommand(MachOObj, DRI)) { in getSectionAddress()
374 getSection64(DRI, Sect); in getSectionAddress()
378 getSection(DRI, Sect); in getSectionAddress()
384 error_code MachOObjectFile::getSectionSize(DataRefImpl DRI, in getSectionSize() argument
386 if (is64BitLoadCommand(MachOObj, DRI)) { in getSectionSize()
388 getSection64(DRI, Sect); in getSectionSize()
392 getSection(DRI, Sect); in getSectionSize()
398 error_code MachOObjectFile::getSectionContents(DataRefImpl DRI, in getSectionContents() argument
400 if (is64BitLoadCommand(MachOObj, DRI)) { in getSectionContents()
402 getSection64(DRI, Sect); in getSectionContents()
406 getSection(DRI, Sect); in getSectionContents()
412 error_code MachOObjectFile::getSectionAlignment(DataRefImpl DRI, in getSectionAlignment() argument
414 if (is64BitLoadCommand(MachOObj, DRI)) { in getSectionAlignment()
416 getSection64(DRI, Sect); in getSectionAlignment()
420 getSection(DRI, Sect); in getSectionAlignment()
426 error_code MachOObjectFile::isSectionText(DataRefImpl DRI, in isSectionText() argument
428 if (is64BitLoadCommand(MachOObj, DRI)) { in isSectionText()
430 getSection64(DRI, Sect); in isSectionText()
434 getSection(DRI, Sect); in isSectionText()
440 error_code MachOObjectFile::isSectionData(DataRefImpl DRI, in isSectionData() argument
447 error_code MachOObjectFile::isSectionBSS(DataRefImpl DRI, in isSectionBSS() argument
508 DataRefImpl DRI; in begin_sections() local
509 DRI.d.a = DRI.d.b = 0; in begin_sections()
510 moveToNextSection(DRI); in begin_sections()
511 return section_iterator(SectionRef(DRI, this)); in begin_sections()
515 DataRefImpl DRI; in end_sections() local
516 DRI.d.a = MachOObj->getHeader().NumLoadCommands; in end_sections()
517 DRI.d.b = 0; in end_sections()
518 return section_iterator(SectionRef(DRI, this)); in end_sections()