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 | |
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.
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/i386-tdep.c | 10 |
2 files changed, 12 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b200e70..eb827f7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,4 +1,10 @@ 2005-07-18 Mark Kettenis <kettenis@gnu.org> + Jason Molenda <jmolenda@apple.com> + + * i386-tdep.c (i386_match_insn): Match complete instruction + pattern. + +2005-07-18 Mark Kettenis <kettenis@gnu.org> * i386-tdep.c (i386_reg_struct_return_p): Handle structures with a single 'long double' member correctly. 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; } } |