コード例 #1
0
ファイル: elf.py プロジェクト: thx0701/diffware
 def compare(self, other, source=None):
     return Difference.from_operation(
         ReadelfStringSection,
         self.path,
         other.path,
         operation_args=[self._name],
     )
コード例 #2
0
ファイル: elf.py プロジェクト: thx0701/diffware
    def compare_details(self, other, source=None):
        differences = _compare_elf_data(self.path, other.path)
        differences = [x for x in differences if x is not None]

        # Don't add string differences if everything else has no diff
        if not differences:
            return differences

        differences.append(
            Difference.from_operation(Strings, self.path, other.path))
        return differences
コード例 #3
0
 def compare_details(self, other, source=None):
     return [
         Difference.from_operation(x, self, other)
         for x in list(self.DECOMPILE_OPERATIONS)
     ]
コード例 #4
0
ファイル: elf.py プロジェクト: thx0701/diffware
def _compare_elf_data(path1, path2):
    return [
        Difference.from_operation(x, path1, path2, ignore_returncodes={1})
        for x in list(READELF_COMMANDS)
    ]