This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFC] fix probe-related internal error on AIX
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tromey at redhat dot com>
- Date: Thu, 6 Mar 2014 10:02:15 -0700
- Subject: [RFC] fix probe-related internal error on AIX
- Authentication-results: sourceware.org; auth=none
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.
2014-03-06 Tom Tromey <tromey@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.
---
gdb/ChangeLog | 6 ++++++
gdb/break-catch-throw.c | 5 +++--
gdb/probe.c | 3 ++-
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/gdb/break-catch-throw.c b/gdb/break-catch-throw.c
index 7283490..adfe777 100644
--- a/gdb/break-catch-throw.c
+++ b/gdb/break-catch-throw.c
@@ -227,8 +227,9 @@ re_set_exception_catchpoint (struct breakpoint *self)
}
}
/* NOT_FOUND_ERROR just means the breakpoint will be pending, so
- let it through. */
- if (e.reason < 0 && e.error != NOT_FOUND_ERROR)
+ let it through. We also keep going if probe-parsing failed,
+ as this means that probes aren't supported here. */
+ if (e.reason < 0 && e.error != NOT_FOUND_ERROR && pass != 0)
throw_exception (e);
}
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);
--
1.8.1.4