diff options
Diffstat (limited to 'gdb/source-cache.h')
-rw-r--r-- | gdb/source-cache.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/gdb/source-cache.h b/gdb/source-cache.h index d4cb7d0..5b3b922 100644 --- a/gdb/source-cache.h +++ b/gdb/source-cache.h @@ -1,5 +1,5 @@ /* Cache of styled source file text - Copyright (C) 2018-2024 Free Software Foundation, Inc. + Copyright (C) 2018-2025 Free Software Foundation, Inc. This file is part of GDB. @@ -16,11 +16,11 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef SOURCE_CACHE_H -#define SOURCE_CACHE_H +#ifndef GDB_SOURCE_CACHE_H +#define GDB_SOURCE_CACHE_H -#include <unordered_map> -#include <unordered_set> +#include "gdbsupport/unordered_map.h" +#include "gdbsupport/unordered_set.h" /* This caches two things related to source files. @@ -78,6 +78,8 @@ private: std::string fullname; /* The contents of the file. */ std::string contents; + /* True if CONTENTS are styled. Otherwise, false. */ + bool styled; }; /* A helper function for get_source_lines reads a source file. @@ -95,13 +97,13 @@ private: /* The file offset cache. The key is the full name of the source file. */ - std::unordered_map<std::string, std::vector<off_t>> m_offset_cache; + gdb::unordered_map<std::string, std::vector<off_t>> m_offset_cache; /* The list of files where styling failed. */ - std::unordered_set<std::string> m_no_styling_files; + gdb::unordered_set<std::string> m_no_styling_files; }; /* The global source cache. */ extern source_cache g_source_cache; -#endif /* SOURCE_CACHE_H */ +#endif /* GDB_SOURCE_CACHE_H */ |