summaryrefslogtreecommitdiff
path: root/src/analysis/binary.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis/binary.c')
-rw-r--r--src/analysis/binary.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/analysis/binary.c b/src/analysis/binary.c
index e74680e..d7d050b 100644
--- a/src/analysis/binary.c
+++ b/src/analysis/binary.c
@@ -70,7 +70,7 @@ struct _openida_binary
GArchProcessor *proc; /* Architecture du binaire */
GRenderingLine *lines; /* Lignes de rendu en place */
- disass_options options; /* Options de désassemblage */
+ GRenderingOptions *options; /* Options de désassemblage */
};
@@ -137,11 +137,13 @@ openida_binary *load_binary_file(const char *filename)
result->proc = get_arch_processor_from_format(result->format);
- result->options.show_address = true;
- result->options.show_code = true;
+ result->options = g_rendering_options_new(result->format, result->proc);
- result->options.format = result->format;
- result->options.proc = result->proc;
+ g_rendering_options_show_address(result->options, MRD_BLOCK, true);
+ g_rendering_options_show_code(result->options, MRD_BLOCK, true);
+
+ g_rendering_options_show_address(result->options, MRD_GRAPH, true);
+ g_rendering_options_show_code(result->options, MRD_GRAPH, false);
disassemble_openida_binary(result);
@@ -300,9 +302,9 @@ exe_format *get_openida_binary_format(const openida_binary *binary)
* *
******************************************************************************/
-disass_options *get_openida_binary_options(const openida_binary *binary)
+GRenderingOptions *get_openida_binary_options(const openida_binary *binary)
{
- return &binary->options;
+ return binary->options;
}
@@ -642,7 +644,7 @@ void disassemble_openida_binary(openida_binary *binary)
instr = g_arch_processor_decode_instruction(binary->proc, &binary->bin_data[start], &pos, len, start, addr);
- line = g_code_line_new(addr, instr, &binary->options);
+ line = g_code_line_new(addr, instr, binary->options);
g_rendering_line_add_to_lines(&binary->lines, line);
}
@@ -657,7 +659,7 @@ void disassemble_openida_binary(openida_binary *binary)
routine_desc = g_binary_routine_to_string(routines[k]);
- line = g_comment_line_new(routine_offset, routine_desc, &binary->options);
+ line = g_comment_line_new(routine_offset, routine_desc, binary->options);
g_rendering_line_insert_into_lines(&binary->lines, line, true);
free(routine_desc);