mirror of
https://github.com/isledecomp/isle.git
synced 2025-12-12 17:03:26 +00:00
Add new script to compare the stack layout (#1112)
* Add new script to debug the stack layout * fix small error in script --------- Co-authored-by: jonschz <jonschz@users.noreply.github.com>
This commit is contained in:
@@ -15,7 +15,7 @@ from isledecomp.types import SymbolType
|
||||
from isledecomp.compare.asm import ParseAsm
|
||||
from isledecomp.compare.asm.fixes import assert_fixup, find_effective_match
|
||||
from .db import CompareDb, MatchInfo
|
||||
from .diff import combined_diff
|
||||
from .diff import combined_diff, CombinedDiffOutput
|
||||
from .lines import LinesDb
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ class DiffReport:
|
||||
orig_addr: int
|
||||
recomp_addr: int
|
||||
name: str
|
||||
udiff: Optional[List[str]] = None
|
||||
udiff: Optional[CombinedDiffOutput] = None
|
||||
ratio: float = 0.0
|
||||
is_effective_match: bool = False
|
||||
is_stub: bool = False
|
||||
|
||||
@@ -2,7 +2,13 @@ from difflib import SequenceMatcher
|
||||
from typing import Dict, List, Tuple
|
||||
|
||||
CombinedDiffInput = List[Tuple[str, str]]
|
||||
CombinedDiffOutput = List[Tuple[str, List[Dict[str, Tuple[str, str]]]]]
|
||||
# from inner to outer:
|
||||
# Tuple[str, ...]: either (orig_addr, instruction, recomp_addr) or (addr, instruction)
|
||||
# List[...]: a contiguous block of instructions, all matching or all mismatching
|
||||
# Dict[...]: either {"both": List[...]} or {"orig": [...], "recomp": [...]}
|
||||
# Tuple[str, List[...]]: One contiguous part of the diff (without skipping matching code)
|
||||
# List[...]: The list of all the contiguous diffs of a given function
|
||||
CombinedDiffOutput = List[Tuple[str, List[Dict[str, List[Tuple[str, ...]]]]]]
|
||||
|
||||
|
||||
def combined_diff(
|
||||
|
||||
Reference in New Issue
Block a user