Roadmap tool to compare binary structure (#479)

This commit is contained in:
MS
2024-01-22 10:15:12 -05:00
committed by GitHub
parent 05bc94f030
commit a65eb9a4e0
7 changed files with 320 additions and 3 deletions

View File

@@ -409,6 +409,9 @@ class Compare:
## Public API
def get_all(self) -> List[MatchInfo]:
return self._db.get_all()
def get_functions(self) -> List[MatchInfo]:
return self._db.get_matches_by_type(SymbolType.FUNCTION)

View File

@@ -82,6 +82,17 @@ class CompareDb:
return [string for (string,) in cur.fetchall()]
def get_all(self) -> List[MatchInfo]:
cur = self._db.execute(
"""SELECT compare_type, orig_addr, recomp_addr, name, size
FROM `symbols`
ORDER BY orig_addr NULLS LAST
""",
)
cur.row_factory = matchinfo_factory
return cur.fetchall()
def get_matches(self) -> Optional[MatchInfo]:
cur = self._db.execute(
"""SELECT compare_type, orig_addr, recomp_addr, name, size