+class skiplist_entry
+{
+public:
+ /* Create a skiplist_entry object and add it to the chain. */
+ static void add_entry (bool file_is_glob,
+ std::string &&file,
+ bool function_is_regexp,
+ std::string &&function);
+
+ /* Return true if the skip entry has a file or glob-style file
+ pattern that matches FUNCTION_SAL. */
+ bool skip_file_p (const symtab_and_line &function_sal) const;
+
+ /* Return true if the skip entry has a function or function regexp
+ that matches FUNCTION_NAME. */
+ bool skip_function_p (const char *function_name) const;
+
+ /* Getters. */
+ int number () const { return m_number; };
+ bool enabled () const { return m_enabled; };
+ bool file_is_glob () const { return m_file_is_glob; }
+ const std::string &file () const { return m_file; }
+ const std::string &function () const { return m_function; }
+ bool function_is_regexp () const { return m_function_is_regexp; }
+
+ /* Setters. */
+ void enable () { m_enabled = true; };
+ void disable () { m_enabled = false; };
+
+ /* Disable copy. */
+ skiplist_entry (const skiplist_entry &) = delete;
+ void operator= (const skiplist_entry &) = delete;
+
+private:
+ /* Key that grants access to the constructor. */
+ struct private_key {};
+public:
+ /* Public so we can construct with container::emplace_back. Since
+ it requires a private class key, it can't be called from outside.
+ Use the add_entry static factory method to construct instead. */
+ skiplist_entry (bool file_is_glob, std::string &&file,
+ bool function_is_regexp, std::string &&function,
+ private_key);
+
+private:
+ /* Return true if we're stopped at a file to be skipped. */
+ bool do_skip_file_p (const symtab_and_line &function_sal) const;
+
+ /* Return true if we're stopped at a globbed file to be skipped. */
+ bool do_skip_gfile_p (const symtab_and_line &function_sal) const;
+
+private: /* data */
+ int m_number = -1;
+
+ /* True if FILE is a glob-style pattern.
+ Otherwise it is the plain file name (possibly with directories). */
+ bool m_file_is_glob;
+
+ /* The name of the file or empty if no name. */
+ std::string m_file;
+
+ /* True if FUNCTION is a regexp.