PR ld/12549
[binutils-gdb.git] / gdb / mn10300-tdep.c
index 7cd22c6d65b0ec1113b55e9e971dc3acc4353b1c..cc0409fdc4ce65167ed250ccf38514171f2ab39a 100644 (file)
@@ -1,7 +1,6 @@
 /* Target-dependent code for the Matsushita MN10300 for GDB, the GNU debugger.
 
-   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-   2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+   Copyright (C) 1996-2013 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -25,7 +24,7 @@
 #include "regcache.h"
 #include "gdb_string.h"
 #include "gdb_assert.h"
-#include "gdbcore.h"   /* for write_memory_unsigned_integer */
+#include "gdbcore.h"   /* For write_memory_unsigned_integer.  */
 #include "value.h"
 #include "gdbtypes.h"
 #include "frame.h"
@@ -234,7 +233,7 @@ mn10300_extract_return_value (struct gdbarch *gdbarch, struct type *type,
    from WRITEBUF into REGCACHE.  */
 
 static enum return_value_convention
-mn10300_return_value (struct gdbarch *gdbarch, struct type *func_type,
+mn10300_return_value (struct gdbarch *gdbarch, struct value *function,
                      struct type *type, struct regcache *regcache,
                      gdb_byte *readbuf, const gdb_byte *writebuf)
 {
@@ -388,7 +387,7 @@ mn10300_analyze_prologue (struct gdbarch *gdbarch,
                           struct mn10300_prologue *result)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  CORE_ADDR pc, next_pc;
+  CORE_ADDR pc;
   int rn;
   pv_t regs[MN10300_MAX_NUM_REGS];
   struct pv_area *stack;
@@ -1062,7 +1061,7 @@ mn10300_analyze_prologue (struct gdbarch *gdbarch,
 static CORE_ADDR
 mn10300_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
 {
-  char *name;
+  const char *name;
   CORE_ADDR func_addr, func_end;
   struct mn10300_prologue p;
 
@@ -1142,7 +1141,8 @@ mn10300_frame_this_id (struct frame_info *this_frame,
                       void **this_prologue_cache,
                       struct frame_id *this_id)
 {
-  *this_id = frame_id_build (mn10300_frame_base (this_frame, this_prologue_cache),
+  *this_id = frame_id_build (mn10300_frame_base (this_frame,
+                                                this_prologue_cache),
                             get_frame_func (this_frame));
 
 }
@@ -1173,6 +1173,7 @@ mn10300_frame_prev_register (struct frame_info *this_frame,
 
 static const struct frame_unwind mn10300_frame_unwind = {
   NORMAL_FRAME,
+  default_frame_unwind_stop_reason,
   mn10300_frame_this_id, 
   mn10300_frame_prev_register,
   NULL,
@@ -1263,7 +1264,7 @@ mn10300_push_dummy_call (struct gdbarch *gdbarch,
   else
     regs_used = 0;
 
-  /* Push all arguments onto the stack. */
+  /* Push all arguments onto the stack.  */
   for (argnum = 0; argnum < nargs; argnum++)
     {
       /* FIXME what about structs?  Unions?  */
@@ -1332,7 +1333,7 @@ mn10300_push_dummy_call (struct gdbarch *gdbarch,
      Note that we don't update the return value though because that's
      the value of the stack just after pushing the arguments, but prior
      to performing the call.  This value is needed in order to
-     construct the frame ID of the dummy call.   */
+     construct the frame ID of the dummy call.  */
   {
     CORE_ADDR func_addr = find_function_addr (target_func, NULL);
     CORE_ADDR unwound_sp 
@@ -1436,7 +1437,7 @@ mn10300_gdbarch_init (struct gdbarch_info info,
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
   /* Breakpoints.  */
   set_gdbarch_breakpoint_from_pc (gdbarch, mn10300_breakpoint_from_pc);
-  /* decr_pc_after_break? */
+  /* decr_pc_after_break?  */
   /* Disassembly.  */
   set_gdbarch_print_insn (gdbarch, print_insn_mn10300);
 
@@ -1456,7 +1457,7 @@ mn10300_gdbarch_init (struct gdbarch_info info,
   return gdbarch;
 }
  
-/* Dump out the mn10300 specific architecture information. */
+/* Dump out the mn10300 specific architecture information.  */
 
 static void
 mn10300_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)