diff options
author | Mark Kettenis <kettenis@gnu.org> | 2005-07-18 19:18:41 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2005-07-18 19:18:41 +0000 |
commit | 613e81350872d53825863c0f87edecaf99f09e10 (patch) | |
tree | eb8963b16fedf82f493ccac135be024b15ef7c7c /gdb/i386-tdep.c | |
parent | 718ddfc073092b46dde6d7c1eea2057808f8e554 (diff) | |
download | gdb-613e81350872d53825863c0f87edecaf99f09e10.zip gdb-613e81350872d53825863c0f87edecaf99f09e10.tar.gz gdb-613e81350872d53825863c0f87edecaf99f09e10.tar.bz2 |
Jason Molenda <jmolenda@apple.com>
* i386-tdep.c (i386_match_insn): Match complete instruction
pattern.
Diffstat (limited to 'gdb/i386-tdep.c')
-rw-r--r-- | gdb/i386-tdep.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 7c04787..3fd82a6 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -499,7 +499,8 @@ i386_match_insn (CORE_ADDR pc, struct i386_insn *skip_insns) { if ((op & insn->mask[0]) == insn->insn[0]) { - unsigned char buf[I386_MAX_INSN_LEN - 1]; + gdb_byte buf[I386_MAX_INSN_LEN - 1]; + int insn_matched = 1; size_t i; gdb_assert (insn->len > 1); @@ -509,10 +510,11 @@ i386_match_insn (CORE_ADDR pc, struct i386_insn *skip_insns) for (i = 1; i < insn->len; i++) { if ((buf[i - 1] & insn->mask[i]) != insn->insn[i]) - break; - - return insn; + insn_matched = 0; } + + if (insn_matched) + return insn; } } |