(self)
| 113 | |
| 114 | |
| 115 | def parseData(self): |
| 116 | self.segments = [] |
| 117 | self.sections = [None] |
| 118 | for command in self.commands: |
| 119 | if command.cmd_id == LC_SEGMENT_64: |
| 120 | tmp = Segment(command, self.binary_file) |
| 121 | tmp.sections_index += range(len(self.sections), len(self.sections) + len(tmp.sections)) |
| 122 | self.segments.append(tmp) |
| 123 | for section in tmp.sections: |
| 124 | self.sections.append(section) |
| 125 | elif command.cmd_id == LC_SEGMENT: |
| 126 | tmp = Segment(command, self.binary_file) |
| 127 | self.segments.append(tmp) |
| 128 | for section in tmp.sections: |
| 129 | self.sections.append(section) |
| 130 | elif command.cmd_id == LC_FUNCTION_STARTS: |
| 131 | self.function_starts = FunctionStarts(command, self.binary_file) |
| 132 | elif command.cmd_id == LC_SYMTAB: |
| 133 | self.symbol_table = SymbolTable(command, self.binary_file) |
| 134 | self.string_table = StringTable(command, self.binary_file) |
| 135 | elif command.cmd_id == LC_DATA_IN_CODE: |
| 136 | self.data_in_code = DataInCode(command, self.binary_file) |
| 137 | elif command.cmd_id == LC_CODE_SIGNATURE: |
| 138 | self.code_signature = CodeSignature(command, self.binary_file) |
| 139 | elif command.cmd_id == LC_SEGMENT_SPLIT_INFO: |
| 140 | self.seg_split_info = SegmentSplitInfo(command, self.binary_file) |
| 141 | elif command.cmd_id == LC_DYSYMTAB: |
| 142 | self.dysymbol_table = DySymbolTable(command, self.binary_file) |
| 143 | return True |
| 144 | |
| 145 | @staticmethod |
| 146 | def getMagic(binary): |
no test coverage detected