aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib-svr4.c
diff options
context:
space:
mode:
authorSergio Durigan Junior <sergiodj@redhat.com>2013-07-24 19:50:32 +0000
committerSergio Durigan Junior <sergiodj@redhat.com>2013-07-24 19:50:32 +0000
commit25f9533e5145c7d1f41649536b710e12f3a1fcd9 (patch)
tree39c61fb54a54ee205ffe3d5f5fac735959a57535 /gdb/solib-svr4.c
parentdf71cb5cbfa26ad79e5cf674056205f0505e229d (diff)
downloadgdb-25f9533e5145c7d1f41649536b710e12f3a1fcd9.zip
gdb-25f9533e5145c7d1f41649536b710e12f3a1fcd9.tar.gz
gdb-25f9533e5145c7d1f41649536b710e12f3a1fcd9.tar.bz2
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.
Diffstat (limited to 'gdb/solib-svr4.c')
-rw-r--r--gdb/solib-svr4.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index ccfd158..a497c6c 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -1978,12 +1978,14 @@ svr4_create_solib_event_breakpoints (struct gdbarch *gdbarch,
{
VEC (probe_p) *probes[NUM_PROBES];
int all_probes_found = 1;
+ int checked_can_use_probe_arguments = 0;
int i;
memset (probes, 0, sizeof (probes));
for (i = 0; i < NUM_PROBES; i++)
{
const char *name = probe_info[i].name;
+ struct probe *p;
char buf[32];
/* Fedora 17 and Red Hat Enterprise Linux 6.2-6.4
@@ -2012,6 +2014,18 @@ svr4_create_solib_event_breakpoints (struct gdbarch *gdbarch,
all_probes_found = 0;
break;
}
+
+ /* Ensure probe arguments can be evaluated. */
+ if (!checked_can_use_probe_arguments)
+ {
+ p = VEC_index (probe_p, probes[i], 0);
+ if (!can_evaluate_probe_arguments (p))
+ {
+ all_probes_found = 0;
+ break;
+ }
+ checked_can_use_probe_arguments = 1;
+ }
}
if (all_probes_found)