gdb_assert (probe_generic->pops == &stap_probe_ops);
if (!probe->args_parsed)
- stap_parse_probe_arguments (probe);
+ {
+ if (probe_generic->pops->can_evaluate_probe_arguments (probe_generic))
+ stap_parse_probe_arguments (probe);
+ else
+ {
+ static int have_warned_stap_incomplete = 0;
+
+ if (!have_warned_stap_incomplete)
+ {
+ warning (_(
+"The SystemTap SDT probe support is not fully implemented on this target;\n"
+"you will not be able to inspect the arguments of the probes.\n"
+"Please report a bug against GDB requesting a port to this target."));
+ have_warned_stap_incomplete = 1;
+ }
+
+ /* Marking the arguments as "already parsed". */
+ probe->args_u.vec = NULL;
+ probe->args_parsed = 1;
+ }
+ }
gdb_assert (probe->args_parsed);
return VEC_length (stap_probe_arg_s, probe->args_u.vec);
return VEC_index (stap_probe_arg_s, probe->args_u.vec, n);
}
+/* Implement the `can_evaluate_probe_arguments' method of probe_ops. */
+
+static int
+stap_can_evaluate_probe_arguments (struct probe *probe_generic)
+{
+ struct stap_probe *stap_probe = (struct stap_probe *) probe_generic;
+ struct gdbarch *gdbarch = stap_probe->p.objfile->gdbarch;
+
+ /* For SystemTap probes, we have to guarantee that the method
+ stap_is_single_operand is defined on gdbarch. If it is not, then it
+ means that argument evaluation is not implemented on this target. */
+ return gdbarch_stap_is_single_operand_p (gdbarch);
+}
+
/* Evaluate the probe's argument N (indexed from 0), returning a value
corresponding to it. Assertion is thrown if N does not exist. */
stap_get_probes,
stap_relocate,
stap_get_probe_argument_count,
+ stap_can_evaluate_probe_arguments,
stap_evaluate_probe_argument,
stap_compile_to_ax,
stap_set_semaphore,