Skip to content

Conversation

AngheloAlf
Copy link
Contributor

In a recent splat/spimdisasm release it started to generate .NON_MATCHING markers for all the disassembled symbols by default (ethteck/splat#466). Since this is a splat/spimdisasm specific issue, only the MIPS architecture is affected.

This new behavior is producing issues on projects that uses objdiff as a diffing tool or to generate a progress report.

  • Diffing: Any symbol with a .NON_MATCHING marker on the target side of the diff is completely absent, making impossible to do any diffing.

    • The following decomp.me scratch shows the issue in action, the target side is missing the function (image 1), but the default diffing tab (the one that uses asm-differ) shows no issue (image 2) https://decomp.me/scratch/e71gG
      image
      image
  • Reporting: Since there are no symbols on the target side then everything is considered matched by objdiff.

image

This PR addresses those issues by conditionally applying the .NON_MATCHING filtering on each side of the view.

  • Target side: Show all the symbols except the ones with a .NON_MATCHING suffix.
  • Base side: Ignore all the .NON_MATCHING symbols and also ignore the ones with the same name without the suffix

I did a few tests and this approach seems to fix the issues listed above, even when the target object has a corresponding .NON_MATCHING marker for every other symbol.
image
image

I implemented this by adding a new enum DiffSide, and pass either DiffSide::Target or DiffSide::Base to ArchMips so the arch itself can know what side of the diff it is working with, allowing it to conditionally filter the symbols.
I implemented this only for ArchMips, but it should be simple to implement it to other arches if necessary.

…h the same name and a `.NON_MATCHING` suffix.

- Target side: Show all the symbols except the `.NON_MATCHING` ones.
- Base side: Ignore all the `.NON_MATCHING` symbols and also ignore the ones with the same name without the suffix
@AngheloAlf AngheloAlf changed the title [MIPS] [MIPS] Fix symbols being filtered out from target side of diff if target object contains .NON_MATCHING markers Sep 2, 2025
@encounter
Copy link
Owner

Looks good, thanks!

@encounter encounter merged commit 6fb4bb8 into encounter:main Sep 3, 2025
24 checks passed
@AngheloAlf AngheloAlf deleted the fix-nonmatching-label branch September 3, 2025 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants