summaryrefslogtreecommitdiff
path: root/src/binary.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/binary.c')
-rw-r--r--src/binary.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/binary.c b/src/binary.c
index 5f07703..73960ac 100644
--- a/src/binary.c
+++ b/src/binary.c
@@ -141,10 +141,12 @@ void fill_snippet(GtkSnippet *snippet)
if (bin_data != NULL)
- find_text_data(bin_data, &pos, &len);
+ find_text_data(bin_data, &pos, &len, &base);
+ offset = base;
+
gtk_snippet_set_processor(snippet, proc);
@@ -161,7 +163,7 @@ void fill_snippet(GtkSnippet *snippet)
{
offset = base + pos;
- instr = decode_instruction(proc, &bin_data[start], &pos, len);
+ instr = decode_instruction(proc, &bin_data[start], &pos, len, offset);
gtk_snippet_add_line(snippet, offset, instr, NULL);
@@ -182,7 +184,7 @@ void fill_snippet(GtkSnippet *snippet)
{
offset = base + pos;
- instr = decode_instruction(proc, data, &pos, len);
+ instr = decode_instruction(proc, data, &pos, len, offset);
gtk_snippet_add_line(snippet, offset, instr, NULL);
@@ -197,7 +199,7 @@ void fill_snippet(GtkSnippet *snippet)
{
offset = base + pos;
- instr = decode_instruction(proc, data, &pos, len);
+ instr = decode_instruction(proc, data, &pos, len, offset);
gtk_snippet_add_line(snippet, offset, instr, NULL);
@@ -212,7 +214,7 @@ void fill_snippet(GtkSnippet *snippet)
{
offset = base + pos;
- instr = decode_instruction(proc, data, &pos, len);
+ instr = decode_instruction(proc, data, &pos, len, offset);
gtk_snippet_add_line(snippet, offset, instr, NULL);