gdbserver/linux-low: turn 'sw_breakpoint_from_kind' into a method

gdbserver/ChangeLog:
2020-04-02  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>

	Remove the 'sw_breakpoint_from_kind' linux target op, and let
	the concrete linux target define it by overriding the op
	in process_stratum_target.

	* linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
	Remove.
	* linux-low.h (struct linux_target_ops): Remove the op.
	(class linux_process_target) <sw_breakpoint_from_kind>: Remove.
	* linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
	Declare.
	(x86_sw_breakpoint_from_kind): Turn into...
	(x86_target::sw_breakpoint_from_kind): ...this.
	(the_low_target): Remove the op field.
	* linux-aarch64-low.cc (class aarch64_target)
	<sw_breakpoint_from_kind>: Declare.
	(aarch64_sw_breakpoint_from_kind): Turn into...
	(aarch64_target::sw_breakpoint_from_kind): ...this.
	(the_low_target): Remove the op field.
	* linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
	Declare.
	(arm_target::sw_breakpoint_from_kind): Define.
	(the_low_target): Remove the op field.
	* linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
	Declare.
	(bfin_sw_breakpoint_from_kind): Turn into...
	(bfin_target::sw_breakpoint_from_kind): ...this.
	(the_low_target): Remove the op field.
	* linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
	Declare.
	(cris_sw_breakpoint_from_kind): Turn into...
	(cris_target::sw_breakpoint_from_kind): ...this.
	(the_low_target): Remove the op field.
	* linux-crisv32-low.cc (class crisv32_target)
	<sw_breakpoint_from_kind>: Declare.
	(cris_sw_breakpoint_from_kind): Turn into...
	(crisv32_target::sw_breakpoint_from_kind): ...this.
	(the_low_target): Remove the op field.
	* linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
	Declare.
	(ia64_target::sw_breakpoint_from_kind): Define.
	* linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
	Declare.
	(m32r_sw_breakpoint_from_kind): Turn into...
	(m32r_target::sw_breakpoint_from_kind): ...this.
	(the_low_target): Remove the op field.
	* linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
	Declare.
	(m68k_sw_breakpoint_from_kind): Turn into...
	(m68k_target::sw_breakpoint_from_kind): ...this.
	(the_low_target): Remove the op field.
	* linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
	Declare.
	(mips_sw_breakpoint_from_kind): Turn into...
	(mips_target::sw_breakpoint_from_kind): ...this.
	(the_low_target): Remove the op field.
	* linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
	Declare.
	(nios2_sw_breakpoint_from_kind): Turn into...
	(nios2_target::sw_breakpoint_from_kind): ...this.
	(the_low_target): Remove the op field.
	* linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
	Declare.
	(ppc_sw_breakpoint_from_kind): Turn into...
	(ppc_target::sw_breakpoint_from_kind): ...this.
	(the_low_target): Remove the op field.
	* linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
	Declare.
	(riscv_sw_breakpoint_from_kind): Turn into...
	(riscv_target::sw_breakpoint_from_kind): ...this.
	(the_low_target): Remove the op field.
	* linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
	Declare.
	(s390_sw_breakpoint_from_kind): Turn into...
	(s390_target::sw_breakpoint_from_kind): ...this.
	(the_low_target): Remove the op field.
	* linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
	Declare.
	(sh_sw_breakpoint_from_kind): Turn into...
	(sh_target::sw_breakpoint_from_kind): ...this.
	(the_low_target): Remove the op field.
	* linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
	Declare.
	(sparc_sw_breakpoint_from_kind): Turn into...
	(sparc_target::sw_breakpoint_from_kind): ...this.
	(the_low_target): Remove the op field.
	* linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
	Declare.
	(tic6x_sw_breakpoint_from_kind): Turn into...
	(tic6x_target::sw_breakpoint_from_kind): ...this.
	(the_low_target): Remove the op field.
	* linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
	Declare.
	(tile_sw_breakpoint_from_kind): Turn into...
	(tile_target::sw_breakpoint_from_kind): ...this.
	(the_low_target): Remove the op field.
	* linux-xtensa-low.cc (class xtensa_target)
	<sw_breakpoint_from_kind>: Declare.
	(xtensa_sw_breakpoint_from_kind): Turn into...
	(xtensa_target::sw_breakpoint_from_kind): ...this.
	(the_low_target): Remove the op field.
