+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>
Remove the 'emit_ops' linux target ops and let the concrete
void low_prepare_to_resume (lwp_info *lwp) override;
int low_get_thread_area (int lwpid, CORE_ADDR *addrp) override;
+
+ bool low_supports_range_stepping () override;
};
/* The singleton target ops object. */
return 4;
}
-/* Implementation of linux_target_ops method "supports_range_stepping". */
+/* Implementation of linux target ops method "low_supports_range_stepping". */
-static int
-aarch64_supports_range_stepping (void)
+bool
+aarch64_target::low_supports_range_stepping ()
{
- return 1;
+ return true;
}
/* Implementation of target ops method "sw_breakpoint_from_kind". */
struct linux_target_ops the_low_target =
{
- aarch64_supports_range_stepping,
aarch64_supports_hardware_single_step,
aarch64_get_syscall_trapinfo,
};
}
struct linux_target_ops the_low_target = {
- NULL, /* supports_range_stepping */
arm_supports_hardware_single_step,
arm_get_syscall_trapinfo,
};
}
struct linux_target_ops the_low_target = {
- NULL, /* supports_range_stepping */
bfin_supports_hardware_single_step,
};
}
struct linux_target_ops the_low_target = {
- NULL, /* supports_range_stepping */
cris_supports_hardware_single_step,
};
{
if (supports_software_single_step ())
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
struct linux_target_ops
{
- /* Returns true if the low target supports range stepping. */
- int (*supports_range_stepping) (void);
-
/* See target.h. */
int (*supports_hardware_single_step) (void);
success, -1 on failure. */
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. */
virtual int low_decr_pc_after_break ();
};
}
struct linux_target_ops the_low_target = {
- NULL, /* supports_range_stepping */
m32r_supports_hardware_single_step,
};
}
struct linux_target_ops the_low_target = {
- NULL, /* supports_range_stepping */
m68k_supports_hardware_single_step,
};
}
struct linux_target_ops the_low_target = {
- NULL, /* supports_range_stepping */
ppc_supports_hardware_single_step,
NULL, /* get_syscall_trapinfo */
ppc_get_ipa_tdesc_idx,
}
struct linux_target_ops the_low_target = {
- NULL, /* supports_range_stepping */
s390_supports_hardware_single_step,
NULL, /* get_syscall_trapinfo */
s390_get_ipa_tdesc_idx,
}
struct linux_target_ops the_low_target = {
- NULL, /* supports_range_stepping */
sh_supports_hardware_single_step,
};
}
struct linux_target_ops the_low_target = {
- NULL, /* supports_range_stepping */
tic6x_supports_hardware_single_step,
};
struct linux_target_ops the_low_target =
{
- NULL, /* supports_range_stepping */
tile_supports_hardware_single_step,
};
int low_get_thread_area (int lwpid, CORE_ADDR *addrp) override;
+ bool low_supports_range_stepping () override;
+
private:
/* Update all the target description of all processes; a new GDB
return x86_breakpoint;
}
-static int
-x86_supports_range_stepping (void)
+bool
+x86_target::low_supports_range_stepping ()
{
- return 1;
+ return true;
}
/* Implementation of linux_target_ops method "supports_hardware_single_step".
struct linux_target_ops the_low_target =
{
- x86_supports_range_stepping,
x86_supports_hardware_single_step,
x86_get_syscall_trapinfo,
x86_get_ipa_tdesc_idx,
}
struct linux_target_ops the_low_target = {
- NULL, /* supports_range_stepping */
xtensa_supports_hardware_single_step,
};