From: kettenis Date: Sun, 12 Jun 2011 18:21:54 +0000 (+0000) Subject: * i386-tdep.c (i386_match_insn_block): Use length of the proper X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=25d1cffb3c548648b751d64234590fcc0fd5eb22;p=pf3gnuchains%2Fpf3gnuchains4x.git * i386-tdep.c (i386_match_insn_block): Use length of the proper instruction when walking back through the instruction stream. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c72fda47fc..ab49a3fb58 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2011-06-12 Mark Kettenis + + * i386-tdep.c (i386_match_insn_block): Use length of the proper + instruction when walking back through the instruction stream. + 2011-06-10 Jan Kratochvil * symtab.c (output_partial_symbol_filename): Exchange the filename and diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index b2b74121a6..8355508136 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -1191,14 +1191,14 @@ i386_match_insn_block (CORE_ADDR pc, struct i386_insn *insn_patterns) if (insn == NULL) return 0; - current_pc = pc - insn->len; + current_pc = pc; ix = insn - insn_patterns; for (i = ix - 1; i >= 0; i--) { + current_pc -= insn_patterns[i].len; + if (!i386_match_pattern (current_pc, insn_patterns[i])) return 0; - - current_pc -= insn_patterns[i].len; } current_pc = pc + insn->len;