diff options
author | Peter Schauer <Peter.Schauer@mytum.de> | 1994-02-08 09:12:06 +0000 |
---|---|---|
committer | Peter Schauer <Peter.Schauer@mytum.de> | 1994-02-08 09:12:06 +0000 |
commit | 5c9b5f58f30bc472f69578c8702aeea408a4433e (patch) | |
tree | 9deabdf58d03a5ec2c12e892ff8b9cbdb466ecfb /opcodes/i386-dis.c | |
parent | 4c1b6b07eaabec2efbe3d7145aaa57ef2338e6dd (diff) | |
download | gdb-5c9b5f58f30bc472f69578c8702aeea408a4433e.zip gdb-5c9b5f58f30bc472f69578c8702aeea408a4433e.tar.gz gdb-5c9b5f58f30bc472f69578c8702aeea408a4433e.tar.bz2 |
* dis-buf.c, i386-dis.c: Include <string.h>.
Diffstat (limited to 'opcodes/i386-dis.c')
-rw-r--r-- | opcodes/i386-dis.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c index b5d5c7d..3be5ac7 100644 --- a/opcodes/i386-dis.c +++ b/opcodes/i386-dis.c @@ -1,5 +1,5 @@ /* Print i386 instructions for GDB, the GNU debugger. - Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc. + Copyright (C) 1988, 1989, 1991, 1993, 1994 Free Software Foundation, Inc. This file is part of GDB. @@ -33,6 +33,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ */ #include "dis-asm.h" +#include <string.h> #define MAXLEN 20 @@ -1045,11 +1046,17 @@ print_insn_i386 (pc, info) else dp = &dis386[*codep]; codep++; + + /* Fetch the mod/reg/rm byte. FIXME: We should be only fetching + this if we need it. As it is, this code loses if there is a + one-byte instruction (without a mod/reg/rm byte) at the end of + the address space. */ + FETCH_DATA (info, codep + 1); mod = (*codep >> 6) & 3; reg = (*codep >> 3) & 7; rm = *codep & 7; - + if (dp->name == NULL && dp->bytemode1 == FLOATCODE) { dofloat (); |