PR ld/21334: Always call `_bfd_elf_link_renumber_dynsyms' if required
[deliverable/binutils-gdb.git] / gdb / m32c-tdep.c
index adfa873a2bd052988c567ccb3792ec40d08af56a..737637299f7c60fdda9ef0ebbf1916989a55eb88 100644 (file)
@@ -1,6 +1,6 @@
 /* Renesas M32C target-dependent code for GDB, the GNU debugger.
 
-   Copyright (C) 2004-2016 Free Software Foundation, Inc.
+   Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -990,16 +990,9 @@ make_regs (struct gdbarch *arch)
 
 \f
 /* Breakpoints.  */
+constexpr gdb_byte m32c_break_insn[] = { 0x00 };       /* brk */
 
-static const unsigned char *
-m32c_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pc, int *len)
-{
-  static unsigned char break_insn[] = { 0x00 };        /* brk */
-
-  *len = sizeof (break_insn);
-  return break_insn;
-}
-
+typedef BP_MANIPULATION (m32c_break_insn) m32c_breakpoint;
 
 \f
 /* Prologue analysis.  */
@@ -2018,7 +2011,7 @@ m32c_reg_arg_type (struct type *type)
   return (code == TYPE_CODE_INT
          || code == TYPE_CODE_ENUM
          || code == TYPE_CODE_PTR
-         || code == TYPE_CODE_REF
+         || TYPE_IS_REFERENCE (type)
          || code == TYPE_CODE_BOOL
          || code == TYPE_CODE_CHAR);
 }
@@ -2440,8 +2433,7 @@ m32c_m16c_address_to_pointer (struct gdbarch *gdbarch,
 {
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   enum type_code target_code;
-  gdb_assert (TYPE_CODE (type) == TYPE_CODE_PTR ||
-             TYPE_CODE (type) == TYPE_CODE_REF);
+  gdb_assert (TYPE_CODE (type) == TYPE_CODE_PTR || TYPE_IS_REFERENCE (type));
 
   target_code = TYPE_CODE (TYPE_TARGET_TYPE (type));
 
@@ -2520,8 +2512,7 @@ m32c_m16c_pointer_to_address (struct gdbarch *gdbarch,
   CORE_ADDR ptr;
   enum type_code target_code;
 
-  gdb_assert (TYPE_CODE (type) == TYPE_CODE_PTR ||
-             TYPE_CODE (type) == TYPE_CODE_REF);
+  gdb_assert (TYPE_CODE (type) == TYPE_CODE_PTR || TYPE_IS_REFERENCE (type));
 
   ptr = extract_unsigned_integer (buf, TYPE_LENGTH (type), byte_order);
 
@@ -2652,7 +2643,8 @@ m32c_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_print_insn (gdbarch, print_insn_m32c);
 
   /* Breakpoints.  */
-  set_gdbarch_breakpoint_from_pc (gdbarch, m32c_breakpoint_from_pc);
+  set_gdbarch_breakpoint_kind_from_pc (gdbarch, m32c_breakpoint::kind_from_pc);
+  set_gdbarch_sw_breakpoint_from_kind (gdbarch, m32c_breakpoint::bp_from_kind);
 
   /* Prologue analysis and unwinding.  */
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
This page took 0.025079 seconds and 4 git commands to generate.