aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2025-03-24 15:03:04 -0600
committerTom Tromey <tom@tromey.com>2025-04-01 07:30:10 -0600
commit115421b8507a6624178da5a2b2cd2befe36d411f (patch)
treee8bcfce7cf09c2984bd9309d87d56a167dd644a9 /gdb/dwarf2
parent6c3458a8b7ee7d39f070c7b2350851cb2110c65a (diff)
downloadbinutils-115421b8507a6624178da5a2b2cd2befe36d411f.zip
binutils-115421b8507a6624178da5a2b2cd2befe36d411f.tar.gz
binutils-115421b8507a6624178da5a2b2cd2befe36d411f.tar.bz2
Rename cooked-index-storage.[ch]
A discussion with Simon made me realize that cooked_index_storage isn't a very clear name, especially now that it's escaped from read.c. While it does provide some storage (I guess any object does in a sense), it is really a helper for cooked_index_worker -- a temporary object that is destroyed after reading has completed. This patch renames this file. Later patches will rename the class and move cooked_index_worker here, something I think is reasonable given that cooked_index_storage is really something of a helper class for cooked_index_worker. Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/dwarf2')
-rw-r--r--gdb/dwarf2/cooked-index-worker.c (renamed from gdb/dwarf2/cooked-index-storage.c)16
-rw-r--r--gdb/dwarf2/cooked-index-worker.h (renamed from gdb/dwarf2/cooked-index-storage.h)6
-rw-r--r--gdb/dwarf2/cooked-indexer.c2
-rw-r--r--gdb/dwarf2/read.c2
4 files changed, 13 insertions, 13 deletions
diff --git a/gdb/dwarf2/cooked-index-storage.c b/gdb/dwarf2/cooked-index-worker.c
index 9c05cf5..4dabe40 100644
--- a/gdb/dwarf2/cooked-index-storage.c
+++ b/gdb/dwarf2/cooked-index-worker.c
@@ -17,16 +17,16 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "dwarf2/cooked-index-storage.h"
+#include "dwarf2/cooked-index-worker.h"
-/* See cooked-index-storage.h. */
+/* See cooked-index-worker.h. */
cooked_index_storage::cooked_index_storage ()
: m_shard (new cooked_index_shard)
{
}
-/* See cooked-index-storage.h. */
+/* See cooked-index-worker.h. */
cutu_reader *
cooked_index_storage::get_reader (dwarf2_per_cu *per_cu)
@@ -35,7 +35,7 @@ cooked_index_storage::get_reader (dwarf2_per_cu *per_cu)
return it != m_reader_hash.end () ? it->get () : nullptr;
}
-/* See cooked-index-storage.h. */
+/* See cooked-index-worker.h. */
cutu_reader *
cooked_index_storage::preserve (cutu_reader_up reader)
@@ -48,7 +48,7 @@ cooked_index_storage::preserve (cutu_reader_up reader)
return it->get();
}
-/* See cooked-index-storage.h. */
+/* See cooked-index-worker.h. */
std::uint64_t
cooked_index_storage::cutu_reader_hash::operator()
@@ -57,7 +57,7 @@ cooked_index_storage::cutu_reader_hash::operator()
return (*this) (*reader->cu ()->per_cu);
}
-/* See cooked-index-storage.h. */
+/* See cooked-index-worker.h. */
std::uint64_t
cooked_index_storage::cutu_reader_hash::operator() (const dwarf2_per_cu &per_cu)
@@ -66,7 +66,7 @@ cooked_index_storage::cutu_reader_hash::operator() (const dwarf2_per_cu &per_cu)
return per_cu.index;
}
-/* See cooked-index-storage.h. */
+/* See cooked-index-worker.h. */
bool
cooked_index_storage::cutu_reader_eq::operator() (const cutu_reader_up &a,
@@ -75,7 +75,7 @@ cooked_index_storage::cutu_reader_eq::operator() (const cutu_reader_up &a,
return (*this) (*a->cu ()->per_cu, b);
}
-/* See cooked-index-storage.h. */
+/* See cooked-index-worker.h. */
bool cooked_index_storage::cutu_reader_eq::operator()
(const dwarf2_per_cu &per_cu, const cutu_reader_up &reader) const noexcept
diff --git a/gdb/dwarf2/cooked-index-storage.h b/gdb/dwarf2/cooked-index-worker.h
index 449fbe1..3fca8d1 100644
--- a/gdb/dwarf2/cooked-index-storage.h
+++ b/gdb/dwarf2/cooked-index-worker.h
@@ -17,8 +17,8 @@
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 GDB_DWARF2_COOKED_INDEX_STORAGE_H
-#define GDB_DWARF2_COOKED_INDEX_STORAGE_H
+#ifndef GDB_DWARF2_COOKED_INDEX_WORKER_H
+#define GDB_DWARF2_COOKED_INDEX_WORKER_H
#include "dwarf2/abbrev-table-cache.h"
#include "dwarf2/cooked-index.h"
@@ -128,4 +128,4 @@ private:
addrmap_mutable m_addrmap;
};
-#endif /* GDB_DWARF2_COOKED_INDEX_STORAGE_H */
+#endif /* GDB_DWARF2_COOKED_INDEX_WORKER_H */
diff --git a/gdb/dwarf2/cooked-indexer.c b/gdb/dwarf2/cooked-indexer.c
index 789fdb5..3b8d5e0 100644
--- a/gdb/dwarf2/cooked-indexer.c
+++ b/gdb/dwarf2/cooked-indexer.c
@@ -18,7 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "dwarf2/cooked-indexer.h"
-#include "dwarf2/cooked-index-storage.h"
+#include "dwarf2/cooked-index-worker.h"
#include "dwarf2/error.h"
/* See cooked-indexer.h. */
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 3d7b6dd..d02a515 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -32,7 +32,7 @@
#include "dwarf2/aranges.h"
#include "dwarf2/attribute.h"
#include "dwarf2/comp-unit-head.h"
-#include "dwarf2/cooked-index-storage.h"
+#include "dwarf2/cooked-index-worker.h"
#include "dwarf2/cooked-indexer.h"
#include "dwarf2/cu.h"
#include "dwarf2/index-cache.h"