gdbserver/linux-low: turn 'supports_range_stepping' into a method
gdbserver/ChangeLog: 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn the 'supports_range_stepping' linux target op into a method of linux_process_target. * linux-low.h (struct linux_target_ops): Remove the op. (class linux_process_target) <low_supports_range_stepping>: Declare. * linux-low.cc (linux_process_target::low_supports_range_stepping): Define. (linux_process_target::supports_range_stepping): Update the call site. * linux-x86-low.cc (class x86_target) <low_supports_range_stepping>: Declare. (x86_supports_range_stepping): Turn into... (x86_target::low_supports_range_stepping): ...this. (the_low_target): Remove the op field. * linux-aarch64-low.cc (class aarch64_target) <low_supports_range_stepping>: Declare. (aarch64_supports_range_stepping): Turn into... (aarch64_target::low_supports_range_stepping): ...this. (the_low_target): Remove the op field. * linux-arm-low.cc (the_low_target): Remove the op field. * linux-bfin-low.cc (the_low_target): Ditto. * linux-crisv32-low.cc (the_low_target): Ditto. * linux-m32r-low.cc (the_low_target): Ditto. * linux-m68k-low.cc (the_low_target): Ditto. * linux-ppc-low.cc (the_low_target): Ditto. * linux-s390-low.cc (the_low_target): Ditto. * linux-sh-low.cc (the_low_target): Ditto. * linux-tic6x-low.cc (the_low_target): Ditto. * linux-tile-low.cc (the_low_target): Ditto. * linux-xtensa-low.cc (the_low_target): Ditto.
This commit is contained in:
parent
ab64c99982
commit
9cfd871551
|
@ -1,3 +1,36 @@
|
||||||
|
2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
|
||||||
|
|
||||||
|
Turn the 'supports_range_stepping' linux target op into a method
|
||||||
|
of linux_process_target.
|
||||||
|
|
||||||
|
* linux-low.h (struct linux_target_ops): Remove the op.
|
||||||
|
(class linux_process_target) <low_supports_range_stepping>: Declare.
|
||||||
|
* linux-low.cc (linux_process_target::low_supports_range_stepping):
|
||||||
|
Define.
|
||||||
|
(linux_process_target::supports_range_stepping): Update the call
|
||||||
|
site.
|
||||||
|
* linux-x86-low.cc (class x86_target)
|
||||||
|
<low_supports_range_stepping>: Declare.
|
||||||
|
(x86_supports_range_stepping): Turn into...
|
||||||
|
(x86_target::low_supports_range_stepping): ...this.
|
||||||
|
(the_low_target): Remove the op field.
|
||||||
|
* linux-aarch64-low.cc (class aarch64_target)
|
||||||
|
<low_supports_range_stepping>: Declare.
|
||||||
|
(aarch64_supports_range_stepping): Turn into...
|
||||||
|
(aarch64_target::low_supports_range_stepping): ...this.
|
||||||
|
(the_low_target): Remove the op field.
|
||||||
|
* linux-arm-low.cc (the_low_target): Remove the op field.
|
||||||
|
* linux-bfin-low.cc (the_low_target): Ditto.
|
||||||
|
* linux-crisv32-low.cc (the_low_target): Ditto.
|
||||||
|
* linux-m32r-low.cc (the_low_target): Ditto.
|
||||||
|
* linux-m68k-low.cc (the_low_target): Ditto.
|
||||||
|
* linux-ppc-low.cc (the_low_target): Ditto.
|
||||||
|
* linux-s390-low.cc (the_low_target): Ditto.
|
||||||
|
* linux-sh-low.cc (the_low_target): Ditto.
|
||||||
|
* linux-tic6x-low.cc (the_low_target): Ditto.
|
||||||
|
* linux-tile-low.cc (the_low_target): Ditto.
|
||||||
|
* linux-xtensa-low.cc (the_low_target): Ditto.
|
||||||
|
|
||||||
2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
|
2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
|
||||||
|
|
||||||
Remove the 'emit_ops' linux target ops and let the concrete
|
Remove the 'emit_ops' linux target ops and let the concrete
|
||||||
|
|
|
@ -123,6 +123,8 @@ protected:
|
||||||
void low_prepare_to_resume (lwp_info *lwp) override;
|
void low_prepare_to_resume (lwp_info *lwp) override;
|
||||||
|
|
||||||
int low_get_thread_area (int lwpid, CORE_ADDR *addrp) override;
|
int low_get_thread_area (int lwpid, CORE_ADDR *addrp) override;
|
||||||
|
|
||||||
|
bool low_supports_range_stepping () override;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* The singleton target ops object. */
|
/* The singleton target ops object. */
|
||||||
|
@ -3110,12 +3112,12 @@ aarch64_target::get_min_fast_tracepoint_insn_len ()
|
||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Implementation of linux_target_ops method "supports_range_stepping". */
|
/* Implementation of linux target ops method "low_supports_range_stepping". */
|
||||||
|
|
||||||
static int
|
bool
|
||||||
aarch64_supports_range_stepping (void)
|
aarch64_target::low_supports_range_stepping ()
|
||||||
{
|
{
|
||||||
return 1;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Implementation of target ops method "sw_breakpoint_from_kind". */
|
/* Implementation of target ops method "sw_breakpoint_from_kind". */
|
||||||
|
@ -3165,7 +3167,6 @@ aarch64_supports_hardware_single_step (void)
|
||||||
|
|
||||||
struct linux_target_ops the_low_target =
|
struct linux_target_ops the_low_target =
|
||||||
{
|
{
|
||||||
aarch64_supports_range_stepping,
|
|
||||||
aarch64_supports_hardware_single_step,
|
aarch64_supports_hardware_single_step,
|
||||||
aarch64_get_syscall_trapinfo,
|
aarch64_get_syscall_trapinfo,
|
||||||
};
|
};
|
||||||
|
|
|
@ -1117,7 +1117,6 @@ arm_target::get_regs_info ()
|
||||||
}
|
}
|
||||||
|
|
||||||
struct linux_target_ops the_low_target = {
|
struct linux_target_ops the_low_target = {
|
||||||
NULL, /* supports_range_stepping */
|
|
||||||
arm_supports_hardware_single_step,
|
arm_supports_hardware_single_step,
|
||||||
arm_get_syscall_trapinfo,
|
arm_get_syscall_trapinfo,
|
||||||
};
|
};
|
||||||
|
|
|
@ -171,7 +171,6 @@ bfin_target::get_regs_info ()
|
||||||
}
|
}
|
||||||
|
|
||||||
struct linux_target_ops the_low_target = {
|
struct linux_target_ops the_low_target = {
|
||||||
NULL, /* supports_range_stepping */
|
|
||||||
bfin_supports_hardware_single_step,
|
bfin_supports_hardware_single_step,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -468,7 +468,6 @@ crisv32_target::get_regs_info ()
|
||||||
}
|
}
|
||||||
|
|
||||||
struct linux_target_ops the_low_target = {
|
struct linux_target_ops the_low_target = {
|
||||||
NULL, /* supports_range_stepping */
|
|
||||||
cris_supports_hardware_single_step,
|
cris_supports_hardware_single_step,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -6289,10 +6289,14 @@ linux_process_target::supports_range_stepping ()
|
||||||
{
|
{
|
||||||
if (supports_software_single_step ())
|
if (supports_software_single_step ())
|
||||||
return true;
|
return true;
|
||||||
if (*the_low_target.supports_range_stepping == NULL)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return (*the_low_target.supports_range_stepping) ();
|
return low_supports_range_stepping ();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
linux_process_target::low_supports_range_stepping ()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
|
@ -131,9 +131,6 @@ struct lwp_info;
|
||||||
|
|
||||||
struct linux_target_ops
|
struct linux_target_ops
|
||||||
{
|
{
|
||||||
/* Returns true if the low target supports range stepping. */
|
|
||||||
int (*supports_range_stepping) (void);
|
|
||||||
|
|
||||||
/* See target.h. */
|
/* See target.h. */
|
||||||
int (*supports_hardware_single_step) (void);
|
int (*supports_hardware_single_step) (void);
|
||||||
|
|
||||||
|
@ -678,6 +675,9 @@ protected:
|
||||||
success, -1 on failure. */
|
success, -1 on failure. */
|
||||||
virtual int low_get_thread_area (int lwpid, CORE_ADDR *addrp);
|
virtual int low_get_thread_area (int lwpid, CORE_ADDR *addrp);
|
||||||
|
|
||||||
|
/* Returns true if the low target supports range stepping. */
|
||||||
|
virtual bool low_supports_range_stepping ();
|
||||||
|
|
||||||
/* How many bytes the PC should be decremented after a break. */
|
/* How many bytes the PC should be decremented after a break. */
|
||||||
virtual int low_decr_pc_after_break ();
|
virtual int low_decr_pc_after_break ();
|
||||||
};
|
};
|
||||||
|
|
|
@ -161,7 +161,6 @@ m32r_target::get_regs_info ()
|
||||||
}
|
}
|
||||||
|
|
||||||
struct linux_target_ops the_low_target = {
|
struct linux_target_ops the_low_target = {
|
||||||
NULL, /* supports_range_stepping */
|
|
||||||
m32r_supports_hardware_single_step,
|
m32r_supports_hardware_single_step,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -265,7 +265,6 @@ m68k_supports_hardware_single_step (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
struct linux_target_ops the_low_target = {
|
struct linux_target_ops the_low_target = {
|
||||||
NULL, /* supports_range_stepping */
|
|
||||||
m68k_supports_hardware_single_step,
|
m68k_supports_hardware_single_step,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -3454,7 +3454,6 @@ ppc_get_ipa_tdesc_idx (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
struct linux_target_ops the_low_target = {
|
struct linux_target_ops the_low_target = {
|
||||||
NULL, /* supports_range_stepping */
|
|
||||||
ppc_supports_hardware_single_step,
|
ppc_supports_hardware_single_step,
|
||||||
NULL, /* get_syscall_trapinfo */
|
NULL, /* get_syscall_trapinfo */
|
||||||
ppc_get_ipa_tdesc_idx,
|
ppc_get_ipa_tdesc_idx,
|
||||||
|
|
|
@ -2863,7 +2863,6 @@ s390_target::emit_ops ()
|
||||||
}
|
}
|
||||||
|
|
||||||
struct linux_target_ops the_low_target = {
|
struct linux_target_ops the_low_target = {
|
||||||
NULL, /* supports_range_stepping */
|
|
||||||
s390_supports_hardware_single_step,
|
s390_supports_hardware_single_step,
|
||||||
NULL, /* get_syscall_trapinfo */
|
NULL, /* get_syscall_trapinfo */
|
||||||
s390_get_ipa_tdesc_idx,
|
s390_get_ipa_tdesc_idx,
|
||||||
|
|
|
@ -192,7 +192,6 @@ sh_target::low_arch_setup ()
|
||||||
}
|
}
|
||||||
|
|
||||||
struct linux_target_ops the_low_target = {
|
struct linux_target_ops the_low_target = {
|
||||||
NULL, /* supports_range_stepping */
|
|
||||||
sh_supports_hardware_single_step,
|
sh_supports_hardware_single_step,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -423,7 +423,6 @@ tic6x_target::get_regs_info ()
|
||||||
}
|
}
|
||||||
|
|
||||||
struct linux_target_ops the_low_target = {
|
struct linux_target_ops the_low_target = {
|
||||||
NULL, /* supports_range_stepping */
|
|
||||||
tic6x_supports_hardware_single_step,
|
tic6x_supports_hardware_single_step,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -224,7 +224,6 @@ tile_supports_hardware_single_step (void)
|
||||||
|
|
||||||
struct linux_target_ops the_low_target =
|
struct linux_target_ops the_low_target =
|
||||||
{
|
{
|
||||||
NULL, /* supports_range_stepping */
|
|
||||||
tile_supports_hardware_single_step,
|
tile_supports_hardware_single_step,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -174,6 +174,8 @@ protected:
|
||||||
|
|
||||||
int low_get_thread_area (int lwpid, CORE_ADDR *addrp) override;
|
int low_get_thread_area (int lwpid, CORE_ADDR *addrp) override;
|
||||||
|
|
||||||
|
bool low_supports_range_stepping () override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/* Update all the target description of all processes; a new GDB
|
/* Update all the target description of all processes; a new GDB
|
||||||
|
@ -2956,10 +2958,10 @@ x86_target::sw_breakpoint_from_kind (int kind, int *size)
|
||||||
return x86_breakpoint;
|
return x86_breakpoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
bool
|
||||||
x86_supports_range_stepping (void)
|
x86_target::low_supports_range_stepping ()
|
||||||
{
|
{
|
||||||
return 1;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Implementation of linux_target_ops method "supports_hardware_single_step".
|
/* Implementation of linux_target_ops method "supports_hardware_single_step".
|
||||||
|
@ -2992,7 +2994,6 @@ x86_get_ipa_tdesc_idx (void)
|
||||||
|
|
||||||
struct linux_target_ops the_low_target =
|
struct linux_target_ops the_low_target =
|
||||||
{
|
{
|
||||||
x86_supports_range_stepping,
|
|
||||||
x86_supports_hardware_single_step,
|
x86_supports_hardware_single_step,
|
||||||
x86_get_syscall_trapinfo,
|
x86_get_syscall_trapinfo,
|
||||||
x86_get_ipa_tdesc_idx,
|
x86_get_ipa_tdesc_idx,
|
||||||
|
|
|
@ -329,7 +329,6 @@ xtensa_target::get_regs_info ()
|
||||||
}
|
}
|
||||||
|
|
||||||
struct linux_target_ops the_low_target = {
|
struct linux_target_ops the_low_target = {
|
||||||
NULL, /* supports_range_stepping */
|
|
||||||
xtensa_supports_hardware_single_step,
|
xtensa_supports_hardware_single_step,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue