aboutsummaryrefslogtreecommitdiff
path: root/gdb/probe.c
diff options
context:
space:
mode:
authorSergio Durigan Junior <sergiodj@redhat.com>2014-03-20 18:08:31 -0300
committerSergio Durigan Junior <sergiodj@redhat.com>2014-03-20 18:08:31 -0300
commit1bff71c3251e2f0836163e49ecd4b55861f4eb83 (patch)
tree7a0a04971a1ae522c022c83795f986dbcc0a69d2 /gdb/probe.c
parent90e289504f844c162ab2e701f99a309d2b37a62a (diff)
downloadgdb-1bff71c3251e2f0836163e49ecd4b55861f4eb83.zip
gdb-1bff71c3251e2f0836163e49ecd4b55861f4eb83.tar.gz
gdb-1bff71c3251e2f0836163e49ecd4b55861f4eb83.tar.bz2
Fix probe-related internal error on AIX
-- Initial message by Tom Tromey: While testing on AIX, I happened to notice an internal error coming from parse_probes. This happens because there are no probes defined on this platform. This patch fixes the problem by changing an assert into an ordinary error, and then changing the relevant caller to cope. This fixes a few tests on AIX; also regtested on x86-64 Fedora 18. -- Followup by Sergio Durigan Junior: By reading the patch (and the original code), I found it a little bit obscure, so I took the liberty to try to improve it. Here's the patch. Could you please take a look and see if it works on AIX (and also if you like the approach)? gdb/ 2014-03-20 Tom Tromey <tromey@redhat.com> Sergio Durigan Junior <sergiodj@redhat.com> * probe.c (parse_probes): Turn assert into an ordinary error. * break-catch-throw.c (re_set_exception_catchpoint): Ignore exceptions when parsing probes. Rearrange the code for clarity.
Diffstat (limited to 'gdb/probe.c')
-rw-r--r--gdb/probe.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/probe.c b/gdb/probe.c
index 623f65c..838d9f9 100644
--- a/gdb/probe.c
+++ b/gdb/probe.c
@@ -59,7 +59,8 @@ parse_probes (char **argptr, struct linespec_result *canonical)
cs = *argptr;
probe_ops = probe_linespec_to_ops (&cs);
- gdb_assert (probe_ops != NULL);
+ if (probe_ops == NULL)
+ error (_("'%s' is not a probe linespec"), arg_start);
arg = (char *) cs;
arg = skip_spaces (arg);