Skip to content

Commit 06afa89

Browse files
unkn0wNameunkn0wName
authored andcommitted
printf
1 parent 8a84141 commit 06afa89

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

find_kernel_func/3rdparty/find_xrefs.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,14 @@ void find_xrefs_link(const char* image, size_t image_size,
177177
parse_code_block_with_xrefs(group_name, v_code_block, result_map);
178178
v_code_block.clear();
179179
}
180-
if ((time(NULL) - start_time) > 5) {
180+
if ((time(NULL) - start_time) > 3) {
181181
start_time = time(NULL);
182-
float progress = (float)((float)insn->address * 100 / (float)image_size);
182+
float progress = (double)((double)insn->address * 100.0f/ (double)image_size);
183183
progress = progress > 100.0f ? 100.0f : progress;
184-
printf("progress: %.2f%%\n", progress);
184+
printf("Current search location:%p, percentage progress: %.2f%%\r", insn->address, progress);
185185
}
186186
}
187+
printf("\n");
187188
cs_free(insn, 1);
188189
cs_close(&handle);
189190
}

0 commit comments

Comments
 (0)