+2019-09-02 Alan Hayward <alan.hayward@arm.com>
+
+ * break-catch-throw.c (fetch_probe_arguments): Use gdbarch.
+ * dtrace-probe.c (dtrace_probe::get_argument_count): Likewise.
+ * probe.c (probe_safe_evaluate_at_pc) (compute_probe_arg)
+ (compile_probe_arg): Likewise.
+ * probe.h (get_argument_count): Likewise.
+ * solib-svr4.c (solib_event_probe_action): Likewise.
+ * stap-probe.c (stap_probe::get_argument_count): Likewise.
+
2019-09-02 Alan Hayward <alan.hayward@arm.com>
* solib-svr4.c (svr4_find_and_create_probe_breakpoints): Move
&& pc_probe.prob->get_name () != "rethrow"))
error (_("not stopped at a C++ exception catchpoint"));
- n_args = pc_probe.prob->get_argument_count (frame);
+ n_args = pc_probe.prob->get_argument_count (get_frame_arch (frame));
if (n_args < 2)
error (_("C++ exception catchpoint has too few arguments"));
CORE_ADDR get_relocated_address (struct objfile *objfile) override;
/* See probe.h. */
- unsigned get_argument_count (struct frame_info *frame) override;
+ unsigned get_argument_count (struct gdbarch *gdbarch) override;
/* See probe.h. */
bool can_evaluate_arguments () const override;
/* Implementation of the get_argument_count method. */
unsigned
-dtrace_probe::get_argument_count (struct frame_info *frame)
+dtrace_probe::get_argument_count (struct gdbarch *gdbarch)
{
return m_args.size ();
}
if (!probe.prob)
return NULL;
- n_args = probe.prob->get_argument_count (frame);
+ n_args = probe.prob->get_argument_count (get_frame_arch (frame));
if (n >= n_args)
return NULL;
if (pc_probe.prob == NULL)
error (_("No probe at PC %s"), core_addr_to_string (pc));
- n_args = pc_probe.prob->get_argument_count (frame);
+ n_args = pc_probe.prob->get_argument_count (arch);
if (sel == -1)
return value_from_longest (builtin_type (arch)->builtin_int, n_args);
int sel = (int) (uintptr_t) data;
struct bound_probe pc_probe;
int n_args;
- struct frame_info *frame = get_selected_frame (NULL);
/* SEL == -1 means "_probe_argc". */
gdb_assert (sel >= -1);
if (pc_probe.prob == NULL)
error (_("No probe at PC %s"), core_addr_to_string (pc));
- n_args = pc_probe.prob->get_argument_count (frame);
+ n_args = pc_probe.prob->get_argument_count (expr->gdbarch);
if (sel == -1)
{
/* Return the number of arguments of the probe. This function can
throw an exception. */
- virtual unsigned get_argument_count (struct frame_info *frame) = 0;
+ 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
arg2: struct link_map *new (optional, for incremental updates) */
try
{
- probe_argc = pa->prob->get_argument_count (frame);
+ probe_argc = pa->prob->get_argument_count (get_frame_arch (frame));
}
catch (const gdb_exception_error &ex)
{
CORE_ADDR get_relocated_address (struct objfile *objfile) override;
/* See probe.h. */
- unsigned get_argument_count (struct frame_info *frame) override;
+ unsigned get_argument_count (struct gdbarch *gdbarch) override;
/* See probe.h. */
bool can_evaluate_arguments () const override;
argument string. */
unsigned
-stap_probe::get_argument_count (struct frame_info *frame)
+stap_probe::get_argument_count (struct gdbarch *gdbarch)
{
- struct gdbarch *gdbarch = get_frame_arch (frame);
-
if (!m_have_parsed_args)
{
if (this->can_evaluate_arguments ())