aboutsummaryrefslogtreecommitdiff
path: root/gdb/mips-pinsn.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-03-31 21:43:25 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-03-31 21:43:25 +0000
commit5d0734a7d74cf01b73303aeb884b719b4b220035 (patch)
treef24aaaf513a030c64dd9b0dae5ddb405a1c214f3 /gdb/mips-pinsn.c
parent79337c85b8e706bd247a99d26a237f6dddf4ffe5 (diff)
downloadgdb-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/mips-pinsn.c')
-rw-r--r--gdb/mips-pinsn.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/gdb/mips-pinsn.c b/gdb/mips-pinsn.c
index da4232e..eec22c5 100644
--- a/gdb/mips-pinsn.c
+++ b/gdb/mips-pinsn.c
@@ -20,9 +20,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "defs.h"
#include "dis-asm.h"
-/* Mips instructions are never longer than this many bytes. */
-#define MAXLEN 4
-
/* Print the mips instruction at address MEMADDR in debugged memory,
on STREAM. Returns length of the instruction, in bytes, which
is always 4. */
@@ -32,16 +29,13 @@ print_insn (memaddr, stream)
CORE_ADDR memaddr;
FILE *stream;
{
- unsigned char buffer[MAXLEN];
disassemble_info info;
GDB_INIT_DISASSEMBLE_INFO(info, stream);
- read_memory (memaddr, buffer, MAXLEN);
-
/* print_insn_mips is in opcodes/mips-dis.c. */
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
- print_insn_big_mips (memaddr, buffer, &info);
+ print_insn_big_mips (memaddr, &info);
else
- print_insn_little_mips (memaddr, buffer, &info);
+ print_insn_little_mips (memaddr, &info);
}