+2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
+
+ Remove the 'emit_ops' linux target ops and let the concrete
+ linux target define the op by overriding the declaration of
+ process_stratum_target.
+
+ * linux-low.h (struct linux_target_ops): Remove the op.
+ (class linux_process_target) <emit_ops>: Remove.
+ * linux-low.cc (linux_process_target::emit_ops): Remove.
+ * linux-x86-low.cc (class x86_target) <emit_ops>: Declare.
+ (x86_emit_ops): Turn into...
+ (x86_target::emit_ops): ...this.
+ (the_low_target): Remove the op field.
+ * linux-aarch64-low.cc (class aarch64_target) <emit_ops>: Declare.
+ (aarch64_emit_ops): Turn into...
+ (aarch64_target::emit_ops): ...this.
+ (the_low_target): Remove the op field.
+ * linux-ppc-low.cc (class ppc_target) <emit_ops>: Declare.
+ (ppc_emit_ops): Turn into...
+ (ppc_target::emit_ops): ...this.
+ (the_low_target): Remove the op field.
+ * linux-s390-low.cc (class s390_target) <emit_ops>: Declare.
+ (s390_emit_ops): Turn into...
+ (s390_target::emit_ops): ...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-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 'install_fast_tracepoint_jump_pad' and
int get_min_fast_tracepoint_insn_len () override;
+ struct emit_ops *emit_ops () override;
+
protected:
void low_arch_setup () override;
aarch64_emit_ge_got,
};
-/* Implementation of linux_target_ops method "emit_ops". */
+/* Implementation of target ops method "emit_ops". */
-static struct emit_ops *
-aarch64_emit_ops (void)
+emit_ops *
+aarch64_target::emit_ops ()
{
return &aarch64_emit_ops_impl;
}
struct linux_target_ops the_low_target =
{
- aarch64_emit_ops,
aarch64_supports_range_stepping,
aarch64_supports_hardware_single_step,
aarch64_get_syscall_trapinfo,
}
struct linux_target_ops the_low_target = {
- NULL, /* emit_ops */
NULL, /* supports_range_stepping */
arm_supports_hardware_single_step,
arm_get_syscall_trapinfo,
}
struct linux_target_ops the_low_target = {
- NULL, /* emit_ops */
NULL, /* supports_range_stepping */
bfin_supports_hardware_single_step,
};
}
struct linux_target_ops the_low_target = {
- NULL, /* emit_ops */
NULL, /* supports_range_stepping */
cris_supports_hardware_single_step,
};
target_unpause_all (true);
}
-emit_ops *
-linux_process_target::emit_ops ()
-{
- if (the_low_target.emit_ops != NULL)
- return (*the_low_target.emit_ops) ();
- else
- return NULL;
-}
-
/* Extract &phdr and num_phdr in the inferior. Return 0 on success. */
static int
struct linux_target_ops
{
- /* Return the bytecode operations vector for the current inferior.
- Returns NULL if bytecode compilation is not supported. */
- struct emit_ops *(*emit_ops) (void);
-
/* Returns true if the low target supports range stepping. */
int (*supports_range_stepping) (void);
void stabilize_threads () override;
- struct emit_ops *emit_ops () override;
-
bool supports_disable_randomization () override;
bool supports_qxfer_libraries_svr4 () override;
}
struct linux_target_ops the_low_target = {
- NULL, /* emit_ops */
NULL, /* supports_range_stepping */
m32r_supports_hardware_single_step,
};
}
struct linux_target_ops the_low_target = {
- NULL, /* emit_ops */
NULL, /* supports_range_stepping */
m68k_supports_hardware_single_step,
};
int get_min_fast_tracepoint_insn_len () override;
+ struct emit_ops *emit_ops () override;
+
protected:
void low_arch_setup () override;
#endif
-/* Implementation of linux_target_ops method "emit_ops". */
+/* Implementation of target ops method "emit_ops". */
-static struct emit_ops *
-ppc_emit_ops (void)
+emit_ops *
+ppc_target::emit_ops ()
{
#ifdef __powerpc64__
struct regcache *regcache = get_thread_regcache (current_thread, 0);
}
struct linux_target_ops the_low_target = {
- ppc_emit_ops,
NULL, /* supports_range_stepping */
ppc_supports_hardware_single_step,
NULL, /* get_syscall_trapinfo */
void low_supply_ptrace_register (regcache *regcache, int regno,
const char *buf) override;
+ struct emit_ops *emit_ops () override;
+
protected:
void low_arch_setup () override;
};
#endif
-/* The "emit_ops" linux_target_ops method. */
+/* The "emit_ops" target ops method. */
-static struct emit_ops *
-s390_emit_ops (void)
+emit_ops *
+s390_target::emit_ops ()
{
#ifdef __s390x__
struct regcache *regcache = get_thread_regcache (current_thread, 0);
}
struct linux_target_ops the_low_target = {
- s390_emit_ops,
NULL, /* supports_range_stepping */
s390_supports_hardware_single_step,
NULL, /* get_syscall_trapinfo */
}
struct linux_target_ops the_low_target = {
- NULL, /* emit_ops */
NULL, /* supports_range_stepping */
sh_supports_hardware_single_step,
};
}
struct linux_target_ops the_low_target = {
- NULL, /* emit_ops */
NULL, /* supports_range_stepping */
tic6x_supports_hardware_single_step,
};
struct linux_target_ops the_low_target =
{
- NULL, /* emit_ops */
NULL, /* supports_range_stepping */
tile_supports_hardware_single_step,
};
int get_min_fast_tracepoint_insn_len () override;
+ struct emit_ops *emit_ops () override;
+
protected:
void low_arch_setup () override;
};
-static struct emit_ops *
-x86_emit_ops (void)
+emit_ops *
+x86_target::emit_ops ()
{
#ifdef __x86_64__
if (is_64bit_tdesc ())
struct linux_target_ops the_low_target =
{
- x86_emit_ops,
x86_supports_range_stepping,
x86_supports_hardware_single_step,
x86_get_syscall_trapinfo,
}
struct linux_target_ops the_low_target = {
- NULL, /* emit_ops */
NULL, /* supports_range_stepping */
xtensa_supports_hardware_single_step,
};