From: Doug Evans Date: Thu, 7 Jun 2012 17:30:12 +0000 (+0000) Subject: * dwarf2read.c (dwarf2_cu): Add comment. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=034e5797f031bded01cfdf48546300ec862bc36b;p=binutils-gdb.git * dwarf2read.c (dwarf2_cu): Add comment. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 46188d15b3d..6e5d08723fc 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2012-06-07 Doug Evans + + * dwarf2read.c (dwarf2_cu): Add comment. + 2012-06-06 Maciej W. Rozycki * mips-tdep.c (mips_pseudo_register_type): Remove tdep local diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 23779ac821a..589361e7aa4 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -412,7 +412,15 @@ struct dwarf2_cu /* To be copied to symtab->call_site_htab. */ htab_t call_site_htab; - /* Non-NULL if this CU came from a DWO file. */ + /* Non-NULL if this CU came from a DWO file. + There is an invariant here that is important to remember: + Except for attributes copied from the top level DIE in the "main" + (or "stub") file in preparation for reading the DWO file + (e.g., DW_AT_GNU_addr_base), we KISS: there is only *one* CU. + Either there isn't a DWO file (in which case this is NULL and the point + is moot), or there is and either we're not going to read it (in which + case this is NULL) or there is and we are reading it (in which case this + is non-NULL). */ struct dwo_unit *dwo_unit; /* The DW_AT_addr_base attribute if present, zero otherwise