aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2025-03-25 17:11:24 -0600
committerTom Tromey <tom@tromey.com>2025-04-01 07:30:10 -0600
commitbbfa90724d2744b2a1027b04eda5e9208c762380 (patch)
tree5eed441af2c11d64a7434384416ec84bd94da325
parent34a286acdc30837415adc893b5b71df5a5e1bac6 (diff)
downloadbinutils-bbfa90724d2744b2a1027b04eda5e9208c762380.zip
binutils-bbfa90724d2744b2a1027b04eda5e9208c762380.tar.gz
binutils-bbfa90724d2744b2a1027b04eda5e9208c762380.tar.bz2
Update cooked_index comment
This updates the cooked_index comment with some notes about object lifetimes, in an attempt to make navigating this code a bit simpler. Approved-By: Simon Marchi <simon.marchi@efficios.com>
-rw-r--r--gdb/dwarf2/cooked-index.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/dwarf2/cooked-index.h b/gdb/dwarf2/cooked-index.h
index 1848798..c16afa0 100644
--- a/gdb/dwarf2/cooked-index.h
+++ b/gdb/dwarf2/cooked-index.h
@@ -46,6 +46,14 @@
possible. This combination should help hide the effort from the
user to the maximum possible degree.
+ There are a number of different objects involved in this process.
+ Most of them are temporary -- they are created to handle different
+ phases of scanning, then discarded when possible. The "steady
+ state" objects are index itself (cooked_index, below), which holds
+ the entries (cooked_index_entry), and the implementation of the
+ "quick" API (e.g., cooked_index_functions, though there are
+ other variants).
+
. Main Thread | Worker Threads
============================================================
. dwarf2_initialize_objfile
@@ -77,6 +85,7 @@
. v
. maybe write to index cache
. state = CACHE_DONE
+ . ~cooked_index_worker
.
.
. if main thread calls...