- if (!(raw & 0x80008000))
- {
- /* 16bits instruction. */
- static gdb_byte big_breakpoint16[] = { 0x60, 0x02 };
- *pcptr &= ~0x1;
- *lenptr = sizeof (big_breakpoint16);
- return big_breakpoint16;
- }
+ /* 16bits instruction. */
+ *pcptr &= ~0x1;
+ return 2;
+ }
+ else
+ {
+ /* 32bits instruction. */
+ *pcptr &= ~0x3;
+ return 4;
+ }
+}
+
+/* Implement the sw_breakpoint_from_kind gdbarch method. */
+
+static const gdb_byte *
+score7_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
+{
+ enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+
+ *size = kind;
+
+ if (kind == 4)
+ {
+ static gdb_byte big_breakpoint32[] = { 0x80, 0x00, 0x80, 0x06 };
+ static gdb_byte little_breakpoint32[] = { 0x06, 0x80, 0x00, 0x80 };
+
+ if (byte_order == BFD_ENDIAN_BIG)
+ return big_breakpoint32;