From 37fbcad0beb1a512efb5bc26071df5c12b5408cd Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 2 Dec 2013 12:13:29 -0700 Subject: remove some sym_probe_fns methods While looking into the probe API, it seemed to me that there were a number of methods in sym_probe_fns that were not needed. This patch removes them. Specifically, it seems to me that sym_probe_fns ought to be concerned with the API for constructing the probes. Any method relating to some aspect of an individual probe can be handled via the probe's own vtable. That is, the double indirection here doesn't seem useful -- it certainly isn't in fact used, but also I couldn't think of a potential use. 2013-12-06 Tom Tromey * break-catch-throw.c (fetch_probe_arguments): Use get_probe_argument_count and evaluate_probe_argument. * elfread.c (elf_get_probe_argument_count) (elf_can_evaluate_probe_arguments, elf_evaluate_probe_argument) (elf_compile_to_ax): Remove. (elf_probe_fns): Update. * probe.c (get_probe_argument_count, can_evaluate_probe_arguments) (evaluate_probe_argument): Call method on probe, not via sym functions. * stap-probe.c (compute_probe_arg): Use get_probe_argument_count, evaluate_probe_argument. (compile_probe_arg): Use get_probe_argument_count. Call method on probe, not via sym functions. * symfile-debug.c (debug_sym_get_probe_argument_count) (debug_can_evaluate_probe_arguments) (debug_sym_evaluate_probe_argument, debug_sym_compile_to_ax): Remove. (debug_sym_probe_fns): Remove. * symfile.h (struct sym_probe_fns) : Remove fields. --- gdb/break-catch-throw.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'gdb/break-catch-throw.c') diff --git a/gdb/break-catch-throw.c b/gdb/break-catch-throw.c index fb24725..76087d3 100644 --- a/gdb/break-catch-throw.c +++ b/gdb/break-catch-throw.c @@ -118,18 +118,13 @@ fetch_probe_arguments (struct value **arg0, struct value **arg1) && strcmp (pc_probe->name, "rethrow") != 0)) error (_("not stopped at a C++ exception catchpoint")); - gdb_assert (pc_probe->objfile != NULL); - gdb_assert (pc_probe->objfile->sf != NULL); - gdb_assert (pc_probe->objfile->sf->sym_probe_fns != NULL); - - pc_probe_fns = pc_probe->objfile->sf->sym_probe_fns; - n_args = pc_probe_fns->sym_get_probe_argument_count (pc_probe); + n_args = get_probe_argument_count (pc_probe); if (n_args < 2) error (_("C++ exception catchpoint has too few arguments")); if (arg0 != NULL) - *arg0 = pc_probe_fns->sym_evaluate_probe_argument (pc_probe, 0); - *arg1 = pc_probe_fns->sym_evaluate_probe_argument (pc_probe, 1); + *arg0 = evaluate_probe_argument (pc_probe, 0); + *arg1 = evaluate_probe_argument (pc_probe, 1); if ((arg0 != NULL && *arg0 == NULL) || *arg1 == NULL) error (_("error computing probe argument at c++ exception catchpoint")); -- cgit v1.1