aboutsummaryrefslogtreecommitdiff
path: root/gdb/probe.h
diff options
context:
space:
mode:
authorSergio Durigan Junior <sergiodj@redhat.com>2012-07-18 16:12:17 +0000
committerSergio Durigan Junior <sergiodj@redhat.com>2012-07-18 16:12:17 +0000
commit6bac74738704531ac5da95ed65795d8b8b89e200 (patch)
tree86808ea0da1308a16c69329a912867f6887507cc /gdb/probe.h
parent3347eb1acf1a59339d00749fafbb901be9325cd4 (diff)
downloadgdb-6bac74738704531ac5da95ed65795d8b8b89e200.zip
gdb-6bac74738704531ac5da95ed65795d8b8b89e200.tar.gz
gdb-6bac74738704531ac5da95ed65795d8b8b89e200.tar.bz2
2012-07-18 Sergio Durigan Junior <sergiodj@redhat.com>
* elfread.c (elf_get_probe_argument_count): Remove `objfile' argument. (elf_compile_to_ax): Likewise. * infrun.c (insert_exception_resume_from_probe): Likewise. (check_exception_resume): Remove `objfile' variable. * probe.c (find_probe_by_pc): Remove `objfile' argument. (struct probe_and_objfile, probe_and_objfile_s): Delete. (collect_probes): Adjust return value to `VEC (probe_p) *'. (compare_entries): Rename to... (compare_probes): ...this. Adjust function to work with `struct probe *'. Rename variables `ea' and `eb' to `pa' and `pb' respectively. (gen_ui_out_table_header_info): Adjust `probes' argument to be `VEC (probe_p) *'. (print_ui_out_info): Adjust argument to be `struct probe *'. (info_probes_for_ops): Adjust internal computations to use `VEC (probe_p) *'. (probe_safe_evaluate_at_pc): Refactor to not pass `objfile' anymore. * probe.h (struct probe_ops) <get_probe_argument_count, compile_to_ax, gen_info_probes_table_values>: Remove `objfile' argument. (struct probe) <objfile>: New field. (find_probe_by_pc): Remove `objfile' argument. * stap-probe.c (stap_parse_probe_arguments): Likewise. (stap_get_probe_argument_count): Likewise. (stap_get_arg): Likewise. (stap_evaluate_probe_argument): Likewise. (stap_compile_to_ax): Likewise. (compile_probe_arg): Refactor not to pass `objfile' anymore. (handle_stap_probe): Fill `objfile' field from `struct probe'. (stap_gen_info_probes_table_header): Remove `objfile' argument. * symfile.h (struct sym_probe_fns) <sym_evaluate_probe_argument, sym_compile_to_ax>: Likewise.
Diffstat (limited to 'gdb/probe.h')
-rw-r--r--gdb/probe.h23
1 files changed, 11 insertions, 12 deletions
diff --git a/gdb/probe.h b/gdb/probe.h
index 8d44ca2..7c892eb 100644
--- a/gdb/probe.h
+++ b/gdb/probe.h
@@ -66,21 +66,18 @@ struct probe_ops
/* Return the number of arguments of PROBE. */
- unsigned (*get_probe_argument_count) (struct probe *probe,
- struct objfile *objfile);
+ unsigned (*get_probe_argument_count) (struct probe *probe);
/* Evaluate the Nth argument from the PROBE, returning a value
corresponding to it. The argument number is represented N. */
struct value *(*evaluate_probe_argument) (struct probe *probe,
- struct objfile *objfile,
unsigned n);
/* Compile the Nth argument of the PROBE to an agent expression.
The argument number is represented by N. */
- void (*compile_to_ax) (struct probe *probe, struct objfile *objfile,
- struct agent_expr *aexpr,
+ void (*compile_to_ax) (struct probe *probe, struct agent_expr *aexpr,
struct axs_value *axs_value, unsigned n);
/* Set the semaphore associated with the PROBE. This function only makes
@@ -108,8 +105,8 @@ struct probe_ops
void (*gen_info_probes_table_header) (VEC (info_probe_column_s) **heads);
/* Function that will fill VALUES with the values of the extra fields
- to be printed for PROBE and OBJFILE. If the backend implements
- the `gen_ui_out_table_header' method, then it should implement
+ to be printed for PROBE. If the backend implements the
+ `gen_ui_out_table_header' method, then it should implement
this method as well. The backend should also guarantee that the
order and the number of values in the vector is exactly the same
as the order of the extra fields provided in the method
@@ -118,7 +115,6 @@ struct probe_ops
position in the vector. */
void (*gen_info_probes_table_values) (struct probe *probe,
- struct objfile *objfile,
VEC (const_char_ptr) **values);
};
@@ -157,6 +153,11 @@ struct probe
/* The operations associated with this probe. */
const struct probe_ops *pops;
+ /* The objfile which contains this probe. Even if the probe is also
+ present in a separate debug objfile, this variable always points to
+ the non-separate debug objfile. */
+ struct objfile *objfile;
+
/* The name of the probe. */
const char *name;
@@ -181,11 +182,9 @@ extern struct symtabs_and_lines parse_probes (char **argptr,
extern void register_probe_ops (struct probe *probe);
/* Given a PC, find an associated probe with type PTYPE. If a probe is
- found, set *OBJFILE_OUT to the probe's objfile, and return the
- probe. If no probe is found, return NULL. */
+ found, return it. If no probe is found, return NULL. */
-extern struct probe *find_probe_by_pc (CORE_ADDR pc,
- struct objfile **objfile_out);
+extern struct probe *find_probe_by_pc (CORE_ADDR pc);
/* Search OBJFILE for a probe with the given PROVIDER, NAME and PTYPE.
Return a VEC of all probes that were found. If no matching probe