Sigh, should have updated the copyright date in the
[deliverable/binutils-gdb.git] / gdb / m88k-tdep.c
index afe1ca2d7e188673f8ea598fba89ae6d4dcd1fab..86ca0982bfe9cae8e3602b7daba195c5c7f3a55a 100644 (file)
@@ -1,5 +1,6 @@
 /* Target-machine dependent code for Motorola 88000 series, for GDB.
-   Copyright 1988, 1990, 1991, 1994, 1995 Free Software Foundation, Inc.
+   Copyright 1988, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000,
+   2001 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -26,6 +27,7 @@
 #include "symtab.h"
 #include "setjmp.h"
 #include "value.h"
+#include "regcache.h"
 
 /* Size of an instruction */
 #define        BYTES_PER_88K_INSN      4
@@ -37,6 +39,19 @@ void frame_find_saved_regs ();
 
 int target_is_m88110 = 0;
 
+/* The type of a register.  */
+struct type *
+m88k_register_type (int regnum)
+{
+  if (regnum >= XFP_REGNUM)
+    return builtin_type_m88110_ext;
+  else if (regnum == PC_REGNUM || regnum == FP_REGNUM || regnum == SP_REGNUM)
+    return builtin_type_void_func_ptr;
+  else
+    return builtin_type_int32;
+}
+
+
 /* The m88k kernel aligns all instructions on 4-byte boundaries.  The
    kernel also uses the least significant two bits for its own hocus
    pocus.  When gdb receives an address from the kernel, it needs to
@@ -244,7 +259,7 @@ examine_prologue (register CORE_ADDR ip, register CORE_ADDR limit,
 {
   register CORE_ADDR next_ip;
   register int src;
-  unsigned int insn;
+  unsigned long insn;
   int size, offset;
   char must_adjust[32];                /* If set, must adjust offsets in fsr */
   int sp_offset = -1;          /* -1 means not set (valid must be mult of 8) */
@@ -387,7 +402,7 @@ end_of_prologue_found:
   /* (we hope...) */
   if (fsr->regs[SP_REGNUM] != 0
       && fsr->regs[SP_REGNUM] != frame_sp - sp_offset)
-    fprintf_unfiltered (gdb_stderr, "Bad saved SP value %x != %x, offset %x!\n",
+    fprintf_unfiltered (gdb_stderr, "Bad saved SP value %lx != %lx, offset %x!\n",
                        fsr->regs[SP_REGNUM],
                        frame_sp - sp_offset, sp_offset);
 
@@ -566,14 +581,12 @@ void
 pop_frame (void)
 {
   register struct frame_info *frame = get_current_frame ();
-  register CORE_ADDR fp;
   register int regnum;
   struct frame_saved_regs fsr;
 
-  fp = FRAME_FP (frame);
   get_frame_saved_regs (frame, &fsr);
 
-  if (PC_IN_CALL_DUMMY (read_pc (), read_register (SP_REGNUM), FRAME_FP (fi)))
+  if (PC_IN_CALL_DUMMY (read_pc (), read_register (SP_REGNUM), frame->frame))
     {
       /* FIXME: I think get_frame_saved_regs should be handling this so
          that we can deal with the saved registers properly (e.g. frame
This page took 0.024834 seconds and 4 git commands to generate.