[MIPS] Fix symbols being filtered out from target side of diff if target object contains .NON_MATCHING
markers
#250
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.Reporting: Since there are no symbols on the target side then everything is considered matched by objdiff.
This PR addresses those issues by conditionally applying the
.NON_MATCHING
filtering on each side of the view..NON_MATCHING
suffix..NON_MATCHING
symbols and also ignore the ones with the same name without the suffixI 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.I implemented this by adding a new enum
DiffSide
, and pass eitherDiffSide::Target
orDiffSide::Base
toArchMips
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.