From: Tom Tromey Date: Tue, 25 Mar 2025 23:11:24 +0000 (-0600) Subject: Update cooked_index comment X-Git-Tag: binutils-2_45~995 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bbfa90724d2744b2a1027b04eda5e9208c762380;p=thirdparty%2Fbinutils-gdb.git 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 --- diff --git a/gdb/dwarf2/cooked-index.h b/gdb/dwarf2/cooked-index.h index 1848798bfad..c16afa04037 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...