gdbserver: turn target op 'supports_disable_randomization' into a method
[deliverable/binutils-gdb.git] / gdbserver / target.h
index 21f22a4d0dbeb683eaf4726d88c0dd732297e9fc..04c842d83bc820413bd6d10ccb335885012b5dbc 100644 (file)
@@ -70,13 +70,6 @@ class process_target;
    shared code.  */
 struct process_stratum_target
 {
-  /* 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 target supports disabling randomization.  */
-  int (*supports_disable_randomization) (void);
-
   /* Read solib info on SVR4 platforms.  */
   int (*qxfer_libraries_svr4) (const char *annex, unsigned char *readbuf,
                               unsigned const char *writebuf,
@@ -493,6 +486,13 @@ public:
   /* Return the minimum length of an instruction that can be safely
      overwritten for use as a fast tracepoint.  */
   virtual int get_min_fast_tracepoint_insn_len ();
+
+  /* Return the bytecode operations vector for the current inferior.
+     Returns nullptr if bytecode compilation is not supported.  */
+  virtual struct emit_ops *emit_ops ();
+
+  /* Returns true if the target supports disabling randomization.  */
+  virtual bool supports_disable_randomization ();
 };
 
 extern process_stratum_target *the_target;
@@ -597,11 +597,10 @@ int kill_inferior (process_info *proc);
                                                    err)
 
 #define target_emit_ops() \
-  (the_target->emit_ops ? (*the_target->emit_ops) () : NULL)
+  the_target->pt->emit_ops ()
 
 #define target_supports_disable_randomization() \
-  (the_target->supports_disable_randomization ? \
-   (*the_target->supports_disable_randomization) () : 0)
+  the_target->pt->supports_disable_randomization ()
 
 #define target_supports_agent() \
   (the_target->supports_agent ? \
This page took 0.025149 seconds and 4 git commands to generate.