@@ -2931,6 +2931,14 @@ aarch64_supports_range_stepping (void)
return 1;
}
+/* Implementation of linux_target_ops method "breakpoint_kind_from_pc". */
+
+static int
+aarch64_breakpoint_kind_from_pc (CORE_ADDR *pcptr)
+{
+ return aarch64_breakpoint_len;
+}
+
/* Implementation of linux_target_ops method "sw_breakpoint_from_kind". */
static const gdb_byte *
@@ -2949,7 +2957,7 @@ struct linux_target_ops the_low_target =
NULL, /* fetch_register */
aarch64_get_pc,
aarch64_set_pc,
- NULL, /* breakpoint_kind_from_pc */
+ aarch64_breakpoint_kind_from_pc,
aarch64_sw_breakpoint_from_kind,
NULL, /* breakpoint_reinsert_addr */
0, /* decr_pc_after_break */
@@ -75,6 +75,14 @@ bfin_set_pc (struct regcache *regcache, CORE_ADDR pc)
#define bfin_breakpoint_len 2
static const gdb_byte bfin_breakpoint[bfin_breakpoint_len] = {0xa1, 0x00};
+/* Implementation of linux_target_ops method "breakpoint_kind_from_pc". */
+
+static int
+bfin_breakpoint_kind_from_pc (CORE_ADDR *pcptr)
+{
+ return bfin_breakpoint_len;
+}
+
/* Implementation of linux_target_ops method "sw_breakpoint_from_kind". */
static const gdb_byte *
@@ -131,7 +139,7 @@ struct linux_target_ops the_low_target = {
NULL, /* fetch_register */
bfin_get_pc,
bfin_set_pc,
- NULL, /* breakpoint_kind_from_pc */
+ bfin_breakpoint_kind_from_pc,
bfin_sw_breakpoint_from_kind,
NULL, /* breakpoint_reinsert_addr */
2,
@@ -81,6 +81,14 @@ cris_set_pc (struct regcache *regcache, CORE_ADDR pc)
static const unsigned short cris_breakpoint = 0xe938;
#define cris_breakpoint_len 2
+/* Implementation of linux_target_ops method "breakpoint_kind_from_pc". */
+
+static int
+cris_breakpoint_kind_from_pc (CORE_ADDR *pcptr)
+{
+ return cris_breakpoint_len;
+}
+
/* Implementation of linux_target_ops method "sw_breakpoint_from_kind". */
static const gdb_byte *
@@ -149,7 +157,7 @@ struct linux_target_ops the_low_target = {
NULL, /* fetch_register */
cris_get_pc,
cris_set_pc,
- NULL, /* breakpoint_kind_from_pc */
+ cris_breakpoint_kind_from_pc,
cris_sw_breakpoint_from_kind,
cris_reinsert_addr,
0,
@@ -77,6 +77,14 @@ cris_set_pc (struct regcache *regcache, CORE_ADDR pc)
static const unsigned short cris_breakpoint = 0xe938;
#define cris_breakpoint_len 2
+/* Implementation of linux_target_ops method "breakpoint_kind_from_pc". */
+
+static int
+cris_breakpoint_kind_from_pc (CORE_ADDR *pcptr)
+{
+ return cris_breakpoint_len;
+}
+
/* Implementation of linux_target_ops method "sw_breakpoint_from_kind". */
static const gdb_byte *
@@ -429,7 +437,7 @@ struct linux_target_ops the_low_target = {
NULL, /* fetch_register */
cris_get_pc,
cris_set_pc,
- NULL, /* breakpoint_kind_from_pc */
+ cris_breakpoint_kind_from_pc,
cris_sw_breakpoint_from_kind,
cris_reinsert_addr,
0,
@@ -6942,11 +6942,9 @@ current_lwp_ptid (void)
static int
linux_breakpoint_kind_from_pc (CORE_ADDR *pcptr)
{
- if (the_low_target.breakpoint_kind_from_pc != NULL)
- return (*the_low_target.breakpoint_kind_from_pc) (pcptr);
- else
- /* Default breakpoint kind value. */
- return 0;
+ gdb_assert (the_low_target.breakpoint_kind_from_pc != NULL);
+
+ return (*the_low_target.breakpoint_kind_from_pc) (pcptr);
}
/* Implementation of the target_ops method "sw_breakpoint_from_kind". */
@@ -73,6 +73,14 @@ m32r_set_pc (struct regcache *regcache, CORE_ADDR pc)
static const unsigned short m32r_breakpoint = 0x10f1;
#define m32r_breakpoint_len 2
+/* Implementation of linux_target_ops method "breakpoint_kind_from_pc". */
+
+static int
+m32r_breakpoint_kind_from_pc (CORE_ADDR *pcptr)
+{
+ return m32r_breakpoint_len;
+}
+
/* Implementation of linux_target_ops method "sw_breakpoint_from_kind". */
static const gdb_byte *
@@ -129,7 +137,7 @@ struct linux_target_ops the_low_target = {
NULL, /* fetch_register */
m32r_get_pc,
m32r_set_pc,
- NULL, /* breakpoint_from_pc */
+ m32r_breakpoint_kind_from_pc,
m32r_sw_breakpoint_from_kind,
NULL,
0,
@@ -125,6 +125,14 @@ static struct regset_info m68k_regsets[] = {
static const gdb_byte m68k_breakpoint[] = { 0x4E, 0x4F };
#define m68k_breakpoint_len 2
+/* Implementation of linux_target_ops method "breakpoint_kind_from_pc". */
+
+static int
+m68k_breakpoint_kind_from_pc (CORE_ADDR *pcptr)
+{
+ return m68k_breakpoint_len;
+}
+
/* Implementation of linux_target_ops method "sw_breakpoint_from_kind". */
static const gdb_byte *
@@ -224,7 +232,7 @@ struct linux_target_ops the_low_target = {
NULL, /* fetch_register */
m68k_get_pc,
m68k_set_pc,
- NULL, /* breakpoint_kind_from_pc */
+ m68k_breakpoint_kind_from_pc,
m68k_sw_breakpoint_from_kind,
NULL,
2,
@@ -266,6 +266,14 @@ mips_set_pc (struct regcache *regcache, CORE_ADDR pc)
static const unsigned int mips_breakpoint = 0x0005000d;
#define mips_breakpoint_len 4
+/* Implementation of linux_target_ops method "breakpoint_kind_from_pc". */
+
+static int
+mips_breakpoint_kind_from_pc (CORE_ADDR *pcptr)
+{
+ return mips_breakpoint_len;
+}
+
/* Implementation of linux_target_ops method "sw_breakpoint_from_kind". */
static const gdb_byte *
@@ -890,7 +898,7 @@ struct linux_target_ops the_low_target = {
NULL, /* fetch_register */
mips_get_pc,
mips_set_pc,
- NULL, /* breakpoint_kind_from_pc */
+ mips_breakpoint_kind_from_pc,
mips_sw_breakpoint_from_kind,
mips_reinsert_addr,
0,
@@ -135,6 +135,14 @@ nios2_set_pc (struct regcache *regcache, CORE_ADDR pc)
static const unsigned int nios2_breakpoint = NIOS2_BREAKPOINT;
#define nios2_breakpoint_len 4
+/* Implementation of linux_target_ops method "breakpoint_kind_from_pc". */
+
+static int
+nios2_breakpoint_kind_from_pc (CORE_ADDR *pcptr)
+{
+ return nios2_breakpoint_len;
+}
+
/* Implementation of linux_target_ops method "sw_breakpoint_from_kind". */
static const gdb_byte *
@@ -277,7 +285,7 @@ struct linux_target_ops the_low_target =
NULL,
nios2_get_pc,
nios2_set_pc,
- NULL, /* breakpoint_kind_from_pc */
+ nios2_breakpoint_kind_from_pc,
nios2_sw_breakpoint_from_kind,
nios2_reinsert_addr,
0,
@@ -486,6 +486,14 @@ ppc_arch_setup (void)
static const unsigned int ppc_breakpoint = 0x7d821008;
#define ppc_breakpoint_len 4
+/* Implementation of linux_target_ops method "breakpoint_kind_from_pc". */
+
+static int
+ppc_breakpoint_kind_from_pc (CORE_ADDR *pcptr)
+{
+ return ppc_breakpoint_len;
+}
+
/* Implementation of linux_target_ops method "sw_breakpoint_from_kind". */
static const gdb_byte *
@@ -694,7 +702,7 @@ struct linux_target_ops the_low_target = {
NULL, /* fetch_register */
ppc_get_pc,
ppc_set_pc,
- NULL, /* breakpoint_kind_from_pc */
+ ppc_breakpoint_kind_from_pc,
ppc_sw_breakpoint_from_kind,
NULL,
0,
@@ -397,6 +397,14 @@ static struct regset_info s390_regsets[] = {
static const gdb_byte s390_breakpoint[] = { 0, 1 };
#define s390_breakpoint_len 2
+/* Implementation of linux_target_ops method "breakpoint_kind_from_pc". */
+
+static int
+s390_breakpoint_kind_from_pc (CORE_ADDR *pcptr)
+{
+ return s390_breakpoint_len;
+}
+
/* Implementation of linux_target_ops method "sw_breakpoint_from_kind". */
static const gdb_byte *
@@ -674,7 +682,7 @@ struct linux_target_ops the_low_target = {
NULL, /* fetch_register */
s390_get_pc,
s390_set_pc,
- NULL, /* breakpoint_kind_from_pc */
+ s390_breakpoint_kind_from_pc,
s390_sw_breakpoint_from_kind,
NULL,
s390_breakpoint_len,
@@ -77,6 +77,14 @@ sh_set_pc (struct regcache *regcache, CORE_ADDR pc)
static const unsigned short sh_breakpoint = 0xc3c3;
#define sh_breakpoint_len 2
+/* Implementation of linux_target_ops method "breakpoint_kind_from_pc". */
+
+static int
+sh_breakpoint_kind_from_pc (CORE_ADDR *pcptr)
+{
+ return sh_breakpoint_len;
+}
+
/* Implementation of linux_target_ops method "sw_breakpoint_from_kind". */
static const gdb_byte *
@@ -157,7 +165,7 @@ struct linux_target_ops the_low_target = {
NULL, /* fetch_register */
sh_get_pc,
sh_set_pc,
- NULL, /* breakpoint_kind_from_pc */
+ sh_breakpoint_kind_from_pc,
sh_sw_breakpoint_from_kind,
NULL,
0,
@@ -240,6 +240,14 @@ static const gdb_byte sparc_breakpoint[INSN_SIZE] = {
};
#define sparc_breakpoint_len INSN_SIZE
+/* Implementation of linux_target_ops method "breakpoint_kind_from_pc". */
+
+static int
+sparc_breakpoint_kind_from_pc (CORE_ADDR *pcptr)
+{
+ return sparc_breakpoint_len;
+}
+
/* Implementation of linux_target_ops method "sw_breakpoint_from_kind". */
static const unsigned char *
@@ -331,7 +339,7 @@ struct linux_target_ops the_low_target = {
sparc_get_pc,
/* No sparc_set_pc is needed. */
NULL,
- NULL, /* breakpoint_kind_from_pc */
+ sparc_breakpoint_kind_from_pc,
sparc_sw_breakpoint_from_kind,
sparc_reinsert_addr,
0,
@@ -173,6 +173,14 @@ static int *tic6x_regmap;
static unsigned int tic6x_breakpoint;
#define tic6x_breakpoint_len 4
+/* Implementation of linux_target_ops method "breakpoint_kind_from_pc". */
+
+static int
+tic6x_breakpoint_kind_from_pc (CORE_ADDR *pcptr)
+{
+ return tic6x_breakpoint_len;
+}
+
/* Implementation of linux_target_ops method "sw_breakpoint_from_kind". */
static const gdb_byte *
@@ -375,7 +383,7 @@ struct linux_target_ops the_low_target = {
NULL, /* fetch_register */
tic6x_get_pc,
tic6x_set_pc,
- NULL, /* breakpoint_kind_from_pc */
+ tic6x_breakpoint_kind_from_pc,
tic6x_sw_breakpoint_from_kind,
NULL,
0,
@@ -88,6 +88,14 @@ tile_set_pc (struct regcache *regcache, CORE_ADDR pc)
static uint64_t tile_breakpoint = 0x400b3cae70166000ULL;
#define tile_breakpoint_len 8
+/* Implementation of linux_target_ops method "breakpoint_kind_from_pc". */
+
+static int
+tile_breakpoint_kind_from_pc (CORE_ADDR *pcptr)
+{
+ return tile_breakpoint_len;
+}
+
/* Implementation of linux_target_ops method "sw_breakpoint_from_kind". */
static const gdb_byte *
@@ -191,7 +199,7 @@ struct linux_target_ops the_low_target =
NULL,
tile_get_pc,
tile_set_pc,
- NULL, /* breakpoint_kind_from_pc */
+ tile_breakpoint_kind_from_pc,
tile_sw_breakpoint_from_kind,
NULL,
0,
@@ -3243,6 +3243,15 @@ x86_emit_ops (void)
return &i386_emit_ops;
}
+/* Implementation of linux_target_ops method "breakpoint_kind_from_pc". */
+
+static int
+x86_breakpoint_kind_from_pc (CORE_ADDR *pcptr)
+{
+ return x86_breakpoint_len;
+}
+
+
/* Implementation of linux_target_ops method "sw_breakpoint_from_kind". */
static const gdb_byte *
@@ -3270,7 +3279,7 @@ struct linux_target_ops the_low_target =
NULL, /* fetch_register */
x86_get_pc,
x86_set_pc,
- NULL, /* breakpoint_kind_from_pc */
+ x86_breakpoint_kind_from_pc,
x86_sw_breakpoint_from_kind,
NULL,
1,
@@ -154,6 +154,14 @@ static struct regset_info xtensa_regsets[] = {
static const gdb_byte xtensa_breakpoint[] = XTENSA_BREAKPOINT;
#define xtensa_breakpoint_len 2
+/* Implementation of linux_target_ops method "breakpoint_kind_from_pc". */
+
+static int
+xtensa_breakpoint_kind_from_pc (CORE_ADDR *pcptr)
+{
+ return xtensa_breakpoint_len;
+}
+
/* Implementation of linux_target_ops method "sw_breakpoint_from_kind". */
static const gdb_byte *
@@ -243,7 +251,7 @@ struct linux_target_ops the_low_target = {
NULL, /* fetch_register */
xtensa_get_pc,
xtensa_set_pc,
- NULL, /* breakpoint_kind_from_pc */
+ xtensa_breakpoint_kind_from_pc,
xtensa_sw_breakpoint_from_kind,
NULL,
0,