2013-07-24 Sergio Durigan Junior <sergiodj@redhat.com>
* breakpoint.c (create_longjmp_master_breakpoint): Check if probe interface can evaluate arguments. Fallback to the old mode if it cannot. (create_exception_master_breakpoint): Likewise. * elfread.c (elf_can_evaluate_probe_arguments): New function. (struct sym_probe_fns elf_probe_fns): Export function above to the probe interface. * probe.c (can_evaluate_probe_arguments): New function. * probe.h (struct probe_ops) <can_evaluate_probe_arguments>: New function pointer. (can_evaluate_probe_arguments): New function prototype. * solib-svr4.c (svr4_create_solib_event_breakpoints): Check if probe interface can evaluate arguments. Fallback to the old mode if it cannot. * stap-probe.c (stap_get_probe_argument_count): Check if probe interface can evaluate arguments. Warning the user if it cannot. (stap_can_evaluate_probe_arguments): New function. (struct probe_ops stap_probe_ops): Export function above to the probe interface. * symfile.h (struct sym_probe_fns) <can_evaluate_probe_arguments>: New function pointer.
This commit is contained in:
parent
df71cb5cbf
commit
25f9533e51
8 changed files with 161 additions and 10 deletions
|
@ -1643,6 +1643,15 @@ elf_get_probe_argument_count (struct probe *probe)
|
|||
return probe->pops->get_probe_argument_count (probe);
|
||||
}
|
||||
|
||||
/* Implementation of `sym_can_evaluate_probe_arguments', as documented in
|
||||
symfile.h. */
|
||||
|
||||
static int
|
||||
elf_can_evaluate_probe_arguments (struct probe *probe)
|
||||
{
|
||||
return probe->pops->can_evaluate_probe_arguments (probe);
|
||||
}
|
||||
|
||||
/* Implementation of `sym_evaluate_probe_argument', as documented in
|
||||
symfile.h. */
|
||||
|
||||
|
@ -1700,11 +1709,12 @@ probe_key_free (struct objfile *objfile, void *d)
|
|||
|
||||
static const struct sym_probe_fns elf_probe_fns =
|
||||
{
|
||||
elf_get_probes, /* sym_get_probes */
|
||||
elf_get_probe_argument_count, /* sym_get_probe_argument_count */
|
||||
elf_evaluate_probe_argument, /* sym_evaluate_probe_argument */
|
||||
elf_compile_to_ax, /* sym_compile_to_ax */
|
||||
elf_symfile_relocate_probe, /* sym_relocate_probe */
|
||||
elf_get_probes, /* sym_get_probes */
|
||||
elf_get_probe_argument_count, /* sym_get_probe_argument_count */
|
||||
elf_can_evaluate_probe_arguments, /* sym_can_evaluate_probe_arguments */
|
||||
elf_evaluate_probe_argument, /* sym_evaluate_probe_argument */
|
||||
elf_compile_to_ax, /* sym_compile_to_ax */
|
||||
elf_symfile_relocate_probe, /* sym_relocate_probe */
|
||||
};
|
||||
|
||||
/* Register that we are able to handle ELF object file formats. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue