]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/dwarf: clarify comment on dwarf_per_bfd::all_units
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 5 Nov 2025 04:18:22 +0000 (23:18 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Fri, 7 Nov 2025 16:47:58 +0000 (11:47 -0500)
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 <tom@tromey.com>
gdb/dwarf2/read.h

index d0d8f1a3a0e4dd4c2854ef35f89ae759ca61378e..cf0d0104bfa4cf5cac1878e4a654dd0a705fbc0f 100644 (file)
@@ -596,8 +596,10 @@ public:
 
   std::vector<dwarf2_section_info> 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<dwarf2_per_cu_up> all_units;
 
   /* Number of compilation and type units in the ALL_UNITS vector.  */