This commit is contained in:
Tankut Baris Aktemur 2020-04-02 15:11:25 +02:00
parent 06250e4e67
commit 3ca4edb661
22 changed files with 205 additions and 84 deletions

View File

@ -1,3 +1,106 @@
2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Remove the 'sw_breakpoint_from_kind' linux target op, and let
the concrete linux target define it by overriding the op
in process_stratum_target.
* linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
Remove.
* linux-low.h (struct linux_target_ops): Remove the op.
(class linux_process_target) <sw_breakpoint_from_kind>: Remove.
* linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
Declare.
(x86_sw_breakpoint_from_kind): Turn into...
(x86_target::sw_breakpoint_from_kind): ...this.
(the_low_target): Remove the op field.
* linux-aarch64-low.cc (class aarch64_target)
<sw_breakpoint_from_kind>: Declare.
(aarch64_sw_breakpoint_from_kind): Turn into...
(aarch64_target::sw_breakpoint_from_kind): ...this.
(the_low_target): Remove the op field.
* linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
Declare.
(arm_target::sw_breakpoint_from_kind): Define.
(the_low_target): Remove the op field.
* linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
Declare.
(bfin_sw_breakpoint_from_kind): Turn into...
(bfin_target::sw_breakpoint_from_kind): ...this.
(the_low_target): Remove the op field.
* linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
Declare.
(cris_sw_breakpoint_from_kind): Turn into...
(cris_target::sw_breakpoint_from_kind): ...this.
(the_low_target): Remove the op field.
* linux-crisv32-low.cc (class crisv32_target)
<sw_breakpoint_from_kind>: Declare.
(cris_sw_breakpoint_from_kind): Turn into...
(crisv32_target::sw_breakpoint_from_kind): ...this.
(the_low_target): Remove the op field.
* linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
Declare.
(ia64_target::sw_breakpoint_from_kind): Define.
* linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
Declare.
(m32r_sw_breakpoint_from_kind): Turn into...
(m32r_target::sw_breakpoint_from_kind): ...this.
(the_low_target): Remove the op field.
* linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
Declare.
(m68k_sw_breakpoint_from_kind): Turn into...
(m68k_target::sw_breakpoint_from_kind): ...this.
(the_low_target): Remove the op field.
* linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
Declare.
(mips_sw_breakpoint_from_kind): Turn into...
(mips_target::sw_breakpoint_from_kind): ...this.
(the_low_target): Remove the op field.
* linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
Declare.
(nios2_sw_breakpoint_from_kind): Turn into...
(nios2_target::sw_breakpoint_from_kind): ...this.
(the_low_target): Remove the op field.
* linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
Declare.
(ppc_sw_breakpoint_from_kind): Turn into...
(ppc_target::sw_breakpoint_from_kind): ...this.
(the_low_target): Remove the op field.
* linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
Declare.
(riscv_sw_breakpoint_from_kind): Turn into...
(riscv_target::sw_breakpoint_from_kind): ...this.
(the_low_target): Remove the op field.
* linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
Declare.
(s390_sw_breakpoint_from_kind): Turn into...
(s390_target::sw_breakpoint_from_kind): ...this.
(the_low_target): Remove the op field.
* linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
Declare.
(sh_sw_breakpoint_from_kind): Turn into...
(sh_target::sw_breakpoint_from_kind): ...this.
(the_low_target): Remove the op field.
* linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
Declare.
(sparc_sw_breakpoint_from_kind): Turn into...
(sparc_target::sw_breakpoint_from_kind): ...this.
(the_low_target): Remove the op field.
* linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
Declare.
(tic6x_sw_breakpoint_from_kind): Turn into...
(tic6x_target::sw_breakpoint_from_kind): ...this.
(the_low_target): Remove the op field.
* linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
Declare.
(tile_sw_breakpoint_from_kind): Turn into...
(tile_target::sw_breakpoint_from_kind): ...this.
(the_low_target): Remove the op field.
* linux-xtensa-low.cc (class xtensa_target)
<sw_breakpoint_from_kind>: Declare.
(xtensa_sw_breakpoint_from_kind): Turn into...
(xtensa_target::sw_breakpoint_from_kind): ...this.
(the_low_target): Remove the op field.
2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Remove the 'breakpoint_kind_from_pc' and

