- struct ada_exc_info *to_sort
- = VEC_address (ada_exc_info, *exceptions) + skip;
- int to_sort_len
- = VEC_length (ada_exc_info, *exceptions) - skip;
- int i, j;
-
- qsort (to_sort, to_sort_len, sizeof (struct ada_exc_info),
- compare_ada_exception_info);
-
- for (i = 1, j = 1; i < to_sort_len; i++)
- if (compare_ada_exception_info (&to_sort[i], &to_sort[j - 1]) != 0)
- to_sort[j++] = to_sort[i];
- to_sort_len = j;
- VEC_truncate(ada_exc_info, *exceptions, skip + to_sort_len);
-}
-
-/* A function intended as the "name_matcher" callback in the struct
- quick_symbol_functions' expand_symtabs_matching method.
-
- SEARCH_NAME is the symbol's search name.
-
- If USER_DATA is not NULL, it is a pointer to a regext_t object
- used to match the symbol (by natural name). Otherwise, when USER_DATA
- is null, no filtering is performed, and all symbols are a positive
- match. */
-
-static int
-ada_exc_search_name_matches (const char *search_name, void *user_data)
-{
- regex_t *preg = (regex_t *) user_data;
-
- if (preg == NULL)
- return 1;
-
- /* In Ada, the symbol "search name" is a linkage name, whereas
- the regular expression used to do the matching refers to
- the natural name. So match against the decoded name. */
- return (regexec (preg, ada_decode (search_name), 0, NULL, 0) == 0);