-/* A utility structure. A VEC of these is built when handling "info
- probes". */
-
-struct probe_and_objfile
-{
- /* The probe. */
- struct probe *probe;
-
- /* The probe's objfile. */
- struct objfile *objfile;
-};
-
-typedef struct probe_and_objfile probe_and_objfile_s;
-DEF_VEC_O (probe_and_objfile_s);
-
-/* A helper function for collect_probes that compiles a regexp and
- throws an exception on error. This installs a cleanup to free the
- resulting pattern on success. If RX is NULL, this does nothing. */
-
-static void
-compile_rx_or_error (regex_t *pattern, const char *rx, const char *message)
-{
- int code;
-
- if (!rx)
- return;
-
- code = regcomp (pattern, rx, REG_NOSUB);
- if (code == 0)
- make_regfree_cleanup (pattern);
- else
- {
- char *err = get_regcomp_error (code, pattern);
-
- make_cleanup (xfree, err);
- error ("%s: %s", message, err);
- }
-}
-