aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile-debug.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-12-02 12:13:29 -0700
committerTom Tromey <tromey@redhat.com>2013-12-06 08:57:55 -0700
commit37fbcad0beb1a512efb5bc26071df5c12b5408cd (patch)
tree07f352feaeee97e1852aeeae25640bca8d4d8cd2 /gdb/symfile-debug.c
parent16b5a7cbaee2764f3e1be6772dbe1156c28daf1d (diff)
downloadgdb-37fbcad0beb1a512efb5bc26071df5c12b5408cd.zip
gdb-37fbcad0beb1a512efb5bc26071df5c12b5408cd.tar.gz
gdb-37fbcad0beb1a512efb5bc26071df5c12b5408cd.tar.bz2
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 <tromey@redhat.com> * 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) <sym_get_probe_argument_count, can_evaluate_probe_arguments, sym_evaluate_probe_argument, sym_compile_to_ax>: Remove fields.
Diffstat (limited to 'gdb/symfile-debug.c')
-rw-r--r--gdb/symfile-debug.c80
1 files changed, 0 insertions, 80 deletions
diff --git a/gdb/symfile-debug.c b/gdb/symfile-debug.c
index b6e84d1..d0991b8 100644
--- a/gdb/symfile-debug.c
+++ b/gdb/symfile-debug.c
@@ -392,82 +392,6 @@ debug_sym_get_probes (struct objfile *objfile)
return retval;
}
-static unsigned
-debug_sym_get_probe_argument_count (struct probe *probe)
-{
- struct objfile *objfile = probe->objfile;
- const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
- unsigned retval;
-
- retval = debug_data->real_sf->sym_probe_fns->sym_get_probe_argument_count
- (probe);
-
- fprintf_filtered (gdb_stdlog,
- "probes->sym_get_probe_argument_count (%s) = %u\n",
- host_address_to_string (probe), retval);
-
- return retval;
-}
-
-static int
-debug_can_evaluate_probe_arguments (struct probe *probe)
-{
- struct objfile *objfile = probe->objfile;
- const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
- int retval;
-
- retval = debug_data->real_sf->sym_probe_fns->can_evaluate_probe_arguments
- (probe);
-
- fprintf_filtered (gdb_stdlog,
- "probes->can_evaluate_probe_arguments (%s) = %d\n",
- host_address_to_string (probe), retval);
-
- return retval;
-}
-
-static struct value *
-debug_sym_evaluate_probe_argument (struct probe *probe, unsigned n)
-{
- struct objfile *objfile = probe->objfile;
- const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
- struct value *retval;
-
- fprintf_filtered (gdb_stdlog,
- "probes->sym_evaluate_probe_argument (%s, %u)\n",
- host_address_to_string (probe), n);
-
- retval = debug_data->real_sf->sym_probe_fns->sym_evaluate_probe_argument
- (probe, n);
-
- fprintf_filtered (gdb_stdlog,
- "probes->sym_evaluate_probe_argument (...) = %s\n",
- host_address_to_string (retval));
-
- return retval;
-}
-
-static void
-debug_sym_compile_to_ax (struct probe *probe, struct agent_expr *expr,
- struct axs_value *value, unsigned n)
-{
- struct objfile *objfile = probe->objfile;
- const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
-
- fprintf_filtered (gdb_stdlog,
- "probes->sym_compile_to_ax (%s, %s, %s, %u)\n",
- host_address_to_string (probe),
- host_address_to_string (expr),
- host_address_to_string (value), n);
-
- debug_data->real_sf->sym_probe_fns->sym_compile_to_ax
- (probe, expr, value, n);
-}
-
static void
debug_sym_relocate_probe (struct objfile *objfile,
const struct section_offsets *new_offsets,
@@ -489,10 +413,6 @@ debug_sym_relocate_probe (struct objfile *objfile,
static const struct sym_probe_fns debug_sym_probe_fns =
{
debug_sym_get_probes,
- debug_sym_get_probe_argument_count,
- debug_can_evaluate_probe_arguments,
- debug_sym_evaluate_probe_argument,
- debug_sym_compile_to_ax,
debug_sym_relocate_probe
};