summaryrefslogtreecommitdiff
path: root/src/analysis
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2009-06-01 17:49:32 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2009-06-01 17:49:32 (GMT)
commitf6252e57c770fea10439659f35a69a783ff849d3 (patch)
treeefc64ca7703648e439483ee6f4c14db855d7f952 /src/analysis
parent1b8152d6f95b03f81aa6a4043c23a45a9f74c418 (diff)
Provided found MIPS routines.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@69 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis')
-rw-r--r--src/analysis/binary.c8
-rw-r--r--src/analysis/line_code.c2
-rw-r--r--src/analysis/line_comment.c10
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);