* h8300s now new target, not alias of h8300h
[deliverable/binutils-gdb.git] / gdb / mn10300-tdep.c
index 1e684f8cbbefe1272b292c197764d17234524ba4..0a5704b17045c82516074bd7242ea967430afabd 100644 (file)
@@ -1,6 +1,7 @@
 /* Target-dependent code for the Matsushita MN10300 for GDB, the GNU debugger.
-   Copyright 1996, 1997, 1998, 1999, 2000, 2001
-   Free Software Foundation, Inc.
+
+   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software
+   Foundation, Inc.
 
    This file is part of GDB.
 
@@ -187,7 +188,7 @@ mn10300_use_struct_convention (int gcc_p, struct type *type)
    so we need a single byte breakpoint.  Matsushita hasn't defined
    one, so we defined it ourselves.  */
 
-static unsigned char *
+const static unsigned char *
 mn10300_breakpoint_from_pc (CORE_ADDR *bp_addr, int *bp_size)
 {
   static char breakpoint[] =
@@ -294,7 +295,8 @@ set_movm_offsets (struct frame_info *fi, int movm_args)
    In gcc/config/mn13000/mn10300.c, the expand_prologue prologue
    function is pretty readable, and has a nice explanation of how the
    prologue is generated.  The prologues generated by that code will
-   have the following form:
+   have the following form (NOTE: the current code doesn't handle all
+   this!):
 
    + If this is an old-style varargs function, then its arguments
      need to be flushed back to the stack:
@@ -323,6 +325,9 @@ set_movm_offsets (struct frame_info *fi, int movm_args)
         fmov fsM,(OFFSETM,sp)
         ...
 
+       Note that, if OFFSETN happens to be zero, you'll get the
+       different opcode: fmov fsN,(sp)
+
        . Or, set a0 to the start of the save area, and then use
        post-increment addressing to save the FP registers.
 
@@ -1006,7 +1011,7 @@ mn10300_print_register (const char *name, int regnum, int reg_width)
     printf_filtered ("%s: ", name);
 
   /* Get the data */
-  if (read_relative_register_raw_bytes (regnum, raw_buffer))
+  if (!frame_register_read (selected_frame, regnum, raw_buffer))
     {
       printf_filtered ("[invalid]");
       return;
@@ -1014,7 +1019,7 @@ mn10300_print_register (const char *name, int regnum, int reg_width)
   else
     {
       int byte;
-      if (TARGET_BYTE_ORDER == BIG_ENDIAN)
+      if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
        {
          for (byte = REGISTER_RAW_SIZE (regnum) - REGISTER_VIRTUAL_SIZE (regnum);
               byte < REGISTER_RAW_SIZE (regnum);
This page took 0.024538 seconds and 4 git commands to generate.