GDBARCH_BREAKPOINT_MANIPULATION and SET_GDBARCH_BREAKPOINT_MANIPULATION
[deliverable/binutils-gdb.git] / gdb / rl78-tdep.c
index 4818d3816f4c2f6ecb95db7b05f8d49b9443f689..1e9d4358978eadc002b98cdd999ba4fd9eb21c4a 100644 (file)
@@ -768,21 +768,13 @@ rl78_pseudo_register_write (struct gdbarch *gdbarch,
     gdb_assert_not_reached ("invalid pseudo register number");
 }
 
-/* Implement the "breakpoint_from_pc" gdbarch method.  */
+/* The documented BRK instruction is actually a two byte sequence,
+   {0x61, 0xcc}, but instructions may be as short as one byte.
+   Correspondence with Renesas revealed that the one byte sequence
+   0xff is used when a one byte breakpoint instruction is required.  */
+static gdb_byte breakpoint[] = { 0xff };
 
-static const gdb_byte *
-rl78_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr,
-                         int *lenptr)
-{
-  /* The documented BRK instruction is actually a two byte sequence,
-     {0x61, 0xcc}, but instructions may be as short as one byte.
-     Correspondence with Renesas revealed that the one byte sequence
-     0xff is used when a one byte breakpoint instruction is required.  */
-  static gdb_byte breakpoint[] = { 0xff };
-
-  *lenptr = sizeof breakpoint;
-  return breakpoint;
-}
+GDBARCH_BREAKPOINT_MANIPULATION (rl78, breakpoint)
 
 /* Define a "handle" struct for fetching the next opcode.  */
 
@@ -1460,7 +1452,7 @@ rl78_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_addr_bits_remove (gdbarch, rl78_addr_bits_remove);
 
   /* Breakpoints.  */
-  set_gdbarch_breakpoint_from_pc (gdbarch, rl78_breakpoint_from_pc);
+  SET_GDBARCH_BREAKPOINT_MANIPULATION (rl78);
   set_gdbarch_decr_pc_after_break (gdbarch, 1);
 
   /* Disassembly.  */
This page took 0.024359 seconds and 4 git commands to generate.