aboutsummaryrefslogtreecommitdiff
path: root/gdb/i386-tdep.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2011-06-12 18:21:55 +0000
committerMark Kettenis <kettenis@gnu.org>2011-06-12 18:21:55 +0000
commit8bbdd3f4631f74565ffa27111d5c19c56cd87926 (patch)
treeef6bf05b96d40a88fcfd01b76927501a9a9b0743 /gdb/i386-tdep.c
parent0222e8baa67fd242d781e864fc8e9ca228dfe91e (diff)
downloadgdb-8bbdd3f4631f74565ffa27111d5c19c56cd87926.zip
gdb-8bbdd3f4631f74565ffa27111d5c19c56cd87926.tar.gz
gdb-8bbdd3f4631f74565ffa27111d5c19c56cd87926.tar.bz2
* i386-tdep.c (i386_match_insn_block): Use length of the proper
instruction when walking back through the instruction stream.
Diffstat (limited to 'gdb/i386-tdep.c')
-rw-r--r--gdb/i386-tdep.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index b2b7412..8355508 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;