+2016-11-03 Yao Qi <yao.qi@linaro.org>
+ Pedro Alves <palves@redhat.com>
+
+ * aarch64-tdep.c (aarch64_default_breakpoint): Change it to
+ constexpr. Don't use GDBARCH_BREAKPOINT_MANIPULATION.
+ (aarch64_gdbarch_init): Don't use
+ SET_GDBARCH_BREAKPOINT_MANIPULATION.
+ * alpha-tdep.c (break_insn): Rename to alpha_break_insn.
+ Don't use GDBARCH_BREAKPOINT_MANIPULATION.
+ (alpha_gdbarch_init): Don't use
+ SET_GDBARCH_BREAKPOINT_MANIPULATION.
+ * arc-tdep.c (arc_gdbarch_init): Don't use
+ SET_GDBARCH_BREAKPOINT_MANIPULATION.
+ * arch-utils.h (GDBARCH_BREAKPOINT_MANIPULATION): Remove.
+ (struct bp_manipulation): New.
+ (SET_GDBARCH_BREAKPOINT_MANIPULATION): Remove.
+ (struct bp_manipulation_endian): New.
+ (BP_MANIPULATION): New.
+ (BP_MANIPULATION_ENDIAN): New.
+ * arm-tdep.c (arm_gdbarch_init): Don't use
+ SET_GDBARCH_BREAKPOINT_MANIPULATION.
+ * avr-tdep.c (avr_break_insn): Change it constexpr.
+ (avr_gdbarch_init): Don't use
+ SET_GDBARCH_BREAKPOINT_MANIPULATION.
+ * bfin-tdep.c (bfin_gdbarch_init): Likewise.
+ * cris-tdep.c (cris_gdbarch_init): Likewise.
+ * frv-tdep.c (breakpoint): Rename it to frv_break_insn, and
+ change its type to constexpr. Don't use
+ GDBARCH_BREAKPOINT_MANIPULATION.
+ (frv_gdbarch_init): Don't use
+ SET_GDBARCH_BREAKPOINT_MANIPULATION.
+ * ft32-tdep.c (breakpoint): Rename it to ft32_break_insn and
+ change its type to constexpr. Don't use
+ GDBARCH_BREAKPOINT_MANIPULATION.
+ (ft32_gdbarch_init): Don't use
+ SET_GDBARCH_BREAKPOINT_MANIPULATION.
+ * h8300-tdep.c (breakpoint): Rename it to h8300_break_insn.
+ Don't use GDBARCH_BREAKPOINT_MANIPULATION.
+ (h8300_gdbarch_init): Don't use
+ SET_GDBARCH_BREAKPOINT_MANIPULATION.
+ * hppa-tdep.c (breakpoint): Rename it to h8300_break_insn.
+ Don't use GDBARCH_BREAKPOINT_MANIPULATION.
+ (hppa_gdbarch_init): Don't use
+ SET_GDBARCH_BREAKPOINT_MANIPULATION.
+ * i386-tdep.c (break_insn): Rename it to i386_break_insn.
+ Don't use GDBARCH_BREAKPOINT_MANIPULATION.
+ (i386_gdbarch_init): Don't use
+ SET_GDBARCH_BREAKPOINT_MANIPULATION.
+ * iq2000-tdep.c (iq2000_gdbarch_init): Don't use
+ SET_GDBARCH_BREAKPOINT_MANIPULATION.
+ * lm32-tdep.c (breakpoint): Rename it to lm32_break_insn and
+ change its type to constexpr. Don't use
+ GDBARCH_BREAKPOINT_MANIPULATION.
+ (lm32_gdbarch_init): Don't use
+ SET_GDBARCH_BREAKPOINT_MANIPULATION.
+ * m32c-tdep.c (break_insn): Rename it to m32c_break_insn and change
+ its type to constexpr. Don't use GDBARCH_BREAKPOINT_MANIPULATION.
+ (m32c_gdbarch_init): Don't use
+ SET_GDBARCH_BREAKPOINT_MANIPULATION.
+ * m32r-tdep.c (m32r_gdbarch_init): Likewise.
+ * m68hc11-tdep.c (breakpoint): Rename it to m68hc11_break_insn and
+ change its type to constexpr.
+ Don't use GDBARCH_BREAKPOINT_MANIPULATION.
+ (m68hc11_gdbarch_init): Don't use SET_GDBARCH_BREAKPOINT_MANIPULATION.
+ * m68k-tdep.c (break_insn): Rename it to m68k_break_insn and change
+ its type to constexpr. Don't use GDBARCH_BREAKPOINT_MANIPULATION.
+ (m68k_gdbarch_init): Don't use
+ SET_GDBARCH_BREAKPOINT_MANIPULATION.
+ * m88k-tdep.c (break_insn): Rename it to m88k_break_insn and change
+ its type to constexpr. Don't use GDBARCH_BREAKPOINT_MANIPULATION.
+ (m88k_gdbarch_init): Don't use
+ SET_GDBARCH_BREAKPOINT_MANIPULATION.
+ * mep-tdep.c (breakpoint): Rename it to mep_break_insn and change
+ its type to constexpr. Don't use GDBARCH_BREAKPOINT_MANIPULATION.
+ (mep_gdbarch_init): Don't use
+ SET_GDBARCH_BREAKPOINT_MANIPULATION.
+ * microblaze-tdep.c (break_insn): Rename it to
+ microblaze_break_insn and change its type to constexpr. Don't use
+ GDBARCH_BREAKPOINT_MANIPULATION.
+ (microblaze_gdbarch_init): Don't use
+ SET_GDBARCH_BREAKPOINT_MANIPULATION.
+ * mips-tdep.c (mips_gdbarch_init): Likewise.
+ * mn10300-tdep.c (breakpoint): Rename it to mn10300_break_insn and
+ change its type to constexpr. Don't use
+ GDBARCH_BREAKPOINT_MANIPULATION.
+ (mn10300_gdbarch_init): Don't use
+ SET_GDBARCH_BREAKPOINT_MANIPULATION.
+ * moxie-tdep.c (breakpoint): Rename it to moxie_break_insn and
+ change its type to constexpr. Don't use
+ GDBARCH_BREAKPOINT_MANIPULATION.
+ (moxie_gdbarch_init): Don't use
+ SET_GDBARCH_BREAKPOINT_MANIPULATION.
+ * msp430-tdep.c (breakpoint): Rename it to msp430_break_insn
+ and change its type to constexpr. Don't use
+ GDBARCH_BREAKPOINT_MANIPULATION.
+ (msp430_gdbarch_init): Don't use
+ SET_GDBARCH_BREAKPOINT_MANIPULATION.
+ * mt-tdep.c (mt_gdbarch_init): Likewise.
+ * nds32-tdep.c (break_insn): Rename it to nds32_break_insn
+ and change its type to constexpr. Don't use
+ GDBARCH_BREAKPOINT_MANIPULATION.
+ (nds32_gdbarch_init): Don't use
+ SET_GDBARCH_BREAKPOINT_MANIPULATION.
+ * nios2-tdep.c (nios2_gdbarch_init): Likewise.
+ * rl78-tdep.c (breakpoint): Rename it to rl78_break_ins
+ and change its type to rl78_break_insn. Don't use
+ GDBARCH_BREAKPOINT_MANIPULATION.
+ (rl78_gdbarch_init): Don't use
+ SET_GDBARCH_BREAKPOINT_MANIPULATION.
+ * rs6000-tdep.c (big_breakpoint): Change its type to
+ constexpr.
+ (little_breakpoint): Likewise.
+ Don't use GDBARCH_BREAKPOINT_MANIPULATION_ENDIAN.
+ (rs6000_gdbarch_init): Don't use
+ SET_GDBARCH_BREAKPOINT_MANIPULATION.
+ * rx-tdep.c (breakpoint): Rename it to rx_break_insn and
+ change its type to constexpr. Don't use
+ GDBARCH_BREAKPOINT_MANIPULATION.
+ (rx_gdbarch_init): Don't use
+ SET_GDBARCH_BREAKPOINT_MANIPULATION.
+ * s390-linux-tdep.c (breakpoint): Rename it to s390_break_insn
+ and change its type to constexpr. Don't use
+ GDBARCH_BREAKPOINT_MANIPULATION
+ (s390_gdbarch_init): Don't use
+ SET_GDBARCH_BREAKPOINT_MANIPULATION.
+ * score-tdep.c (score_gdbarch_init): Likewise.
+ * sh-tdep.c (sh_gdbarch_init): Likewise.
+ * sh64-tdep.c (sh64_gdbarch_init): Likewise.
+ * sparc-tdep.c (break_insn): Rename it to sparc_break_insn
+ and change its type to constexpr. Don't use
+ GDBARCH_BREAKPOINT_MANIPULATION.
+ (sparc32_gdbarch_init): Don't use
+ SET_GDBARCH_BREAKPOINT_MANIPULATION.
+ * spu-tdep.c (breakpoint): Rename it to spu_break_insn and change
+ its type to constexpr. Don't use
+ GDBARCH_BREAKPOINT_MANIPULATION.
+ (spu_gdbarch_init): Don't use
+ SET_GDBARCH_BREAKPOINT_MANIPULATION.
+ * tic6x-tdep.c (tic6x_gdbarch_init): Likewise.
+ * tilegx-tdep.c (breakpoint): Rename it to tilegx_break_insn
+ and change its type to constexpr. Don't use
+ GDBARCH_BREAKPOINT_MANIPULATION.
+ (tilegx_gdbarch_init): Don't use
+ SET_GDBARCH_BREAKPOINT_MANIPULATION.
+ * v850-tdep.c (v850_gdbarch_init): Likewise.
+ * vax-tdep.c (break_insn): Rename it to vax_break_insn and
+ change its type to constexpr.
+ Don't use GDBARCH_BREAKPOINT_MANIPULATION.
+ (vax_gdbarch_init): Don't use
+ SET_GDBARCH_BREAKPOINT_MANIPULATION.
+ * xstormy16-tdep.c (breakpoint): Rename it to
+ xstormy16_break_insn and change its type to constexpr.
+ Don't use GDBARCH_BREAKPOINT_MANIPULATION.
+ (xstormy16_gdbarch_init): Don't use
+ SET_GDBARCH_BREAKPOINT_MANIPULATION.
+ * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
+
2016-11-03 Yao Qi <yao.qi@linaro.org>
* arm-tdep.c (arm_override_mode): Remove.
/* AArch64 BRK software debug mode instruction.
Note that AArch64 code is always little-endian.
1101.0100.0010.0000.0000.0000.0000.0000 = 0xd4200000. */
-static const gdb_byte aarch64_default_breakpoint[] = {0x00, 0x00, 0x20, 0xd4};
+constexpr gdb_byte aarch64_default_breakpoint[] = {0x00, 0x00, 0x20, 0xd4};
-GDBARCH_BREAKPOINT_MANIPULATION (aarch64, aarch64_default_breakpoint)
+typedef BP_MANIPULATION (aarch64_default_breakpoint) aarch64_breakpoint;
/* Extract from an array REGS containing the (raw) register state a
function return value of type TYPE, and copy that, in virtual
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
/* Breakpoint manipulation. */
- SET_GDBARCH_BREAKPOINT_MANIPULATION (aarch64);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+ aarch64_breakpoint::kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+ aarch64_breakpoint::bp_from_kind);
set_gdbarch_have_nonsteppable_watchpoint (gdbarch, 1);
set_gdbarch_software_single_step (gdbarch, aarch64_software_single_step);
}
\f
-static const gdb_byte break_insn[] = { 0x80, 0, 0, 0 }; /* call_pal bpt */
+constexpr gdb_byte alpha_break_insn[] = { 0x80, 0, 0, 0 }; /* call_pal bpt */
-GDBARCH_BREAKPOINT_MANIPULATION (alpha, break_insn)
+typedef BP_MANIPULATION (alpha_break_insn) alpha_breakpoint;
\f
/* This returns the PC of the first insn after the prologue.
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
- SET_GDBARCH_BREAKPOINT_MANIPULATION (alpha);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+ alpha_breakpoint::kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+ alpha_breakpoint::bp_from_kind);
set_gdbarch_decr_pc_after_break (gdbarch, ALPHA_INSN_SIZE);
set_gdbarch_cannot_step_breakpoint (gdbarch, 1);
set_gdbarch_skip_prologue (gdbarch, arc_skip_prologue);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- SET_GDBARCH_BREAKPOINT_MANIPULATION (arc);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch, arc_breakpoint_kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch, arc_sw_breakpoint_from_kind);
/* On ARC 600 BRK_S instruction advances PC, unlike other ARC cores. */
if (!arc_mach_is_arc600 (gdbarch))
struct type;
struct gdbarch_info;
-#define GDBARCH_BREAKPOINT_MANIPULATION(ARCH,BREAK_INSN) \
- static int \
- ARCH##_breakpoint_kind_from_pc (struct gdbarch *gdbarch, \
- CORE_ADDR *pcptr) \
- { \
- return sizeof (BREAK_INSN); \
- } \
- static const gdb_byte * \
- ARCH##_sw_breakpoint_from_kind (struct gdbarch *gdbarch, \
- int kind, int *size) \
- { \
- *size = kind; \
- return BREAK_INSN; \
+template <size_t bp_size, const gdb_byte *break_insn>
+struct bp_manipulation
+{
+ static int
+ kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
+ {
+ return bp_size;
}
-#define SET_GDBARCH_BREAKPOINT_MANIPULATION(ARCH) \
- set_gdbarch_breakpoint_kind_from_pc (gdbarch, \
- ARCH##_breakpoint_kind_from_pc); \
- set_gdbarch_sw_breakpoint_from_kind (gdbarch, \
- ARCH##_sw_breakpoint_from_kind)
-
-#define GDBARCH_BREAKPOINT_MANIPULATION_ENDIAN(ARCH, \
- LITTLE_BREAK_INSN, \
- BIG_BREAK_INSN) \
- static int \
- ARCH##_breakpoint_kind_from_pc (struct gdbarch *gdbarch, \
- CORE_ADDR *pcptr) \
- { \
- gdb_static_assert (ARRAY_SIZE (LITTLE_BREAK_INSN) \
- == ARRAY_SIZE (BIG_BREAK_INSN)); \
- return sizeof (BIG_BREAK_INSN); \
- } \
- static const gdb_byte * \
- ARCH##_sw_breakpoint_from_kind (struct gdbarch *gdbarch, \
- int kind, int *size) \
- { \
- *size = kind; \
- if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) \
- return BIG_BREAK_INSN; \
- else \
- return LITTLE_BREAK_INSN; \
+ static const gdb_byte *
+ bp_from_kind (struct gdbarch *gdbarch, int kind, int *size)
+ {
+ *size = kind;
+ return break_insn;
}
+};
+
+template <size_t bp_size,
+ const gdb_byte *break_insn_little,
+ const gdb_byte *break_insn_big>
+struct bp_manipulation_endian
+{
+ static int
+ kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
+ {
+ return bp_size;
+ }
+
+ static const gdb_byte *
+ bp_from_kind (struct gdbarch *gdbarch, int kind, int *size)
+ {
+ *size = kind;
+ if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
+ return break_insn_big;
+ else
+ return break_insn_little;
+ }
+};
+
+#define BP_MANIPULATION(BREAK_INSN) \
+ bp_manipulation<sizeof (BREAK_INSN), BREAK_INSN>
+
+#define BP_MANIPULATION_ENDIAN(BREAK_INSN_LITTLE, BREAK_INSN_BIG) \
+ bp_manipulation_endian<sizeof (BREAK_INSN_LITTLE), \
+ BREAK_INSN_LITTLE, BREAK_INSN_BIG>
/* An implementation of gdbarch_displaced_step_copy_insn for
processors that don't need to modify the instruction before
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
/* Breakpoint manipulation. */
- SET_GDBARCH_BREAKPOINT_MANIPULATION (arm);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch, arm_breakpoint_kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch, arm_sw_breakpoint_from_kind);
set_gdbarch_breakpoint_kind_from_current_state (gdbarch,
arm_breakpoint_kind_from_current_state);
it as a NOP. Thus, it should be ok. Since the avr is currently a remote
only target, this shouldn't be a problem (I hope). TRoth/2003-05-14 */
-static const unsigned char avr_break_insn [] = { 0x98, 0x95 };
+constexpr gdb_byte avr_break_insn [] = { 0x98, 0x95 };
-GDBARCH_BREAKPOINT_MANIPULATION (avr, avr_break_insn)
+typedef BP_MANIPULATION (avr_break_insn) avr_breakpoint;
/* Determine, for architecture GDBARCH, how a return value of TYPE
should be returned. If it is supposed to be returned in registers,
set_gdbarch_skip_prologue (gdbarch, avr_skip_prologue);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- SET_GDBARCH_BREAKPOINT_MANIPULATION (avr);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch, avr_breakpoint::kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch, avr_breakpoint::bp_from_kind);
frame_unwind_append_unwinder (gdbarch, &avr_frame_unwind);
frame_base_set_default (gdbarch, &avr_frame_base);
set_gdbarch_return_value (gdbarch, bfin_return_value);
set_gdbarch_skip_prologue (gdbarch, bfin_skip_prologue);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- SET_GDBARCH_BREAKPOINT_MANIPULATION (bfin);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch, bfin_breakpoint_kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch, bfin_sw_breakpoint_from_kind);
set_gdbarch_decr_pc_after_break (gdbarch, 2);
set_gdbarch_frame_args_skip (gdbarch, 8);
set_gdbarch_unwind_pc (gdbarch, bfin_unwind_pc);
/* The stack grows downward. */
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- SET_GDBARCH_BREAKPOINT_MANIPULATION (cris);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch, cris_breakpoint_kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch, cris_sw_breakpoint_from_kind);
set_gdbarch_unwind_pc (gdbarch, cris_unwind_pc);
set_gdbarch_unwind_sp (gdbarch, cris_unwind_sp);
internal_error (__FILE__, __LINE__, _("Bad register number %d"), reg);
}
-static const unsigned char breakpoint[] = {0xc0, 0x70, 0x00, 0x01};
+constexpr gdb_byte frv_break_insn[] = {0xc0, 0x70, 0x00, 0x01};
-GDBARCH_BREAKPOINT_MANIPULATION (frv, breakpoint)
+typedef BP_MANIPULATION (frv_break_insn) frv_breakpoint;
/* Define the maximum number of instructions which may be packed into a
bundle (VLIW instruction). */
set_gdbarch_skip_prologue (gdbarch, frv_skip_prologue);
set_gdbarch_skip_main_prologue (gdbarch, frv_skip_main_prologue);
- SET_GDBARCH_BREAKPOINT_MANIPULATION (frv);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch, frv_breakpoint::kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch, frv_breakpoint::bp_from_kind);
set_gdbarch_adjust_breakpoint_address
(gdbarch, frv_adjust_breakpoint_address);
}
-static const gdb_byte breakpoint[] = { 0x02, 0x00, 0x34, 0x00 };
+constexpr gdb_byte ft32_break_insn[] = { 0x02, 0x00, 0x34, 0x00 };
-GDBARCH_BREAKPOINT_MANIPULATION (ft32, breakpoint)
+typedef BP_MANIPULATION (ft32_break_insn) ft32_breakpoint;
/* FT32 register names. */
set_gdbarch_skip_prologue (gdbarch, ft32_skip_prologue);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- SET_GDBARCH_BREAKPOINT_MANIPULATION (ft32);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch, ft32_breakpoint::kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch, ft32_breakpoint::bp_from_kind);
set_gdbarch_frame_align (gdbarch, ft32_frame_align);
frame_base_set_default (gdbarch, &ft32_frame_base);
}
/*static unsigned char breakpoint[] = { 0x7A, 0xFF }; *//* ??? */
-static const unsigned char breakpoint[] = { 0x01, 0x80 }; /* Sleep */
+constexpr gdb_byte h8300_break_insn[] = { 0x01, 0x80 }; /* Sleep */
-GDBARCH_BREAKPOINT_MANIPULATION (h8300, breakpoint)
+typedef BP_MANIPULATION (h8300_break_insn) h8300_breakpoint;
static struct gdbarch *
h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Stack grows up. */
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- SET_GDBARCH_BREAKPOINT_MANIPULATION (h8300);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+ h8300_breakpoint::kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+ h8300_breakpoint::bp_from_kind);
set_gdbarch_push_dummy_call (gdbarch, h8300_push_dummy_call);
set_gdbarch_char_signed (gdbarch, 0);
return 0;
}
-static const unsigned char breakpoint[] = {0x00, 0x01, 0x00, 0x04};
+constexpr gdb_byte hppa_break_insn[] = {0x00, 0x01, 0x00, 0x04};
-GDBARCH_BREAKPOINT_MANIPULATION (hppa, breakpoint)
+typedef BP_MANIPULATION (hppa_break_insn) hppa_breakpoint;
/* Return the name of a register. */
internal_error (__FILE__, __LINE__, _("bad switch"));
}
- SET_GDBARCH_BREAKPOINT_MANIPULATION (hppa);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch, hppa_breakpoint::kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch, hppa_breakpoint::bp_from_kind);
set_gdbarch_pseudo_register_read (gdbarch, hppa_pseudo_register_read);
/* Frame unwind methods. */
This function is 64-bit safe. */
-static const gdb_byte break_insn[] = { 0xcc }; /* int 3 */
+constexpr gdb_byte i386_break_insn[] = { 0xcc }; /* int 3 */
+
+typedef BP_MANIPULATION (i386_break_insn) i386_breakpoint;
-GDBARCH_BREAKPOINT_MANIPULATION (i386, break_insn)
\f
/* Displaced instruction handling. */
/* Stack grows downward. */
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- SET_GDBARCH_BREAKPOINT_MANIPULATION (i386);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch, i386_breakpoint::kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch, i386_breakpoint::bp_from_kind);
+
set_gdbarch_decr_pc_after_break (gdbarch, 1);
set_gdbarch_max_insn_length (gdbarch, I386_MAX_INSN_LEN);
set_gdbarch_double_format (gdbarch, floatformats_ieee_double);
set_gdbarch_long_double_format (gdbarch, floatformats_ieee_double);
set_gdbarch_return_value (gdbarch, iq2000_return_value);
- SET_GDBARCH_BREAKPOINT_MANIPULATION (iq2000);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+ iq2000_breakpoint_kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+ iq2000_sw_breakpoint_from_kind);
set_gdbarch_frame_args_skip (gdbarch, 0);
set_gdbarch_skip_prologue (gdbarch, iq2000_skip_prologue);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
}
/* Create a breakpoint instruction. */
-static const gdb_byte breakpoint[4] = { OP_RAISE << 2, 0, 0, 2 };
+constexpr gdb_byte lm32_break_insn[4] = { OP_RAISE << 2, 0, 0, 2 };
-GDBARCH_BREAKPOINT_MANIPULATION (lm32, breakpoint)
+typedef BP_MANIPULATION (lm32_break_insn) lm32_breakpoint;
/* Setup registers and stack for faking a call to a function in the
frame_unwind_append_unwinder (gdbarch, &lm32_frame_unwind);
/* Breakpoints. */
- SET_GDBARCH_BREAKPOINT_MANIPULATION (lm32);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch, lm32_breakpoint::kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch, lm32_breakpoint::bp_from_kind);
set_gdbarch_have_nonsteppable_watchpoint (gdbarch, 1);
/* Calling functions in the inferior. */
\f
/* Breakpoints. */
-static const unsigned char break_insn[] = { 0x00 }; /* brk */
+constexpr gdb_byte m32c_break_insn[] = { 0x00 }; /* brk */
-GDBARCH_BREAKPOINT_MANIPULATION (m32c, break_insn)
+typedef BP_MANIPULATION (m32c_break_insn) m32c_breakpoint;
\f
/* Prologue analysis. */
set_gdbarch_print_insn (gdbarch, print_insn_m32c);
/* Breakpoints. */
- SET_GDBARCH_BREAKPOINT_MANIPULATION (m32c);
+ 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);
set_gdbarch_skip_prologue (gdbarch, m32r_skip_prologue);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- SET_GDBARCH_BREAKPOINT_MANIPULATION (m32r);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch, m32r_breakpoint_kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch, m32r_sw_breakpoint_from_kind);
set_gdbarch_memory_insert_breakpoint (gdbarch,
m32r_memory_insert_breakpoint);
set_gdbarch_memory_remove_breakpoint (gdbarch,
return m68hc11_register_names[reg_nr];
}
-static unsigned char breakpoint[] = {0x0};
+constexpr gdb_byte m68hc11_break_insn[] = {0x0};
-GDBARCH_BREAKPOINT_MANIPULATION (m68hc11, breakpoint)
+typedef BP_MANIPULATION (m68hc11_break_insn) m68hc11_breakpoint;
\f
/* 68HC11 & 68HC12 prologue analysis. */
set_gdbarch_return_value (gdbarch, m68hc11_return_value);
set_gdbarch_skip_prologue (gdbarch, m68hc11_skip_prologue);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- SET_GDBARCH_BREAKPOINT_MANIPULATION (m68hc11);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+ m68hc11_breakpoint::kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+ m68hc11_breakpoint::bp_from_kind);
set_gdbarch_print_insn (gdbarch, gdb_print_insn_m68hc11);
m68hc11_add_reggroups (gdbarch);
#define BPT_VECTOR 0xf
#endif
-static gdb_byte break_insn[] = {0x4e, (0x40 | BPT_VECTOR)};
+constexpr gdb_byte m68k_break_insn[] = {0x4e, (0x40 | BPT_VECTOR)};
-GDBARCH_BREAKPOINT_MANIPULATION (m68k, break_insn)
+typedef BP_MANIPULATION (m68k_break_insn) m68k_breakpoint;
\f
/* Construct types for ISA-specific registers. */
set_gdbarch_long_double_bit (gdbarch, long_double_format[0]->totalsize);
set_gdbarch_skip_prologue (gdbarch, m68k_skip_prologue);
- SET_GDBARCH_BREAKPOINT_MANIPULATION (m68k);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch, m68k_breakpoint::kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch, m68k_breakpoint::bp_from_kind);
/* Stack grows down. */
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
location for inserting the breakpoint. */
/* tb 0,r0,511 */
-static gdb_byte break_insn[] = { 0xf0, 0x00, 0xd1, 0xff };
+constexpr gdb_byte m88k_break_insn[] = { 0xf0, 0x00, 0xd1, 0xff };
-GDBARCH_BREAKPOINT_MANIPULATION (m88k, break_insn)
+typedef BP_MANIPULATION (m88k_break_insn) m88k_breakpoint;
static CORE_ADDR
m88k_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
set_gdbarch_return_value (gdbarch, m88k_return_value);
set_gdbarch_addr_bits_remove (gdbarch, m88k_addr_bits_remove);
- SET_GDBARCH_BREAKPOINT_MANIPULATION (m88k);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch, m88k_breakpoint::kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch, m88k_breakpoint::bp_from_kind);
set_gdbarch_unwind_pc (gdbarch, m88k_unwind_pc);
set_gdbarch_write_pc (gdbarch, m88k_write_pc);
\f
/* Breakpoints. */
-static unsigned char breakpoint[] = { 0x70, 0x32 };
+constexpr gdb_byte mep_break_insn[] = { 0x70, 0x32 };
-GDBARCH_BREAKPOINT_MANIPULATION (mep, breakpoint)
+typedef BP_MANIPULATION (mep_break_insn) mep_breakpoint;
\f
/* Frames and frame unwinding. */
set_gdbarch_print_insn (gdbarch, mep_gdb_print_insn);
/* Breakpoints. */
- SET_GDBARCH_BREAKPOINT_MANIPULATION (mep);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch, mep_breakpoint::kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch, mep_breakpoint::bp_from_kind);
set_gdbarch_decr_pc_after_break (gdbarch, 0);
set_gdbarch_skip_prologue (gdbarch, mep_skip_prologue);
return extract_unsigned_integer (buf, 4, byte_order);
}
\f
-static gdb_byte break_insn[] = MICROBLAZE_BREAKPOINT;
+constexpr gdb_byte microblaze_break_insn[] = MICROBLAZE_BREAKPOINT;
-GDBARCH_BREAKPOINT_MANIPULATION (microblaze, break_insn)
+typedef BP_MANIPULATION (microblaze_break_insn) microblaze_breakpoint;
\f
/* Allocate and initialize a frame cache. */
/* Stack grows downward. */
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- SET_GDBARCH_BREAKPOINT_MANIPULATION (microblaze);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+ microblaze_breakpoint::kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+ microblaze_breakpoint::bp_from_kind);
set_gdbarch_frame_args_skip (gdbarch, 8);
set_gdbarch_value_to_register (gdbarch, mips_value_to_register);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- SET_GDBARCH_BREAKPOINT_MANIPULATION (mips);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch, mips_breakpoint_kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch, mips_sw_breakpoint_from_kind);
set_gdbarch_adjust_breakpoint_address (gdbarch,
mips_adjust_breakpoint_address);
The Matsushita mn10x00 processors have single byte instructions
so we need a single byte breakpoint. Matsushita hasn't defined
one, so we defined it ourselves. */
-static gdb_byte breakpoint[] = {0xff};
+constexpr gdb_byte mn10300_break_insn[] = {0xff};
-GDBARCH_BREAKPOINT_MANIPULATION (mn10300, breakpoint)
+typedef BP_MANIPULATION (mn10300_break_insn) mn10300_breakpoint;
/* Model the semantics of pushing a register onto the stack. This
is a helper function for mn10300_analyze_prologue, below. */
/* Stack unwinding. */
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
/* Breakpoints. */
- SET_GDBARCH_BREAKPOINT_MANIPULATION (mn10300);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+ mn10300_breakpoint::kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+ mn10300_breakpoint::bp_from_kind);
/* decr_pc_after_break? */
/* Disassembly. */
set_gdbarch_print_insn (gdbarch, print_insn_mn10300);
return sp & ~1;
}
-static unsigned char breakpoint[] = { 0x35, 0x00 };
+constexpr gdb_byte moxie_break_insn[] = { 0x35, 0x00 };
-GDBARCH_BREAKPOINT_MANIPULATION (moxie, breakpoint)
+typedef BP_MANIPULATION (moxie_break_insn) moxie_breakpoint;
/* Moxie register names. */
set_gdbarch_skip_prologue (gdbarch, moxie_skip_prologue);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- SET_GDBARCH_BREAKPOINT_MANIPULATION (moxie);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+ moxie_breakpoint::kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+ moxie_breakpoint::bp_from_kind);
set_gdbarch_frame_align (gdbarch, moxie_frame_align);
frame_base_set_default (gdbarch, &moxie_frame_base);
return regnum;
}
-static gdb_byte breakpoint[] = { 0x43, 0x43 };
+constexpr gdb_byte msp430_break_insn[] = { 0x43, 0x43 };
-GDBARCH_BREAKPOINT_MANIPULATION (msp430, breakpoint)
+typedef BP_MANIPULATION (msp430_break_insn) msp430_breakpoint;
/* Define a "handle" struct for fetching the next opcode. */
set_gdbarch_long_double_format (gdbarch, floatformats_ieee_double);
/* Breakpoints. */
- SET_GDBARCH_BREAKPOINT_MANIPULATION (msp430);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+ msp430_breakpoint::kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+ msp430_breakpoint::bp_from_kind);
set_gdbarch_decr_pc_after_break (gdbarch, 1);
/* Disassembly. */
set_gdbarch_pseudo_register_write (gdbarch, mt_pseudo_register_write);
set_gdbarch_skip_prologue (gdbarch, mt_skip_prologue);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- SET_GDBARCH_BREAKPOINT_MANIPULATION (mt);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch, mt_breakpoint_kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch, mt_sw_breakpoint_from_kind);
set_gdbarch_decr_pc_after_break (gdbarch, 0);
set_gdbarch_frame_args_skip (gdbarch, 0);
set_gdbarch_print_insn (gdbarch, print_insn_mt);
}
/* The same insn machine code is used for little-endian and big-endian. */
-static const gdb_byte break_insn[] = { 0xEA, 0x00 };
+constexpr gdb_byte nds32_break_insn[] = { 0xEA, 0x00 };
-GDBARCH_BREAKPOINT_MANIPULATION (nds32, break_insn)
+typedef BP_MANIPULATION (nds32_break_insn) nds32_breakpoint;
/* Implement the "dwarf2_reg_to_regnum" gdbarch method. */
set_gdbarch_skip_prologue (gdbarch, nds32_skip_prologue);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- SET_GDBARCH_BREAKPOINT_MANIPULATION (nds32);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+ nds32_breakpoint::kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+ nds32_breakpoint::bp_from_kind);
set_gdbarch_frame_align (gdbarch, nds32_frame_align);
frame_base_set_default (gdbarch, &nds32_frame_base);
set_gdbarch_skip_prologue (gdbarch, nios2_skip_prologue);
set_gdbarch_stack_frame_destroyed_p (gdbarch, nios2_stack_frame_destroyed_p);
- SET_GDBARCH_BREAKPOINT_MANIPULATION (nios2);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch, nios2_breakpoint_kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch, nios2_sw_breakpoint_from_kind);
set_gdbarch_dummy_id (gdbarch, nios2_dummy_id);
set_gdbarch_unwind_pc (gdbarch, nios2_unwind_pc);
{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 };
+constexpr gdb_byte rl78_break_insn[] = { 0xff };
-GDBARCH_BREAKPOINT_MANIPULATION (rl78, breakpoint)
+typedef BP_MANIPULATION (rl78_break_insn) rl78_breakpoint;
/* Define a "handle" struct for fetching the next opcode. */
set_gdbarch_addr_bits_remove (gdbarch, rl78_addr_bits_remove);
/* Breakpoints. */
- SET_GDBARCH_BREAKPOINT_MANIPULATION (rl78);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch, rl78_breakpoint::kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch, rl78_breakpoint::bp_from_kind);
set_gdbarch_decr_pc_after_break (gdbarch, 1);
/* Disassembly. */
/* Sequence of bytes for breakpoint instruction. */
-static unsigned char big_breakpoint[] = { 0x7d, 0x82, 0x10, 0x08 };
-static unsigned char little_breakpoint[] = { 0x08, 0x10, 0x82, 0x7d };
+constexpr gdb_byte big_breakpoint[] = { 0x7d, 0x82, 0x10, 0x08 };
+constexpr gdb_byte little_breakpoint[] = { 0x08, 0x10, 0x82, 0x7d };
-GDBARCH_BREAKPOINT_MANIPULATION_ENDIAN (rs6000, little_breakpoint,
- big_breakpoint)
+typedef BP_MANIPULATION_ENDIAN (little_breakpoint, big_breakpoint)
+ rs6000_breakpoint;
/* Instruction masks for displaced stepping. */
#define BRANCH_MASK 0xfc000000
set_gdbarch_skip_main_prologue (gdbarch, rs6000_skip_main_prologue);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- SET_GDBARCH_BREAKPOINT_MANIPULATION (rs6000);
+
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+ rs6000_breakpoint::kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+ rs6000_breakpoint::bp_from_kind);
/* The value of symbols of type N_SO and N_FUN maybe null when
it shouldn't be. */
return RETURN_VALUE_REGISTER_CONVENTION;
}
-static gdb_byte breakpoint[] = { 0x00 };
+constexpr gdb_byte rx_break_insn[] = { 0x00 };
-GDBARCH_BREAKPOINT_MANIPULATION (rx, breakpoint)
+typedef BP_MANIPULATION (rx_break_insn) rx_breakpoint;
/* Implement the dwarf_reg_to_regnum" gdbarch method. */
set_gdbarch_sp_regnum (gdbarch, RX_SP_REGNUM);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
set_gdbarch_decr_pc_after_break (gdbarch, 1);
- SET_GDBARCH_BREAKPOINT_MANIPULATION (rx);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch, rx_breakpoint::kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch, rx_breakpoint::bp_from_kind);
set_gdbarch_skip_prologue (gdbarch, rx_skip_prologue);
set_gdbarch_print_insn (gdbarch, print_insn_rx);
/* Breakpoints. */
-static const gdb_byte breakpoint[] = { 0x0, 0x1 };
+constexpr gdb_byte s390_break_insn[] = { 0x0, 0x1 };
-GDBARCH_BREAKPOINT_MANIPULATION (s390, breakpoint)
+typedef BP_MANIPULATION (s390_break_insn) s390_breakpoint;
/* Address handling. */
set_gdbarch_decr_pc_after_break (gdbarch, 2);
/* Stack grows downward. */
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- SET_GDBARCH_BREAKPOINT_MANIPULATION (s390);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch, s390_breakpoint::kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch, s390_breakpoint::bp_from_kind);
set_gdbarch_software_single_step (gdbarch, s390_software_single_step);
set_gdbarch_displaced_step_hw_singlestep (gdbarch, s390_displaced_step_hw_singlestep);
set_gdbarch_skip_prologue (gdbarch, s390_skip_prologue);
switch (target_mach)
{
case bfd_mach_score7:
- SET_GDBARCH_BREAKPOINT_MANIPULATION (score7);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+ score7_breakpoint_kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+ score7_sw_breakpoint_from_kind);
set_gdbarch_skip_prologue (gdbarch, score7_skip_prologue);
set_gdbarch_stack_frame_destroyed_p (gdbarch,
score7_stack_frame_destroyed_p);
break;
case bfd_mach_score3:
- SET_GDBARCH_BREAKPOINT_MANIPULATION (score3);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+ score3_breakpoint_kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+ score3_sw_breakpoint_from_kind);
set_gdbarch_skip_prologue (gdbarch, score3_skip_prologue);
set_gdbarch_stack_frame_destroyed_p (gdbarch,
score3_stack_frame_destroyed_p);
set_gdbarch_register_type (gdbarch, sh_default_register_type);
set_gdbarch_register_reggroup_p (gdbarch, sh_register_reggroup_p);
- SET_GDBARCH_BREAKPOINT_MANIPULATION (sh);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch, sh_breakpoint_kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch, sh_sw_breakpoint_from_kind);
set_gdbarch_print_insn (gdbarch, print_insn_sh);
set_gdbarch_register_sim_regno (gdbarch, legacy_register_sim_regno);
set_gdbarch_pseudo_register_read (gdbarch, sh64_pseudo_register_read);
set_gdbarch_pseudo_register_write (gdbarch, sh64_pseudo_register_write);
- SET_GDBARCH_BREAKPOINT_MANIPULATION (sh64);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch, sh64_breakpoint_kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch, sh64_sw_breakpoint_from_kind);
set_gdbarch_print_insn (gdbarch, print_insn_sh);
set_gdbarch_register_sim_regno (gdbarch, legacy_register_sim_regno);
encode a breakpoint instruction, store the length of the string in
*LEN and optionally adjust *PC to point to the correct memory
location for inserting the breakpoint. */
-static const gdb_byte break_insn[] = { 0x91, 0xd0, 0x20, 0x01 };
+constexpr gdb_byte sparc_break_insn[] = { 0x91, 0xd0, 0x20, 0x01 };
-GDBARCH_BREAKPOINT_MANIPULATION (sparc, break_insn)
+typedef BP_MANIPULATION (sparc_break_insn) sparc_breakpoint;
\f
/* Allocate and initialize a frame cache. */
/* Stack grows downward. */
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- SET_GDBARCH_BREAKPOINT_MANIPULATION (sparc);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+ sparc_breakpoint::kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+ sparc_breakpoint::bp_from_kind);
set_gdbarch_frame_args_skip (gdbarch, 8);
/* Breakpoints. */
-static const gdb_byte breakpoint[] = { 0x00, 0x00, 0x3f, 0xff };
+constexpr gdb_byte spu_break_insn[] = { 0x00, 0x00, 0x3f, 0xff };
-GDBARCH_BREAKPOINT_MANIPULATION (spu, breakpoint)
+typedef BP_MANIPULATION (spu_break_insn) spu_breakpoint;
static int
spu_memory_remove_breakpoint (struct gdbarch *gdbarch,
/* Breakpoints. */
set_gdbarch_decr_pc_after_break (gdbarch, 4);
- SET_GDBARCH_BREAKPOINT_MANIPULATION (spu);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch, spu_breakpoint::kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch, spu_breakpoint::bp_from_kind);
set_gdbarch_memory_remove_breakpoint (gdbarch, spu_memory_remove_breakpoint);
set_gdbarch_software_single_step (gdbarch, spu_software_single_step);
set_gdbarch_get_longjmp_target (gdbarch, spu_get_longjmp_target);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
set_gdbarch_skip_prologue (gdbarch, tic6x_skip_prologue);
- SET_GDBARCH_BREAKPOINT_MANIPULATION (tic6x);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+ tic6x_breakpoint_kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+ tic6x_sw_breakpoint_from_kind);
set_gdbarch_unwind_pc (gdbarch, tic6x_unwind_pc);
set_gdbarch_unwind_sp (gdbarch, tic6x_unwind_sp);
}
/* 64-bit pattern for a { bpt ; nop } bundle. */
-static const unsigned char breakpoint[] =
+constexpr gdb_byte tilegx_break_insn[] =
{ 0x00, 0x50, 0x48, 0x51, 0xae, 0x44, 0x6a, 0x28 };
-GDBARCH_BREAKPOINT_MANIPULATION (tilegx, breakpoint)
+typedef BP_MANIPULATION (tilegx_break_insn) tilegx_breakpoint;
/* Normal frames. */
set_gdbarch_push_dummy_call (gdbarch, tilegx_push_dummy_call);
set_gdbarch_get_longjmp_target (gdbarch, tilegx_get_longjmp_target);
set_gdbarch_write_pc (gdbarch, tilegx_write_pc);
- SET_GDBARCH_BREAKPOINT_MANIPULATION (tilegx);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+ tilegx_breakpoint::kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+ tilegx_breakpoint::bp_from_kind);
set_gdbarch_return_value (gdbarch, tilegx_return_value);
set_gdbarch_print_insn (gdbarch, print_insn_tilegx);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- SET_GDBARCH_BREAKPOINT_MANIPULATION (v850);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch, v850_breakpoint_kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch, v850_sw_breakpoint_from_kind);
set_gdbarch_return_value (gdbarch, v850_return_value);
set_gdbarch_push_dummy_call (gdbarch, v850_push_dummy_call);
set_gdbarch_skip_prologue (gdbarch, v850_skip_prologue);
*LEN and optionally adjust *PC to point to the correct memory
location for inserting the breakpoint. */
-static gdb_byte break_insn[] = { 3 };
+constexpr gdb_byte vax_break_insn[] = { 3 };
-GDBARCH_BREAKPOINT_MANIPULATION (vax, break_insn)
+typedef BP_MANIPULATION (vax_break_insn) vax_breakpoint;
\f
/* Advance PC across any function entry prologue instructions
to reach some "real" code. */
set_gdbarch_dummy_id (gdbarch, vax_dummy_id);
/* Breakpoint info */
- SET_GDBARCH_BREAKPOINT_MANIPULATION (vax);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch, vax_breakpoint::kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch, vax_breakpoint::bp_from_kind);
/* Misc info */
set_gdbarch_deprecated_function_start_offset (gdbarch, 2);
return 0;
}
-static unsigned char breakpoint[] = { 0x06, 0x0 };
+constexpr gdb_byte xstormy16_break_insn[] = { 0x06, 0x0 };
-GDBARCH_BREAKPOINT_MANIPULATION (xstormy16, breakpoint)
+typedef BP_MANIPULATION (xstormy16_break_insn) xstormy16_breakpoint;
/* Given a pointer to a jump table entry, return the address
of the function it jumps to. Return 0 if not found. */
/* These values and methods are used when gdb calls a target function. */
set_gdbarch_push_dummy_call (gdbarch, xstormy16_push_dummy_call);
- SET_GDBARCH_BREAKPOINT_MANIPULATION (xstormy16);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+ xstormy16_breakpoint::kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+ xstormy16_breakpoint::bp_from_kind);
set_gdbarch_return_value (gdbarch, xstormy16_return_value);
set_gdbarch_skip_trampoline_code (gdbarch, xstormy16_skip_trampoline_code);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
/* Set breakpoints. */
- SET_GDBARCH_BREAKPOINT_MANIPULATION (xtensa);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+ xtensa_breakpoint_kind_from_pc);
+ set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+ xtensa_sw_breakpoint_from_kind);
/* After breakpoint instruction or illegal instruction, pc still
points at break instruction, so don't decrement. */