formatting cleanups
[deliverable/binutils-gdb.git] / gdb / z8k-tdep.c
index 65f73f07aedb0df7955a3478411eeae07761cde1..6289ac6951464f1d5f39acce7e06c3697448ca9d 100644 (file)
@@ -28,7 +28,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "symtab.h"
 #include "gdbcmd.h"
 #include "gdbtypes.h"
-
+#include "dis-asm.h"
 /* Return the saved PC from this frame.
 
    If the frame has a memory copy of SRP_REGNUM, use that.  If not,
@@ -208,19 +208,17 @@ print_insn (memaddr, stream)
      CORE_ADDR memaddr;
      FILE *stream;
 {
-  char temp[20];
   disassemble_info info;
 
   GDB_INIT_DISASSEMBLE_INFO(info, stream);
 
-  read_memory (memaddr, temp, 20);
   if (BIG)
     {
-      return print_insn_z8001 (memaddr, temp, &info);
+      return print_insn_z8001 ((bfd_vma) memaddr, &info);
     }
   else
     {
-      return print_insn_z8002 (memaddr, temp, &info);
+      return print_insn_z8002 ((bfd_vma) memaddr, &info);
     }
 }
 
@@ -235,16 +233,15 @@ NEXT_PROLOGUE_INSN (addr, lim, pword1)
      CORE_ADDR lim;
      short *pword1;
 {
+  char buf[2];
   if (addr < lim + 8)
     {
-      read_memory (addr, pword1, sizeof (*pword1));
-      SWAP_TARGET_AND_HOST (pword1, sizeof (short));
+      read_memory (addr, buf, 2);
+      *pword1 = extract_signed_integer (buf, 2);
 
       return addr + 2;
     }
-
   return 0;
-
 }
 
 /* Put here the code to store, into a struct frame_saved_regs,
This page took 0.024506 seconds and 4 git commands to generate.