aboutsummaryrefslogtreecommitdiff
path: root/gdb/core.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/core.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/core.c')
-rw-r--r--gdb/core.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gdb/core.c b/gdb/core.c
index ca52e39..a357352 100644
--- a/gdb/core.c
+++ b/gdb/core.c
@@ -28,6 +28,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "bfd.h"
#include "target.h"
#include "gdbcore.h"
+#include "dis-asm.h"
extern char registers[];
@@ -160,6 +161,27 @@ read_memory (memaddr, myaddr, len)
memory_error (status, memaddr);
}
+/* Like target_read_memory, but slightly different parameters. */
+int
+dis_asm_read_memory (memaddr, myaddr, len, info)
+ bfd_vma memaddr;
+ bfd_byte *myaddr;
+ int len;
+ disassemble_info *info;
+{
+ return target_read_memory (memaddr, myaddr, len);
+}
+
+/* Like memory_error with slightly different parameters. */
+void
+dis_asm_memory_error (status, memaddr, info)
+ int status;
+ bfd_vma memaddr;
+ disassemble_info *info;
+{
+ memory_error (status, memaddr);
+}
+
/* Same as target_write_memory, but report an error if can't write. */
void
write_memory (memaddr, myaddr, len)