Skip to content

Commit

Permalink
Add MAR to dups, Remove Path Prefix (#1621)
Browse files Browse the repository at this point in the history
Adds `boss/mar` to the list of paths evaluated by the duplicate finder.

Removes the `../../` prefix for matching ASM files in the final report.
  • Loading branch information
hohle authored Sep 16, 2024
1 parent 4d9839a commit 7689f77
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tools/dups/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,13 @@ fn do_dups_report(output_file: Option<String>, threshold: f64) {
let mut files = Vec::new();

let pairs: Vec<SrcAsmPair> = vec![
SrcAsmPair {
asm_dir: String::from("../../asm/us/boss/mar/nonmatchings/"),
src_dir: String::from("../../src/boss/mar/"),
overlay_name: String::from("MAR"),
include_asm: get_all_include_asm("../../src/boss/mar/"),
path_matcher: "/mar/".to_string(),
},
SrcAsmPair {
asm_dir: String::from("../../asm/us/dra/nonmatchings/"),
src_dir: String::from("../../src/dra/"),
Expand Down Expand Up @@ -402,7 +409,7 @@ fn do_dups_report(output_file: Option<String>, threshold: f64) {
writeln!(
output_file,
"| {:<4.2} | {:<8} | {:<35} | {:<2} ",
function.similarity, decompiled, function.name, function.file
function.similarity, decompiled, function.name, function.file.strip_prefix("../../").unwrap()
)
.expect("Error writing to file");
}
Expand Down

0 comments on commit 7689f77

Please sign in to comment.