View File

@ -61,6 +61,8 @@ public:
int breakpoint_kind_from_current_state (CORE_ADDR *pcptr) override;
const gdb_byte *sw_breakpoint_from_kind (int kind, int *size) override;
protected:
void low_arch_setup () override;
@ -3054,10 +3056,10 @@ aarch64_supports_range_stepping (void)
return 1;
}
/* Implementation of linux_target_ops method "sw_breakpoint_from_kind". */
/* Implementation of target ops method "sw_breakpoint_from_kind". */
static const gdb_byte *
aarch64_sw_breakpoint_from_kind (int kind, int *size)
const gdb_byte *
aarch64_target::sw_breakpoint_from_kind (int kind, int *size)
{
if (is_64bit_tdesc ())
{
@ -3101,7 +3103,6 @@ aarch64_supports_hardware_single_step (void)
struct linux_target_ops the_low_target =
{
aarch64_sw_breakpoint_from_kind,
NULL, /* get_next_pcs */
0, /* decr_pc_after_break */
aarch64_breakpoint_at,

View File

@ -66,6 +66,8 @@ public:
int breakpoint_kind_from_current_state (CORE_ADDR *pcptr) override;
const gdb_byte *sw_breakpoint_from_kind (int kind, int *size) override;
protected:
void low_arch_setup () override;
@ -115,6 +117,12 @@ arm_target::breakpoint_kind_from_current_state (CORE_ADDR *pcptr)
return arm_breakpoint_kind_from_current_state (pcptr);
}
const gdb_byte *
arm_target::sw_breakpoint_from_kind (int kind, int *size)
{
return arm_sw_breakpoint_from_kind (kind, size);
}
/* Information describing the hardware breakpoint capabilities. */
static struct
{
@ -1067,7 +1075,6 @@ arm_target::get_regs_info ()
}
struct linux_target_ops the_low_target = {
arm_sw_breakpoint_from_kind,
arm_gdbserver_get_next_pcs,
0,
arm_breakpoint_at,

View File

@ -31,6 +31,8 @@ public:
const regs_info *get_regs_info () override;
const gdb_byte *sw_breakpoint_from_kind (int kind, int *size) override;
protected:
void low_arch_setup () override;
@ -102,10 +104,10 @@ bfin_target::low_cannot_fetch_register (int regno)
#define bfin_breakpoint_len 2
static const gdb_byte bfin_breakpoint[bfin_breakpoint_len] = {0xa1, 0x00};
/* Implementation of linux_target_ops method "sw_breakpoint_from_kind". */
/* Implementation of target ops method "sw_breakpoint_from_kind". */
static const gdb_byte *
bfin_sw_breakpoint_from_kind (int kind, int *size)
const gdb_byte *
bfin_target::sw_breakpoint_from_kind (int kind, int *size)
{
*size = bfin_breakpoint_len;
return bfin_breakpoint;
@ -159,7 +161,6 @@ bfin_target::get_regs_info ()
}
struct linux_target_ops the_low_target = {
bfin_sw_breakpoint_from_kind,
NULL, /* get_next_pcs */
2,
bfin_breakpoint_at,

View File

@ -28,6 +28,8 @@ public:
const regs_info *get_regs_info () override;
const gdb_byte *sw_breakpoint_from_kind (int kind, int *size) override;
protected:
void low_arch_setup () override;
@ -107,10 +109,10 @@ cris_target::low_cannot_fetch_register (int regno)
static const unsigned short cris_breakpoint = 0xe938;
#define cris_breakpoint_len 2
/* Implementation of linux_target_ops method "sw_breakpoint_from_kind". */
/* Implementation of target ops method "sw_breakpoint_from_kind". */
static const gdb_byte *
cris_sw_breakpoint_from_kind (int kind, int *size)
const gdb_byte *
cris_target::sw_breakpoint_from_kind (int kind, int *size)
{
*size = cris_breakpoint_len;
return (const gdb_byte *) &cris_breakpoint;
@ -156,7 +158,6 @@ cris_target::get_regs_info ()
}
struct linux_target_ops the_low_target = {
cris_sw_breakpoint_from_kind,
NULL, /* get_next_pcs */
0,
cris_breakpoint_at,

View File

@ -28,6 +28,8 @@ public:
const regs_info *get_regs_info () override;
const gdb_byte *sw_breakpoint_from_kind (int kind, int *size) override;
protected:
void low_arch_setup () override;
@ -117,10 +119,10 @@ static int cris_regmap[] = {
static const unsigned short cris_breakpoint = 0xe938;
#define cris_breakpoint_len 2
/* Implementation of linux_target_ops method "sw_breakpoint_from_kind". */
/* Implementation of target ops method "sw_breakpoint_from_kind". */
static const gdb_byte *
cris_sw_breakpoint_from_kind (int kind, int *size)
const gdb_byte *
crisv32_target::sw_breakpoint_from_kind (int kind, int *size)
{
*size = cris_breakpoint_len;
return (const gdb_byte *) &cris_breakpoint;
@ -453,7 +455,6 @@ crisv32_target::get_regs_info ()
}
struct linux_target_ops the_low_target = {
cris_sw_breakpoint_from_kind,
NULL, /* get_next_pcs */
0,
cris_breakpoint_at,

View File

@ -31,6 +31,8 @@ public:
const regs_info *get_regs_info () override;
const gdb_byte *sw_breakpoint_from_kind (int kind, int *size) override;
protected:
void low_arch_setup () override;
@ -46,6 +48,13 @@ protected:
static ia64_target the_ia64_target;
const gdb_byte *
ia64_target::sw_breakpoint_from_kind (int kind, int *size)
{
gdb_assert_no_reached ("target op sw_breakpoint_from_kind is not "
"implemented by this target");
}
/* Defined in auto-generated file reg-ia64.c. */
void init_registers_ia64 (void);
extern const struct target_desc *tdesc_ia64;

View File

@ -7230,16 +7230,6 @@ current_lwp_ptid (void)
return ptid_of (current_thread);
}
/* Implementation of the target_ops method "sw_breakpoint_from_kind". */
const gdb_byte *
linux_process_target::sw_breakpoint_from_kind (int kind, int *size)
{
gdb_assert (the_low_target.sw_breakpoint_from_kind != NULL);
return (*the_low_target.sw_breakpoint_from_kind) (kind, size);
}
const char *
linux_process_target::thread_name (ptid_t thread)
{

View File

@ -131,9 +131,6 @@ struct lwp_info;
struct linux_target_ops
{
/* See target.h for details. */
const gdb_byte *(*sw_breakpoint_from_kind) (int kind, int *size);
/* Find the next possible PCs after the current instruction executes. */
std::vector<CORE_ADDR> (*get_next_pcs) (struct regcache *regcache);
@ -436,8 +433,6 @@ public:
ssize_t multifs_readlink (int pid, const char *filename, char *buf,
size_t bufsiz) override;
const gdb_byte *sw_breakpoint_from_kind (int kind, int *size) override;
const char *thread_name (ptid_t thread) override;
#if USE_THREAD_DB

View File

@ -31,6 +31,8 @@ public:
const regs_info *get_regs_info () override;
const gdb_byte *sw_breakpoint_from_kind (int kind, int *size) override;
protected:
void low_arch_setup () override;
@ -101,10 +103,10 @@ m32r_target::low_cannot_fetch_register (int regno)
static const unsigned short m32r_breakpoint = 0x10f1;
#define m32r_breakpoint_len 2
/* Implementation of linux_target_ops method "sw_breakpoint_from_kind". */
/* Implementation of target ops method "sw_breakpoint_from_kind". */
static const gdb_byte *
m32r_sw_breakpoint_from_kind (int kind, int *size)
const gdb_byte *
m32r_target::sw_breakpoint_from_kind (int kind, int *size)
{
*size = m32r_breakpoint_len;
return (const gdb_byte *) &m32r_breakpoint;
@ -158,7 +160,6 @@ m32r_target::get_regs_info ()
}
struct linux_target_ops the_low_target = {
m32r_sw_breakpoint_from_kind,
NULL,
0,
m32r_breakpoint_at,

View File

@ -27,6 +27,8 @@ public:
const regs_info *get_regs_info () override;
const gdb_byte *sw_breakpoint_from_kind (int kind, int *size) override;
protected:
void low_arch_setup () override;
@ -170,10 +172,10 @@ 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 "sw_breakpoint_from_kind". */
/* Implementation of target ops method "sw_breakpoint_from_kind". */
static const gdb_byte *
m68k_sw_breakpoint_from_kind (int kind, int *size)
const gdb_byte *
m68k_target::sw_breakpoint_from_kind (int kind, int *size)
{
*size = m68k_breakpoint_len;
return m68k_breakpoint;
@ -253,7 +255,6 @@ m68k_supports_hardware_single_step (void)
}
struct linux_target_ops the_low_target = {
m68k_sw_breakpoint_from_kind,
NULL,
2,
m68k_breakpoint_at,

View File

@ -33,6 +33,8 @@ public:
const regs_info *get_regs_info () override;
const gdb_byte *sw_breakpoint_from_kind (int kind, int *size) override;
protected:
void low_arch_setup () override;
@ -315,10 +317,10 @@ mips_target::low_set_pc (regcache *regcache, CORE_ADDR pc)
static const unsigned int mips_breakpoint = 0x0005000d;
#define mips_breakpoint_len 4
/* Implementation of linux_target_ops method "sw_breakpoint_from_kind". */
/* Implementation of target ops method "sw_breakpoint_from_kind". */
static const gdb_byte *
mips_sw_breakpoint_from_kind (int kind, int *size)
const gdb_byte *
mips_target::sw_breakpoint_from_kind (int kind, int *size)
{
*size = mips_breakpoint_len;
return (const gdb_byte *) &mips_breakpoint;
@ -964,7 +966,6 @@ mips_target::get_regs_info ()
}
struct linux_target_ops the_low_target = {
mips_sw_breakpoint_from_kind,
NULL, /* get_next_pcs */
0,
mips_breakpoint_at,

View File

@ -39,6 +39,8 @@ public:
const regs_info *get_regs_info () override;
const gdb_byte *sw_breakpoint_from_kind (int kind, int *size) override;
protected:
void low_arch_setup () override;
@ -152,10 +154,10 @@ nios2_target::low_cannot_store_register (int regno)
static const unsigned int nios2_breakpoint = NIOS2_BREAKPOINT;
#define nios2_breakpoint_len 4
/* Implementation of linux_target_ops method "sw_breakpoint_from_kind". */
/* Implementation of target ops method "sw_breakpoint_from_kind". */
static const gdb_byte *
nios2_sw_breakpoint_from_kind (int kind, int *size)
const gdb_byte *
nios2_target::sw_breakpoint_from_kind (int kind, int *size)
{
*size = nios2_breakpoint_len;
return (const gdb_byte *) &nios2_breakpoint;
@ -275,7 +277,6 @@ nios2_target::get_regs_info ()
struct linux_target_ops the_low_target =
{
nios2_sw_breakpoint_from_kind,
NULL, /* get_next_pcs */
0,
nios2_breakpoint_at,

View File

@ -52,6 +52,8 @@ public:
const regs_info *get_regs_info () override;
const gdb_byte *sw_breakpoint_from_kind (int kind, int *size) override;
protected:
void low_arch_setup () override;
@ -296,10 +298,10 @@ static int ppc_regmap_adjusted;
static const unsigned int ppc_breakpoint = 0x7d821008;
#define ppc_breakpoint_len 4
/* Implementation of linux_target_ops method "sw_breakpoint_from_kind". */
/* Implementation of target ops method "sw_breakpoint_from_kind". */
static const gdb_byte *
ppc_sw_breakpoint_from_kind (int kind, int *size)
const gdb_byte *
ppc_target::sw_breakpoint_from_kind (int kind, int *size)
{
*size = ppc_breakpoint_len;
return (const gdb_byte *) &ppc_breakpoint;
@ -3404,7 +3406,6 @@ ppc_get_ipa_tdesc_idx (void)
}
struct linux_target_ops the_low_target = {
ppc_sw_breakpoint_from_kind,
NULL,
0,
ppc_breakpoint_at,

View File

@ -40,6 +40,8 @@ public:
int breakpoint_kind_from_pc (CORE_ADDR *pcptr) override;
const gdb_byte *sw_breakpoint_from_kind (int kind, int *size) override;
protected:
void low_arch_setup () override;
@ -266,10 +268,10 @@ riscv_target::breakpoint_kind_from_pc (CORE_ADDR *pcptr)
return sizeof (riscv_cbreakpoint);
}
/* Implementation of linux_target_ops method "sw_breakpoint_from_kind". */
/* Implementation of target ops method "sw_breakpoint_from_kind". */
static const gdb_byte *
riscv_sw_breakpoint_from_kind (int kind, int *size)
const gdb_byte *
riscv_target::sw_breakpoint_from_kind (int kind, int *size)
{
*size = kind;
switch (kind)
@ -307,7 +309,6 @@ riscv_breakpoint_at (CORE_ADDR pc)
/* RISC-V/Linux target operations. */
struct linux_target_ops the_low_target =
{
riscv_sw_breakpoint_from_kind,
NULL, /* get_next_pcs */
0, /* decr_pc_after_break */
riscv_breakpoint_at,

View File

@ -59,6 +59,8 @@ public:
const regs_info *get_regs_info () override;
const gdb_byte *sw_breakpoint_from_kind (int kind, int *size) override;
protected:
void low_arch_setup () override;
@ -451,10 +453,10 @@ 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 "sw_breakpoint_from_kind". */
/* Implementation of target ops method "sw_breakpoint_from_kind". */
static const gdb_byte *
s390_sw_breakpoint_from_kind (int kind, int *size)
const gdb_byte *
s390_target::sw_breakpoint_from_kind (int kind, int *size)
{
*size = s390_breakpoint_len;
return s390_breakpoint;
@ -2824,7 +2826,6 @@ s390_emit_ops (void)
}
struct linux_target_ops the_low_target = {
s390_sw_breakpoint_from_kind,
NULL,
s390_breakpoint_len,
s390_breakpoint_at,

View File

@ -27,6 +27,8 @@ public:
const regs_info *get_regs_info () override;
const gdb_byte *sw_breakpoint_from_kind (int kind, int *size) override;
protected:
void low_arch_setup () override;
@ -107,10 +109,10 @@ sh_target::low_cannot_fetch_register (int regno)
static const unsigned short sh_breakpoint = 0xc3c3;
#define sh_breakpoint_len 2
/* Implementation of linux_target_ops method "sw_breakpoint_from_kind". */
/* Implementation of target ops method "sw_breakpoint_from_kind". */
static const gdb_byte *
sh_sw_breakpoint_from_kind (int kind, int *size)
const gdb_byte *
sh_target::sw_breakpoint_from_kind (int kind, int *size)
{
*size = sh_breakpoint_len;
return (const gdb_byte *) &sh_breakpoint;
@ -188,7 +190,6 @@ sh_target::low_arch_setup ()
}
struct linux_target_ops the_low_target = {
sh_sw_breakpoint_from_kind,
NULL,
0,
sh_breakpoint_at,

View File

@ -50,6 +50,8 @@ public:
const regs_info *get_regs_info () override;
const gdb_byte *sw_breakpoint_from_kind (int kind, int *size) override;
protected:
void low_arch_setup () override;
@ -267,10 +269,10 @@ static const gdb_byte sparc_breakpoint[INSN_SIZE] = {
};
#define sparc_breakpoint_len INSN_SIZE
/* Implementation of linux_target_ops method "sw_breakpoint_from_kind". */
/* Implementation of target ops method "sw_breakpoint_from_kind". */
static const unsigned char *
sparc_sw_breakpoint_from_kind (int kind, int *size)
const gdb_byte *
sparc_target::sw_breakpoint_from_kind (int kind, int *size)
{
*size = sparc_breakpoint_len;
return sparc_breakpoint;
@ -337,7 +339,6 @@ sparc_target::get_regs_info ()
}
struct linux_target_ops the_low_target = {
sparc_sw_breakpoint_from_kind,
NULL, /* get_next_pcs */
0,
sparc_breakpoint_at,

View File

@ -46,6 +46,8 @@ public:
const regs_info *get_regs_info () override;
const gdb_byte *sw_breakpoint_from_kind (int kind, int *size) override;
protected:
void low_arch_setup () override;
@ -202,10 +204,10 @@ static int *tic6x_regmap;
static unsigned int tic6x_breakpoint;
#define tic6x_breakpoint_len 4
/* Implementation of linux_target_ops method "sw_breakpoint_from_kind". */
/* Implementation of target ops method "sw_breakpoint_from_kind". */
static const gdb_byte *
tic6x_sw_breakpoint_from_kind (int kind, int *size)
const gdb_byte *
tic6x_target::sw_breakpoint_from_kind (int kind, int *size)
{
*size = tic6x_breakpoint_len;
return (const gdb_byte *) &tic6x_breakpoint;
@ -419,7 +421,6 @@ tic6x_target::get_regs_info ()
}
struct linux_target_ops the_low_target = {
tic6x_sw_breakpoint_from_kind,
NULL,
0,
tic6x_breakpoint_at,

View File

@ -31,6 +31,8 @@ public:
const regs_info *get_regs_info () override;
const gdb_byte *sw_breakpoint_from_kind (int kind, int *size) override;
protected:
void low_arch_setup () override;
@ -116,10 +118,10 @@ tile_target::low_cannot_store_register (int regno)
static uint64_t tile_breakpoint = 0x400b3cae70166000ULL;
#define tile_breakpoint_len 8
/* Implementation of linux_target_ops method "sw_breakpoint_from_kind". */
/* Implementation of target ops method "sw_breakpoint_from_kind". */
static const gdb_byte *
tile_sw_breakpoint_from_kind (int kind, int *size)
const gdb_byte *
tile_target::sw_breakpoint_from_kind (int kind, int *size)
{
*size = tile_breakpoint_len;
return (const gdb_byte *) &tile_breakpoint;
@ -220,7 +222,6 @@ tile_supports_hardware_single_step (void)
struct linux_target_ops the_low_target =
{
tile_sw_breakpoint_from_kind,
NULL,
0,
tile_breakpoint_at,

View File

@ -106,6 +106,8 @@ public:
const regs_info *get_regs_info () override;
const gdb_byte *sw_breakpoint_from_kind (int kind, int *size) override;
protected:
void low_arch_setup () override;
@ -2852,10 +2854,10 @@ x86_emit_ops (void)
return &i386_emit_ops;
}
/* Implementation of linux_target_ops method "sw_breakpoint_from_kind". */
/* Implementation of target ops method "sw_breakpoint_from_kind". */
static const gdb_byte *
x86_sw_breakpoint_from_kind (int kind, int *size)
const gdb_byte *
x86_target::sw_breakpoint_from_kind (int kind, int *size)
{
*size = x86_breakpoint_len;
return x86_breakpoint;
@ -2897,7 +2899,6 @@ x86_get_ipa_tdesc_idx (void)
struct linux_target_ops the_low_target =
{
x86_sw_breakpoint_from_kind,
NULL,
1,
x86_breakpoint_at,

View File

@ -28,6 +28,8 @@ public:
const regs_info *get_regs_info () override;
const gdb_byte *sw_breakpoint_from_kind (int kind, int *size) override;
protected:
void low_arch_setup () override;
@ -252,10 +254,10 @@ 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 "sw_breakpoint_from_kind". */
/* Implementation of target ops method "sw_breakpoint_from_kind". */
static const gdb_byte *
xtensa_sw_breakpoint_from_kind (int kind, int *size)
const gdb_byte *
xtensa_target::sw_breakpoint_from_kind (int kind, int *size)
{
*size = xtensa_breakpoint_len;
return xtensa_breakpoint;
@ -326,7 +328,6 @@ xtensa_target::get_regs_info ()
}
struct linux_target_ops the_low_target = {
xtensa_sw_breakpoint_from_kind,
NULL,
0,
xtensa_breakpoint_at,