/* Generic static probe support for GDB.
- Copyright (C) 2012-2013 Free Software Foundation, Inc.
+ Copyright (C) 2012-2014 Free Software Foundation, Inc.
This file is part of GDB.
/* See comments in probe.h. */
unsigned
-get_probe_argument_count (struct probe *probe)
+get_probe_argument_count (struct probe *probe, struct frame_info *frame)
{
- const struct sym_probe_fns *probe_fns;
-
- gdb_assert (probe->objfile != NULL);
- gdb_assert (probe->objfile->sf != NULL);
-
- probe_fns = probe->objfile->sf->sym_probe_fns;
-
- gdb_assert (probe_fns != NULL);
-
- return probe_fns->sym_get_probe_argument_count (probe);
+ return probe->pops->get_probe_argument_count (probe, frame);
}
/* See comments in probe.h. */
int
can_evaluate_probe_arguments (struct probe *probe)
{
- const struct sym_probe_fns *probe_fns;
-
- gdb_assert (probe->objfile != NULL);
- gdb_assert (probe->objfile->sf != NULL);
-
- probe_fns = probe->objfile->sf->sym_probe_fns;
-
- gdb_assert (probe_fns != NULL);
-
- return probe_fns->can_evaluate_probe_arguments (probe);
+ return probe->pops->can_evaluate_probe_arguments (probe);
}
/* See comments in probe.h. */
struct value *
-evaluate_probe_argument (struct probe *probe, unsigned n)
+evaluate_probe_argument (struct probe *probe, unsigned n,
+ struct frame_info *frame)
{
- const struct sym_probe_fns *probe_fns;
-
- gdb_assert (probe->objfile != NULL);
- gdb_assert (probe->objfile->sf != NULL);
-
- probe_fns = probe->objfile->sf->sym_probe_fns;
-
- gdb_assert (probe_fns != NULL);
-
- return probe_fns->sym_evaluate_probe_argument (probe, n);
+ return probe->pops->evaluate_probe_argument (probe, n, frame);
}
/* See comments in probe.h. */
if (!probe)
return NULL;
- n_args = get_probe_argument_count (probe);
+ n_args = get_probe_argument_count (probe, frame);
if (n >= n_args)
return NULL;
- return evaluate_probe_argument (probe, n);
+ return evaluate_probe_argument (probe, n, frame);
}
/* See comment in probe.h. */