-/* Return specific PROBE_OPS * matching *LINESPECP and possibly updating
- *LINESPECP to skip its "-probe-type " prefix. Return &probe_ops_any if
- *LINESPECP matches "-probe ", that is any unspecific probe. Return NULL if
- *LINESPECP is not identified as any known probe type, *LINESPECP is not
- modified in such case. */
-
-extern const struct probe_ops *probe_linespec_to_ops (const char **linespecp);
-
-/* The probe itself. The struct contains generic information about the
- probe, and then some specific information which should be stored in
- the `probe_info' field. */
-
-struct probe
+/* Return specific STATIC_PROBE_OPS * matching *LINESPECP and possibly
+ updating LINESPECP to skip its "-probe-type " prefix. Return
+ &static_probe_ops_any if LINESPECP matches "-probe ", that is any
+ unspecific probe. Return NULL if LINESPECP is not identified as
+ any known probe type, *LINESPECP is not modified in such case. */
+
+extern const static_probe_ops *
+ probe_linespec_to_static_ops (const char **linespecp);
+
+/* The probe itself. The class contains generic information about the
+ probe. */
+
+class probe
+{
+public:
+ /* Default constructor for a probe. */
+ probe (std::string &&name_, std::string &&provider_, CORE_ADDR address_,
+ struct gdbarch *arch_)
+ : m_name (std::move (name_)), m_provider (std::move (provider_)),
+ m_address (address_), m_arch (arch_)
+ {}
+
+ /* Virtual destructor. */
+ virtual ~probe ()
+ {}
+
+ /* Compute the probe's relocated address. OBJFILE is the objfile
+ in which the probe originated. */
+ virtual CORE_ADDR get_relocated_address (struct objfile *objfile) = 0;
+
+ /* Return the number of arguments of the probe. This function can
+ throw an exception. */
+ virtual unsigned get_argument_count (struct gdbarch *gdbarch) = 0;
+
+ /* Return 1 if the probe interface can evaluate the arguments of
+ probe, zero otherwise. See the comments on
+ sym_probe_fns:can_evaluate_probe_arguments for more
+ details. */
+ virtual bool can_evaluate_arguments () const = 0;
+
+ /* Evaluate the Nth argument from the probe, returning a value
+ corresponding to it. The argument number is represented N.
+ This function can throw an exception. */
+ virtual struct value *evaluate_argument (unsigned n,
+ struct frame_info *frame) = 0;
+
+ /* Compile the Nth argument of the probe to an agent expression.
+ The argument number is represented by N. */
+ virtual void compile_to_ax (struct agent_expr *aexpr,
+ struct axs_value *axs_value,
+ unsigned n) = 0;
+
+ /* Set the semaphore associated with the probe. This function only
+ makes sense if the probe has a concept of semaphore associated to
+ a probe. */
+ virtual void set_semaphore (struct objfile *objfile,
+ struct gdbarch *gdbarch)
+ {}
+
+ /* Clear the semaphore associated with the probe. This function
+ only makes sense if the probe has a concept of semaphore
+ associated to a probe. */
+ virtual void clear_semaphore (struct objfile *objfile,
+ struct gdbarch *gdbarch)
+ {}
+
+ /* Return the pointer to the static_probe_ops instance related to
+ the probe type. */
+ virtual const static_probe_ops *get_static_ops () const = 0;
+
+ /* Function that will fill VALUES with the values of the extra
+ fields to be printed for the probe.
+
+ If the backend implements the `gen_ui_out_table_header' method,
+ then it should implement this method as well. The backend should
+ also guarantee that the order and the number of values in the
+ vector is exactly the same as the order of the extra fields
+ provided in the method `gen_ui_out_table_header'. If a certain
+ field is to be skipped when printing the information, you can
+ push a NULL value in that position in the vector. */
+ virtual std::vector<const char *> gen_info_probes_table_values () const