From: Simon Marchi Date: Wed, 5 Nov 2025 04:18:22 +0000 (-0500) Subject: gdb/dwarf: clarify comment on dwarf_per_bfd::all_units X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8d3f9bb8ae3f0e8492542332a391e399c79ebd0;p=thirdparty%2Fbinutils-gdb.git gdb/dwarf: clarify comment on dwarf_per_bfd::all_units I thought that this comment could be updated to clarify what this vector holds and what it is used for. Change-Id: I0e1968c8c6455b49aa156669c43ea8c436c59e45 Approved-By: Tom Tromey --- diff --git a/gdb/dwarf2/read.h b/gdb/dwarf2/read.h index d0d8f1a3a0e..cf0d0104bfa 100644 --- a/gdb/dwarf2/read.h +++ b/gdb/dwarf2/read.h @@ -596,8 +596,10 @@ public: std::vector types; - /* Table of all the compilation units. This is used to locate - the target compilation unit of a particular reference. */ + /* Table of all compilation and type units. + + The order of this vector matters, because it is used to locate targets of + DW_FORM_ref_addr attributes (reference by section offset). */ std::vector all_units; /* Number of compilation and type units in the ALL_UNITS vector. */