diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2008-07-31 21:46:47 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2008-07-31 21:46:47 (GMT) |
commit | 3786e818fdf8731dd6f310f0aaac75d431646160 (patch) | |
tree | a1dc1d1ed27c56d7ae2e361102fef7310a9b1a21 /src/binary.c | |
parent | 57758c2cd11938e3e4c6e45b983cee4c2269ff44 (diff) |
Handled the virtual offset and fixed the operand-size overriding.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@11 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/binary.c')
-rw-r--r-- | src/binary.c | 12 |
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); |