+/* Return non-zero if we're stopped at a globbed file to be skipped. */
+
+static int
+skip_gfile_p (struct skiplist_entry *e,
+ const struct symtab_and_line *function_sal)
+{
+ gdb_assert (e->file != NULL && e->file_is_glob);
+
+ if (function_sal->symtab == NULL)
+ return 0;
+
+ /* Check first sole SYMTAB->FILENAME. It may not be a substring of
+ symtab_to_fullname as it may contain "./" etc. */
+ if (gdb_filename_fnmatch (e->file, function_sal->symtab->filename,
+ FNM_FILE_NAME | FNM_NOESCAPE) == 0)
+ return 1;
+
+ /* Before we invoke symtab_to_fullname, which is expensive, do a quick
+ comparison of the basenames.
+ Note that we assume that lbasename works with glob-style patterns.
+ If the basename of the glob pattern is something like "*.c" then this
+ isn't much of a win. Oh well. */
+ if (!basenames_may_differ
+ && gdb_filename_fnmatch (lbasename (e->file),
+ lbasename (function_sal->symtab->filename),
+ FNM_FILE_NAME | FNM_NOESCAPE) != 0)
+ return 0;
+
+ /* Note: symtab_to_fullname caches its result, thus we don't have to. */
+ {
+ const char *fullname = symtab_to_fullname (function_sal->symtab);
+
+ if (compare_glob_filenames_for_search (fullname, e->file))
+ return 1;
+ }
+
+ return 0;
+}
+
+/* Return non-zero if we're stopped at a function to be skipped. */
+
+static int
+skip_function_p (struct skiplist_entry *e, const char *function_name)
+{
+ gdb_assert (e->function != NULL && !e->function_is_regexp);
+ return strcmp_iw (function_name, e->function) == 0;
+}
+
+/* Return non-zero if we're stopped at a function regexp to be skipped. */
+
+static int
+skip_rfunction_p (struct skiplist_entry *e, const char *function_name)
+{
+ gdb_assert (e->function != NULL && e->function_is_regexp
+ && e->compiled_function_regexp_is_valid);
+ return (regexec (&e->compiled_function_regexp, function_name, 0, NULL, 0)
+ == 0);
+}
+
+/* See skip.h. */
+
+int
+function_name_is_marked_for_skip (const char *function_name,
+ const struct symtab_and_line *function_sal)