+2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
+
+ Remove the 'get_ipa_tdesc_idx' linux target op and let a concrete
+ linux target define the op by overriding the declaration in
+ process_stratum_target.
+
+ * linux-low.h (struct linux_target_ops): Remove the op.
+ (class linux_process_target) <get_ipa_tdesc_idx>: Remove.
+ * linux-low.cc (linux_process_target::get_ipa_tdesc_idx): Remove.
+ * linux-x86-low.cc (class x86_target) <get_ipa_tdesc_idx>: Declare.
+ (x86_get_ipa_tdesc_idx): Turn into...
+ (x86_target::get_ipa_tdesc_idx): ...this.
+ (the_low_target): Remove the op field.
+ * linux-ppc-low.cc (class ppc_target) <get_ipa_tdesc_idx>: Declare.
+ (ppc_get_ipa_tdesc_idx): Turn into...
+ (ppc_target::get_ipa_tdesc_idx): ...this.
+ (the_low_target): Remove the op field.
+ * linux-s390-low.cc (class s390_target) <get_ipa_tdesc_idx>: Declare.
+ (s390_get_ipa_tdesc_idx): Turn into...
+ (s390_target::get_ipa_tdesc_idx): ...this.
+ (the_low_target): Remove the op field.
+
2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Turn the 'get_syscall_trapinfo' linux target op into a method
return false;
}
-int
-linux_process_target::get_ipa_tdesc_idx ()
-{
- if (the_low_target.get_ipa_tdesc_idx == NULL)
- return 0;
-
- return (*the_low_target.get_ipa_tdesc_idx) ();
-}
-
CORE_ADDR
linux_process_target::read_pc (regcache *regcache)
{
struct linux_target_ops
{
- /* See target.h. */
- int (*get_ipa_tdesc_idx) (void);
};
extern struct linux_target_ops the_low_target;
bool supports_catch_syscall () override;
- int get_ipa_tdesc_idx () override;
-
/* Return the information to access registers. This has public
visibility because proc-service uses it. */
virtual const regs_info *get_regs_info () = 0;
struct emit_ops *emit_ops () override;
+ int get_ipa_tdesc_idx () override;
+
protected:
void low_arch_setup () override;
return &ppc_emit_ops_impl;
}
-/* Implementation of linux_target_ops method "get_ipa_tdesc_idx". */
+/* Implementation of target ops method "get_ipa_tdesc_idx". */
-static int
-ppc_get_ipa_tdesc_idx (void)
+int
+ppc_target::get_ipa_tdesc_idx ()
{
struct regcache *regcache = get_thread_regcache (current_thread, 0);
const struct target_desc *tdesc = regcache->tdesc;
}
struct linux_target_ops the_low_target = {
- ppc_get_ipa_tdesc_idx,
};
/* The linux target ops object. */
struct emit_ops *emit_ops () override;
+ int get_ipa_tdesc_idx () override;
+
protected:
void low_arch_setup () override;
return 6;
}
-/* Implementation of linux_target_ops method "get_ipa_tdesc_idx". */
+/* Implementation of target ops method "get_ipa_tdesc_idx". */
-static int
-s390_get_ipa_tdesc_idx (void)
+int
+s390_target::get_ipa_tdesc_idx ()
{
struct regcache *regcache = get_thread_regcache (current_thread, 0);
const struct target_desc *tdesc = regcache->tdesc;
}
struct linux_target_ops the_low_target = {
- s390_get_ipa_tdesc_idx,
};
/* The linux target ops object. */
struct emit_ops *emit_ops () override;
+ int get_ipa_tdesc_idx () override;
+
protected:
void low_arch_setup () override;
return true;
}
-static int
-x86_get_ipa_tdesc_idx (void)
+int
+x86_target::get_ipa_tdesc_idx ()
{
struct regcache *regcache = get_thread_regcache (current_thread, 0);
const struct target_desc *tdesc = regcache->tdesc;
struct linux_target_ops the_low_target =
{
- x86_get_ipa_tdesc_idx,
};
/* The linux target ops object. */