summaryrefslogtreecommitdiff
path: root/src/analysis
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis')
-rw-r--r--src/analysis/binary.c29
1 files changed, 26 insertions, 3 deletions
diff --git a/src/analysis/binary.c b/src/analysis/binary.c
index 10acfb6..17fc172 100644
--- a/src/analysis/binary.c
+++ b/src/analysis/binary.c
@@ -356,6 +356,8 @@ static GRenderingLine *disassemble_binary_parts(GDelayedDisassembly *disass, GBi
done = 0;
+ k = 0;
+
for (i = 0; i < disass->count; i++)
{
g_binary_part_get_values(disass->parts[i], &pos, &len, &base);
@@ -375,6 +377,25 @@ static GRenderingLine *disassemble_binary_parts(GDelayedDisassembly *disass, GBi
line = g_code_line_new(addr, instr, options);
g_rendering_line_add_to_lines(&result, line);
+ /* Ajout des prototypes de fonctions */
+
+ printf("BASE == 0x%08llx\n", base);
+
+ for (; k < count; k++)
+ {
+ routine_offset = g_binary_routine_get_address(routines[k]);
+
+ if (routine_offset > addr) break;
+
+ routine_desc = g_binary_routine_to_string(routines[k]);
+
+ line = g_comment_line_new(routine_offset, routine_desc, options);
+ g_rendering_line_insert_into_lines(&result, line, true);
+
+ free(routine_desc);
+
+ }
+
if (pos < len)
gtk_extended_status_bar_update_activity(statusbar, id, (done + pos) * 1.0 / sum);
@@ -382,10 +403,12 @@ static GRenderingLine *disassemble_binary_parts(GDelayedDisassembly *disass, GBi
done += len;
gtk_extended_status_bar_update_activity(statusbar, id, done * 1.0 / sum);
-
+#if 0
/* Ajout des prototypes de fonctions */
- for (k = 0; k < count; k++)
+ printf("BASE == 0x%08llx\n", base);
+
+ for (; k < count; k++)
{
routine_offset = g_binary_routine_get_address(routines[k]);
@@ -399,7 +422,7 @@ static GRenderingLine *disassemble_binary_parts(GDelayedDisassembly *disass, GBi
free(routine_desc);
}
-
+#endif
}
return result;