Build unavailable-stack frames for tracepoint.
[deliverable/binutils-gdb.git] / gdb / tilegx-tdep.c
index 01742e8aa2c77db1ef9a91896a8af999f1492997..bef1516ae25d08ab75087b2268cf3d29b7fab159 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for the Tilera TILE-Gx processor.
 
-   Copyright (C) 2012-2014 Free Software Foundation, Inc.
+   Copyright (C) 2012-2016 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -30,7 +30,6 @@
 #include "value.h"
 #include "dis-asm.h"
 #include "inferior.h"
-#include <string.h>
 #include "arch-utils.h"
 #include "floatformat.h"
 #include "regcache.h"
@@ -334,7 +333,7 @@ tilegx_push_dummy_call (struct gdbarch *gdbarch,
 
       typelen = TYPE_LENGTH (value_enclosing_type (args[j]));
       slacklen = align_up (typelen, 8) - typelen;
-      val = xmalloc (typelen + slacklen);
+      val = (gdb_byte *) xmalloc (typelen + slacklen);
       back_to = make_cleanup (xfree, val);
       memcpy (val, contents, typelen);
       memset (val + typelen, 0, slacklen);
@@ -438,7 +437,7 @@ tilegx_analyze_prologue (struct gdbarch* gdbarch,
          status = safe_frame_unwind_memory (next_frame, instbuf_start,
                                             instbuf, instbuf_size);
          if (status == 0)
-           memory_error (status, next_addr);
+           memory_error (TARGET_XFER_E_IO, next_addr);
        }
 
       reverse_frame_valid = 0;
@@ -772,10 +771,10 @@ tilegx_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
                                  NULL, NULL);
 }
 
-/* This is the implementation of gdbarch method in_function_epilogue_p.  */
+/* This is the implementation of gdbarch method stack_frame_destroyed_p.  */
 
 static int
-tilegx_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
+tilegx_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
 {
   CORE_ADDR func_addr = 0, func_end = 0;
 
@@ -870,7 +869,7 @@ tilegx_frame_cache (struct frame_info *this_frame, void **this_cache)
   int i;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct tilegx_frame_cache *) *this_cache;
 
   cache = FRAME_OBSTACK_ZALLOC (struct tilegx_frame_cache);
   *this_cache = cache;
@@ -1052,8 +1051,7 @@ tilegx_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
   set_gdbarch_skip_prologue (gdbarch, tilegx_skip_prologue);
 
-  set_gdbarch_in_function_epilogue_p (gdbarch,
-                                     tilegx_in_function_epilogue_p);
+  set_gdbarch_stack_frame_destroyed_p (gdbarch, tilegx_stack_frame_destroyed_p);
 
   /* Map debug registers into internal register numbers.  */
   set_gdbarch_dwarf2_reg_to_regnum (gdbarch, tilegx_dwarf2_reg_to_regnum);
This page took 0.025461 seconds and 4 git commands to generate.