@@ -80,6 +80,8 @@ public:
int get_min_fast_tracepoint_insn_len () override;
+ struct emit_ops *emit_ops () override;
+
protected:
void low_arch_setup () override;
@@ -3092,10 +3094,10 @@ static struct emit_ops aarch64_emit_ops_impl =
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;
}
@@ -3164,7 +3166,6 @@ aarch64_supports_hardware_single_step (void)
struct linux_target_ops the_low_target =
{
- aarch64_emit_ops,
aarch64_supports_range_stepping,
aarch64_supports_hardware_single_step,
aarch64_get_syscall_trapinfo,
@@ -1119,7 +1119,6 @@ arm_target::get_regs_info ()
}
struct linux_target_ops the_low_target = {
- NULL, /* emit_ops */
NULL, /* supports_range_stepping */
arm_supports_hardware_single_step,
arm_get_syscall_trapinfo,
@@ -165,7 +165,6 @@ bfin_target::get_regs_info ()
}
struct linux_target_ops the_low_target = {
- NULL, /* emit_ops */
NULL, /* supports_range_stepping */
bfin_supports_hardware_single_step,
};
@@ -470,7 +470,6 @@ crisv32_target::get_regs_info ()
}
struct linux_target_ops the_low_target = {
- NULL, /* emit_ops */
NULL, /* supports_range_stepping */
cris_supports_hardware_single_step,
};
@@ -6496,15 +6496,6 @@ linux_process_target::done_accessing_memory ()
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
@@ -131,10 +131,6 @@ struct lwp_info;
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);
@@ -286,8 +282,6 @@ class linux_process_target : public process_stratum_target
void stabilize_threads () override;
- struct emit_ops *emit_ops () override;
-
bool supports_disable_randomization () override;
bool supports_qxfer_libraries_svr4 () override;
@@ -163,7 +163,6 @@ m32r_target::get_regs_info ()
}
struct linux_target_ops the_low_target = {
- NULL, /* emit_ops */
NULL, /* supports_range_stepping */
m32r_supports_hardware_single_step,
};
@@ -259,7 +259,6 @@ m68k_supports_hardware_single_step (void)
}
struct linux_target_ops the_low_target = {
- NULL, /* emit_ops */
NULL, /* supports_range_stepping */
m68k_supports_hardware_single_step,
};
@@ -79,6 +79,8 @@ public:
int get_min_fast_tracepoint_insn_len () override;
+ struct emit_ops *emit_ops () override;
+
protected:
void low_arch_setup () override;
@@ -3381,10 +3383,10 @@ static struct emit_ops ppc64v2_emit_ops_impl =
#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);
@@ -3454,7 +3456,6 @@ ppc_get_ipa_tdesc_idx (void)
}
struct linux_target_ops the_low_target = {
- ppc_emit_ops,
NULL, /* supports_range_stepping */
ppc_supports_hardware_single_step,
NULL, /* get_syscall_trapinfo */
@@ -88,6 +88,8 @@ public:
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;
@@ -2839,10 +2841,10 @@ static struct emit_ops s390x_emit_ops =
};
#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);
@@ -2855,7 +2857,6 @@ s390_emit_ops (void)
}
struct linux_target_ops the_low_target = {
- s390_emit_ops,
NULL, /* supports_range_stepping */
s390_supports_hardware_single_step,
NULL, /* get_syscall_trapinfo */
@@ -194,7 +194,6 @@ sh_target::low_arch_setup ()
}
struct linux_target_ops the_low_target = {
- NULL, /* emit_ops */
NULL, /* supports_range_stepping */
sh_supports_hardware_single_step,
};
@@ -425,7 +425,6 @@ tic6x_target::get_regs_info ()
}
struct linux_target_ops the_low_target = {
- NULL, /* emit_ops */
NULL, /* supports_range_stepping */
tic6x_supports_hardware_single_step,
};
@@ -226,7 +226,6 @@ tile_supports_hardware_single_step (void)
struct linux_target_ops the_low_target =
{
- NULL, /* emit_ops */
NULL, /* supports_range_stepping */
tile_supports_hardware_single_step,
};
@@ -124,6 +124,8 @@ public:
int get_min_fast_tracepoint_insn_len () override;
+ struct emit_ops *emit_ops () override;
+
protected:
void low_arch_setup () override;
@@ -2927,8 +2929,8 @@ struct emit_ops i386_emit_ops =
};
-static struct emit_ops *
-x86_emit_ops (void)
+emit_ops *
+x86_target::emit_ops ()
{
#ifdef __x86_64__
if (is_64bit_tdesc ())
@@ -2983,7 +2985,6 @@ x86_get_ipa_tdesc_idx (void)
struct linux_target_ops the_low_target =
{
- x86_emit_ops,
x86_supports_range_stepping,
x86_supports_hardware_single_step,
x86_get_syscall_trapinfo,
@@ -331,7 +331,6 @@ xtensa_target::get_regs_info ()
}
struct linux_target_ops the_low_target = {
- NULL, /* emit_ops */
NULL, /* supports_range_stepping */
xtensa_supports_hardware_single_step,
};