Add `set print repeats' tests for C/C++ arrays
[binutils-gdb.git] / gdb / ft32-tdep.c
index 57c1bbba0c4d7c3519846e02abff07d69172f78e..34703cc3e12542d5074a82fd4e347235c696cb88 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for FT32.
 
-   Copyright (C) 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2009-2022 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -109,7 +109,10 @@ static struct type *
 ft32_register_type (struct gdbarch *gdbarch, int reg_nr)
 {
   if (reg_nr == FT32_PC_REGNUM)
-    return gdbarch_tdep (gdbarch)->pc_type;
+    {
+      ft32_gdbarch_tdep *tdep = (ft32_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+      return tdep->pc_type;
+    }
   else if (reg_nr == FT32_SP_REGNUM || reg_nr == FT32_FP_REGNUM)
     return builtin_type (gdbarch)->builtin_data_ptr;
   else
@@ -144,7 +147,7 @@ ft32_store_return_value (struct type *type, struct regcache *regcache,
 
 static ULONGEST
 ft32_fetch_instruction (CORE_ADDR a, int *isize,
-                       enum bfd_endian byte_order)
+                       enum bfd_endian byte_order)
 {
   unsigned int sc[2];
   ULONGEST inst;
@@ -525,6 +528,7 @@ ft32_frame_prev_register (struct frame_info *this_frame,
 
 static const struct frame_unwind ft32_frame_unwind =
 {
+  "ft32 prologue",
   NORMAL_FRAME,
   default_frame_unwind_stop_reason,
   ft32_frame_this_id,
@@ -558,7 +562,6 @@ static struct gdbarch *
 ft32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 {
   struct gdbarch *gdbarch;
-  struct gdbarch_tdep *tdep;
   struct type *void_type;
   struct type *func_void_type;
 
@@ -568,7 +571,7 @@ ft32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
     return arches->gdbarch;
 
   /* Allocate space for the new architecture.  */
-  tdep = XCNEW (struct gdbarch_tdep);
+  ft32_gdbarch_tdep *tdep = new ft32_gdbarch_tdep;
   gdbarch = gdbarch_alloc (&info, tdep);
 
   /* Create a type for PC.  We can't use builtin types here, as they may not