+2016-11-03 Yao Qi <yao.qi@linaro.org>
+
+ * arch-utils.h (GDBARCH_BREAKPOINT_MANIPULATION): Define
+ breakpoint_kind_from_pc and sw_breakpoint_from_kind.
+ (GDBARCH_BREAKPOINT_MANIPULATION_ENDIAN): Likewise.
+ (SET_GDBARCH_BREAKPOINT_MANIPULATION): Call
+ set_gdbarch_breakpoint_kind_from_pc and
+ set_gdbarch_sw_breakpoint_from_kind.
+ * arm-tdep.c: Add comments.
+ * bfin-tdep.c: Likewise.
+ * breakpoint.c (breakpoint_kind): New function.
+ (insert_bp_location): Set target_info.placed_size and
+ target_info.placed_address.
+ (bkpt_insert_location): Likewise.
+ * cris-tdep.c: Add comments.
+ * gdbarch.sh (breakpoint_kind_from_pc): New.
+ (sw_breakpoint_from_kind): New.
+ * gdbarch.c, gdbarch.h: Regenerated.
+ * ia64-tdep.c (ia64_memory_insert_breakpoint): Don't set
+ bp_tgt->placed_size.
+ (ia64_memory_remove_breakpoint): Don't assert
+ bp_tgt->placed_size.
+ (ia64_breakpoint_kind_from_pc): New function.
+ (ia64_gdbarch_init): Install ia64_breakpoint_kind_from_pc.
+ * m32r-tdep.c (m32r_memory_insert_breakpoint): Don't set
+ bp_tgt->placed_size.
+ * mem-break.c (default_memory_insert_breakpoint): Don't set
+ bp_tgt->placed_size. Call gdbarch_sw_breakpoint_from_kind.
+ (default_memory_remove_breakpoint): Call
+ gdbarch_sw_breakpoint_from_kind.
+ (memory_validate_breakpoint): Don't check bp_tgt->placed_size.
+ * mips-tdep.c: Add comments.
+ * mt-tdep.c: Likewise.
+ * nios2-tdep.c: Likewise.
+ * record-full.c (record_full_insert_breakpoint): Don't call
+ gdbarch_breakpoint_from_pc. Don't set bp_tgt->placed_address
+ and bp_tgt->placed_size.
+ * remote.c (remote_insert_breakpoint): Don't call
+ gdbarch_remote_breakpoint_from_pc. Use bp_tgt->placed_size.
+ Don't set bp_tgt->placed_address and bp_tgt->placed_size.
+ (remote_insert_hw_breakpoint): Likewise.
+ * score-tdep.c: Likewise.
+ * sh-tdep.c: Likewise.
+ * tic6x-tdep.c: Likewise.
+ * v850-tdep.c: Likewise.
+ * xtensa-tdep.c: Likewise.
+
2016-11-03 Yao Qi <yao.qi@linaro.org>
* arch-utils.h (GDBARCH_BREAKPOINT_FROM_PC): New macro.
}
#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##_breakpoint_from_pc (struct gdbarch *gdbarch, \
- CORE_ADDR *pcptr, \
- int *lenptr) \
+ ARCH##_sw_breakpoint_from_kind (struct gdbarch *gdbarch, \
+ int kind, int *size) \
{ \
- *lenptr = sizeof (BREAK_INSN); \
+ *size = kind; \
return BREAK_INSN; \
- }
+ } \
+ GDBARCH_BREAKPOINT_FROM_PC (ARCH)
-#define SET_GDBARCH_BREAKPOINT_MANIPULATION(ARCH) \
- set_gdbarch_breakpoint_from_pc (gdbarch, ARCH##_breakpoint_from_pc)
+#define SET_GDBARCH_BREAKPOINT_MANIPULATION(ARCH) \
+ set_gdbarch_breakpoint_from_pc (gdbarch, ARCH##_breakpoint_from_pc); \
+ 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 const gdb_byte * \
- ARCH##_breakpoint_from_pc (struct gdbarch *gdbarch, \
- CORE_ADDR *pcptr, \
- int *lenptr) \
+ 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)); \
- *lenptr = sizeof (LITTLE_BREAK_INSN); \
- if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) \
- return BIG_BREAK_INSN; \
- else \
- return LITTLE_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; \
+ } \
+ GDBARCH_BREAKPOINT_FROM_PC (ARCH)
/* An implementation of gdbarch_displaced_step_copy_insn for
processors that don't need to modify the instruction before
static const gdb_byte arm_default_thumb_le_breakpoint[] = THUMB_LE_BREAKPOINT;
static const gdb_byte arm_default_thumb_be_breakpoint[] = THUMB_BE_BREAKPOINT;
+/* Implement the breakpoint_kind_from_pc gdbarch method. */
+
static int
arm_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
{
}
+/* Implement the sw_breakpoint_from_kind gdbarch method. */
+
static const gdb_byte *
arm_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
{
return map_gcc_gdb[reg];
}
+/* Implement the breakpoint_kind_from_pc gdbarch method. */
+
static int
bfin_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
{
return 2;
}
+/* Implement the sw_breakpoint_from_kind gdbarch method. */
+
static const gdb_byte *
bfin_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
{
bl->target_info.persist = 1;
}
+/* Return the kind of breakpoint on address *ADDR. */
+
+static int
+breakpoint_kind (struct bp_location *bl, CORE_ADDR *addr)
+{
+ return gdbarch_breakpoint_kind_from_pc (bl->gdbarch, addr);
+}
+
/* Insert a low-level "breakpoint" of some type. BL is the breakpoint
location. Any error messages are printed to TMP_ERROR_STREAM; and
DISABLED_BREAKS, and HW_BREAKPOINT_ERROR are used to report problems.
{
int val;
+ bl->overlay_target_info.placed_size
+ = breakpoint_kind (bl, &addr);
+ bl->overlay_target_info.placed_address = addr;
val = target_insert_breakpoint (bl->gdbarch,
&bl->overlay_target_info);
if (val)
static int
bkpt_insert_location (struct bp_location *bl)
{
+ CORE_ADDR addr = bl->target_info.reqstd_address;
+
+ bl->target_info.placed_size = breakpoint_kind (bl, &addr);
+ bl->target_info.placed_address = addr;
+
if (bl->loc_type == bp_loc_hardware_breakpoint)
return target_insert_hw_breakpoint (bl->gdbarch, &bl->target_info);
else
return sp;
}
+/* Implement the breakpoint_kind_from_pc gdbarch method. */
+
static int
cris_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
{
return 2;
}
+/* Implement the sw_breakpoint_from_kind gdbarch method. */
+
static const gdb_byte *
cris_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
{
gdbarch_skip_entrypoint_ftype *skip_entrypoint;
gdbarch_inner_than_ftype *inner_than;
gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
+ gdbarch_breakpoint_kind_from_pc_ftype *breakpoint_kind_from_pc;
+ gdbarch_sw_breakpoint_from_kind_ftype *sw_breakpoint_from_kind;
gdbarch_remote_breakpoint_from_pc_ftype *remote_breakpoint_from_pc;
gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
gdbarch->pointer_to_address = unsigned_pointer_to_address;
gdbarch->address_to_pointer = unsigned_address_to_pointer;
gdbarch->return_in_first_hidden_param_p = default_return_in_first_hidden_param_p;
+ gdbarch->sw_breakpoint_from_kind = NULL;
gdbarch->remote_breakpoint_from_pc = default_remote_breakpoint_from_pc;
gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
fprintf_unfiltered (log, "\n\tinner_than");
if (gdbarch->breakpoint_from_pc == 0)
fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
+ if (gdbarch->breakpoint_kind_from_pc == 0)
+ fprintf_unfiltered (log, "\n\tbreakpoint_kind_from_pc");
+ /* Skip verify of sw_breakpoint_from_kind, invalid_p == 0 */
/* Skip verify of remote_breakpoint_from_pc, invalid_p == 0 */
/* Skip verify of adjust_breakpoint_address, has predicate. */
/* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
fprintf_unfiltered (file,
"gdbarch_dump: breakpoint_from_pc = <%s>\n",
host_address_to_string (gdbarch->breakpoint_from_pc));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: breakpoint_kind_from_pc = <%s>\n",
+ host_address_to_string (gdbarch->breakpoint_kind_from_pc));
fprintf_unfiltered (file,
"gdbarch_dump: byte_order = %s\n",
plongest (gdbarch->byte_order));
fprintf_unfiltered (file,
"gdbarch_dump: static_transform_name = <%s>\n",
host_address_to_string (gdbarch->static_transform_name));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: sw_breakpoint_from_kind = <%s>\n",
+ host_address_to_string (gdbarch->sw_breakpoint_from_kind));
fprintf_unfiltered (file,
"gdbarch_dump: syscalls_info = %s\n",
host_address_to_string (gdbarch->syscalls_info));
gdbarch->breakpoint_from_pc = breakpoint_from_pc;
}
+int
+gdbarch_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
+{
+ gdb_assert (gdbarch != NULL);
+ gdb_assert (gdbarch->breakpoint_kind_from_pc != NULL);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_kind_from_pc called\n");
+ return gdbarch->breakpoint_kind_from_pc (gdbarch, pcptr);
+}
+
+void
+set_gdbarch_breakpoint_kind_from_pc (struct gdbarch *gdbarch,
+ gdbarch_breakpoint_kind_from_pc_ftype breakpoint_kind_from_pc)
+{
+ gdbarch->breakpoint_kind_from_pc = breakpoint_kind_from_pc;
+}
+
+const gdb_byte *
+gdbarch_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
+{
+ gdb_assert (gdbarch != NULL);
+ gdb_assert (gdbarch->sw_breakpoint_from_kind != NULL);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_sw_breakpoint_from_kind called\n");
+ return gdbarch->sw_breakpoint_from_kind (gdbarch, kind, size);
+}
+
+void
+set_gdbarch_sw_breakpoint_from_kind (struct gdbarch *gdbarch,
+ gdbarch_sw_breakpoint_from_kind_ftype sw_breakpoint_from_kind)
+{
+ gdbarch->sw_breakpoint_from_kind = sw_breakpoint_from_kind;
+}
+
void
gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *kindptr)
{
extern const gdb_byte * gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr);
extern void set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc);
+/* Return the breakpoint kind for this target based on *PCPTR. */
+
+typedef int (gdbarch_breakpoint_kind_from_pc_ftype) (struct gdbarch *gdbarch, CORE_ADDR *pcptr);
+extern int gdbarch_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr);
+extern void set_gdbarch_breakpoint_kind_from_pc (struct gdbarch *gdbarch, gdbarch_breakpoint_kind_from_pc_ftype *breakpoint_kind_from_pc);
+
+/* Return the software breakpoint from KIND. KIND can have target
+ specific meaning like the Z0 kind parameter.
+ SIZE is set to the software breakpoint's length in memory. */
+
+typedef const gdb_byte * (gdbarch_sw_breakpoint_from_kind_ftype) (struct gdbarch *gdbarch, int kind, int *size);
+extern const gdb_byte * gdbarch_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size);
+extern void set_gdbarch_sw_breakpoint_from_kind (struct gdbarch *gdbarch, gdbarch_sw_breakpoint_from_kind_ftype *sw_breakpoint_from_kind);
+
/* Return the adjusted address and kind to use for Z0/Z1 packets.
KIND is usually the memory length of the breakpoint, but may have a
different target-specific meaning. */
f:int:inner_than:CORE_ADDR lhs, CORE_ADDR rhs:lhs, rhs:0:0
m:const gdb_byte *:breakpoint_from_pc:CORE_ADDR *pcptr, int *lenptr:pcptr, lenptr::0:
+
+# Return the breakpoint kind for this target based on *PCPTR.
+m:int:breakpoint_kind_from_pc:CORE_ADDR *pcptr:pcptr::0:
+
+# Return the software breakpoint from KIND. KIND can have target
+# specific meaning like the Z0 kind parameter.
+# SIZE is set to the software breakpoint's length in memory.
+m:const gdb_byte *:sw_breakpoint_from_kind:int kind, int *size:kind, size::NULL::0
+
# Return the adjusted address and kind to use for Z0/Z1 packets.
# KIND is usually the memory length of the breakpoint, but may have a
# different target-specific meaning.
paddress (gdbarch, bp_tgt->placed_address));
replace_slotN_contents (bundle, IA64_BREAKPOINT, slotnum);
- bp_tgt->placed_size = bp_tgt->shadow_len;
-
val = target_write_memory (addr + shadow_slotnum, bundle + shadow_slotnum,
bp_tgt->shadow_len);
slotnum = 2;
}
- gdb_assert (bp_tgt->placed_size == BUNDLE_LEN - shadow_slotnum);
- gdb_assert (bp_tgt->placed_size == bp_tgt->shadow_len);
+ gdb_assert (bp_tgt->shadow_len == BUNDLE_LEN - shadow_slotnum);
instr_breakpoint = slotN_contents (bundle_mem, slotnum);
if (instr_breakpoint != IA64_BREAKPOINT)
return val;
}
+/* Implement the breakpoint_kind_from_pc gdbarch method. */
+
+static int
+ia64_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
+{
+ /* A place holder of gdbarch method breakpoint_kind_from_pc. */
+ return 0;
+}
+
/* As gdbarch_breakpoint_from_pc ranges have byte granularity and ia64
instruction slots ranges are bit-granular (41 bits) we have to provide an
extended range as described for ia64_memory_insert_breakpoint. We also take
set_gdbarch_memory_remove_breakpoint (gdbarch,
ia64_memory_remove_breakpoint);
set_gdbarch_breakpoint_from_pc (gdbarch, ia64_breakpoint_from_pc);
+ set_gdbarch_breakpoint_kind_from_pc (gdbarch, ia64_breakpoint_kind_from_pc);
set_gdbarch_read_pc (gdbarch, ia64_read_pc);
set_gdbarch_write_pc (gdbarch, ia64_write_pc);
return val; /* return error */
memcpy (bp_tgt->shadow_contents, contents_cache, 4);
- bp_tgt->placed_size = bp_tgt->shadow_len = 4;
+ bp_tgt->shadow_len = 4;
/* Determine appropriate breakpoint contents and size for this address. */
if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
return val;
}
+/* Implement the breakpoint_kind_from_pc gdbarch method. */
+
static int
m32r_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
{
return 2;
}
+/* Implement the sw_breakpoint_from_kind gdbarch method. */
+
static const gdb_byte *
m32r_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
{
int val;
/* Determine appropriate breakpoint contents and size for this address. */
- bp = gdbarch_breakpoint_from_pc (gdbarch, &addr, &bplen);
-
- bp_tgt->placed_address = addr;
- bp_tgt->placed_size = bplen;
+ bp = gdbarch_sw_breakpoint_from_kind (gdbarch, bp_tgt->placed_size, &bplen);
/* Save the memory contents in the shadow_contents buffer and then
write the breakpoint instruction. */
default_memory_remove_breakpoint (struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt)
{
+ int bplen;
+
+ gdbarch_sw_breakpoint_from_kind (gdbarch, bp_tgt->placed_size, &bplen);
+
return target_write_raw_memory (bp_tgt->placed_address, bp_tgt->shadow_contents,
- bp_tgt->placed_size);
+ bplen);
}
address. */
bp = gdbarch_breakpoint_from_pc (gdbarch, &addr, &bplen);
- if (bp == NULL || bp_tgt->placed_size != bplen)
+ if (bp == NULL)
return 0;
/* Make sure we see the memory breakpoints. */
return gdb_print_insn_mips (memaddr, info);
}
+/* Implement the breakpoint_kind_from_pc gdbarch method. */
+
static int
mips_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
{
return MIPS_BP_KIND_MIPS32;
}
+/* Implement the sw_breakpoint_from_kind gdbarch method. */
+
static const gdb_byte *
mips_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
{
return pc;
}
+/* Implement the breakpoint_kind_from_pc gdbarch method. */
+
static int
mt_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
{
return 4;
}
+/* Implement the sw_breakpoint_from_kind gdbarch method. */
+
static const gdb_byte *
mt_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
{
return nios2_analyze_prologue (gdbarch, start_pc, start_pc, &cache, NULL);
}
+/* Implement the breakpoint_kind_from_pc gdbarch method. */
+
static int
nios2_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
{
return NIOS2_OPCODE_SIZE;
}
+/* Implement the sw_breakpoint_from_kind gdbarch method. */
+
static const gdb_byte *
nios2_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
{
in_target_beneath = 1;
}
- else
- {
- CORE_ADDR addr = bp_tgt->reqstd_address;
- int bplen;
-
- gdbarch_breakpoint_from_pc (gdbarch, &addr, &bplen);
-
- bp_tgt->placed_address = addr;
- bp_tgt->placed_size = bplen;
- }
/* Use the existing entries if found in order to avoid duplication
in record_full_breakpoints. */
if (!gdbarch_has_global_breakpoints (target_gdbarch ()))
set_general_process ();
- gdbarch_remote_breakpoint_from_pc (gdbarch, &addr, &bpsize);
-
rs = get_remote_state ();
p = rs->buf;
endbuf = rs->buf + get_remote_packet_size ();
*(p++) = ',';
addr = (ULONGEST) remote_address_masked (addr);
p += hexnumstr (p, addr);
- xsnprintf (p, endbuf - p, ",%d", bpsize);
+ xsnprintf (p, endbuf - p, ",%d", bp_tgt->placed_size);
if (remote_supports_cond_breakpoints (ops))
remote_add_target_side_condition (gdbarch, bp_tgt, p, endbuf);
case PACKET_ERROR:
return -1;
case PACKET_OK:
- bp_tgt->placed_address = addr;
- bp_tgt->placed_size = bpsize;
return 0;
case PACKET_UNKNOWN:
break;
struct remote_state *rs;
char *p, *endbuf;
char *message;
- int bpsize;
-
- /* The length field should be set to the size of a breakpoint
- instruction, even though we aren't inserting one ourselves. */
-
- gdbarch_remote_breakpoint_from_pc (gdbarch, &addr, &bpsize);
if (packet_support (PACKET_Z1) == PACKET_DISABLE)
return -1;
addr = remote_address_masked (addr);
p += hexnumstr (p, (ULONGEST) addr);
- xsnprintf (p, endbuf - p, ",%x", bpsize);
+ xsnprintf (p, endbuf - p, ",%x", bp_tgt->placed_size);
if (remote_supports_cond_breakpoints (self))
remote_add_target_side_condition (gdbarch, bp_tgt, p, endbuf);
case PACKET_UNKNOWN:
return -1;
case PACKET_OK:
- bp_tgt->placed_address = addr;
- bp_tgt->placed_size = bpsize;
return 0;
}
internal_error (__FILE__, __LINE__,
return &inst;
}
+/* Implement the breakpoint_kind_from_pc gdbarch method. */
+
static int
score7_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
{
}
}
+/* Implement the sw_breakpoint_from_kind gdbarch method. */
+
static const gdb_byte *
score7_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
{
GDBARCH_BREAKPOINT_FROM_PC (score7)
+/* Implement the breakpoint_kind_from_pc gdbarch method. */
+
static int
score3_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
{
return len;
}
+/* Implement the sw_breakpoint_from_kind gdbarch method. */
+
static const gdb_byte *
score3_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
{
return register_names[reg_nr];
}
+/* Implement the breakpoint_kind_from_pc gdbarch method. */
+
static int
sh_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
{
return 2;
}
+/* Implement the sw_breakpoint_from_kind gdbarch method. */
+
static const gdb_byte *
sh_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
{
NULL);
}
+/* Implement the breakpoint_kind_from_pc gdbarch method. */
+
static int
tic6x_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
{
return 4;
}
+/* Implement the sw_breakpoint_from_kind gdbarch method. */
+
static const gdb_byte *
tic6x_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
{
return RETURN_VALUE_REGISTER_CONVENTION;
}
+/* Implement the breakpoint_kind_from_pc gdbarch method. */
+
static int
v850_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
{
return 2;
}
+/* Implement the sw_breakpoint_from_kind gdbarch method. */
+
static const gdb_byte *
v850_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
{
return sp + SP_ALIGNMENT;
}
+/* Implement the breakpoint_kind_from_pc gdbarch method. */
+
static int
xtensa_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
{
#define DENSITY_BIG_BREAKPOINT { 0xd2, 0x0f }
#define DENSITY_LITTLE_BREAKPOINT { 0x2d, 0xf0 }
+/* Implement the sw_breakpoint_from_kind gdbarch method. */
+
static const gdb_byte *
xtensa_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
{