diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-03-31 21:43:25 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-03-31 21:43:25 +0000 |
commit | 5d0734a7d74cf01b73303aeb884b719b4b220035 (patch) | |
tree | f24aaaf513a030c64dd9b0dae5ddb405a1c214f3 /gdb/i386-pinsn.c | |
parent | 79337c85b8e706bd247a99d26a237f6dddf4ffe5 (diff) | |
download | gdb-5d0734a7d74cf01b73303aeb884b719b4b220035.zip gdb-5d0734a7d74cf01b73303aeb884b719b4b220035.tar.gz gdb-5d0734a7d74cf01b73303aeb884b719b4b220035.tar.bz2 |
provide a new interface (using read_memory_func) to call the disassemblers
which copes with errors in a plausible way
Diffstat (limited to 'gdb/i386-pinsn.c')
-rw-r--r-- | gdb/i386-pinsn.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/gdb/i386-pinsn.c b/gdb/i386-pinsn.c index 6c88de9..b6d7fe9 100644 --- a/gdb/i386-pinsn.c +++ b/gdb/i386-pinsn.c @@ -20,9 +20,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "defs.h" #include "dis-asm.h" -#define MAXLEN 20 -/* Print the m68k instruction at address MEMADDR in debugged memory, +/* Print the instruction at address MEMADDR in debugged memory, on STREAM. Returns length of the instruction, in bytes. */ int @@ -30,16 +29,9 @@ print_insn (memaddr, stream) CORE_ADDR memaddr; FILE *stream; { - unsigned char buffer[MAXLEN]; - register int i; - register unsigned char *p; - register char *d; - register int bestmask; - int best; disassemble_info info; GDB_INIT_DISASSEMBLE_INFO(info, stream); - read_memory (memaddr, (char *) buffer, MAXLEN); - return print_insn_i386 (memaddr, buffer, &info); + return print_insn_i386 (memaddr, &info); } |