diff options
Diffstat (limited to 'src/analysis')
-rw-r--r-- | src/analysis/binary.c | 8 | ||||
-rw-r--r-- | src/analysis/line_code.c | 2 | ||||
-rw-r--r-- | src/analysis/line_comment.c | 10 |
3 files changed, 13 insertions, 7 deletions
diff --git a/src/analysis/binary.c b/src/analysis/binary.c index d25a458..88201ac 100644 --- a/src/analysis/binary.c +++ b/src/analysis/binary.c @@ -645,14 +645,14 @@ void disassemble_openida_binary(openida_binary *binary) } /* Ajout des prototypes de fonctions */ -#if 0 + for (k = 0; k < routines_count; k++) { - routine_offset = get_binary_routine_offset(routines[k]); + routine_offset = g_binary_routine_get_address(routines[k]); if (!(base <= routine_offset && routine_offset < (base + len))) continue; - routine_desc = routine_to_string(routines[k]); + routine_desc = g_binary_routine_to_string(routines[k]); line = g_comment_line_new(routine_offset, routine_desc, &binary->options); g_rendering_line_insert_into_lines(&binary->lines, line, true); @@ -660,7 +660,7 @@ void disassemble_openida_binary(openida_binary *binary) free(routine_desc); } -#endif + } } diff --git a/src/analysis/line_code.c b/src/analysis/line_code.c index 44bb59f..a234055 100644 --- a/src/analysis/line_code.c +++ b/src/analysis/line_code.c @@ -106,8 +106,6 @@ static void g_code_line_init(GCodeLine *line) parent = G_RENDERING_LINE(line); - parent->offset = 0; - parent->type = RLT_CODE; parent->get_bin_len = (get_bin_len_fc)g_code_line_get_binary_len; diff --git a/src/analysis/line_comment.c b/src/analysis/line_comment.c index 6df7b96..ea6d6d6 100644 --- a/src/analysis/line_comment.c +++ b/src/analysis/line_comment.c @@ -99,6 +99,13 @@ static void g_comment_line_class_init(GCommentLineClass *klass) static void g_comment_line_init(GCommentLine *line) { + GRenderingLine *parent; /* Instance parente */ + + parent = G_RENDERING_LINE(line); + + parent->type = RLT_PROTOTYPE/* TODO */; + + parent->refresh_markup = (refresh_markup_fc)g_comment_line_refresh_markup; } @@ -171,7 +178,7 @@ void g_comment_line_refresh_markup(GCommentLine *line) G_RENDERING_LINE(line)->max_bin_len); len += G_RENDERING_LINE(line)->max_bin_len; - content[len] = '\0'; + content[len - 1] = '\0'; } @@ -231,6 +238,7 @@ GRenderingLine *g_comment_line_new(uint64_t offset, const char *comment, const d G_RENDERING_LINE(result)->offset = offset; result->comment = strdup(comment); + result->options = options; return G_RENDERING_LINE(result); |