diff options
| author | Cyrille Bagard <nocbos@gmail.com> | 2010-06-01 22:53:05 (GMT) | 
|---|---|---|
| committer | Cyrille Bagard <nocbos@gmail.com> | 2010-06-01 22:53:05 (GMT) | 
| commit | e72eea33b9967d4169d2c8ffcb4a9e85c4c3ee8c (patch) | |
| tree | d376a1bded84bcd82ff28d0a1c7fb0c062c9a663 /src/analysis | |
| parent | 6a2287739080535fd9f82ab2453abe916a9bc28d (diff) | |
Registered all found DEX routines.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@164 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis')
| -rw-r--r-- | src/analysis/binary.c | 29 | 
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;  | 
